FS#65245 - [file] Crashes with SIGSYS when in kernel VT
Attached to Project:
Arch Linux
Opened by [] (genkisky) - Thursday, 23 January 2020, 09:29 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 23 January 2020, 19:19 GMT
Opened by [] (genkisky) - Thursday, 23 January 2020, 09:29 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 23 January 2020, 19:19 GMT
|
Details
Description: Running file(1) on any file when in the kernel
VT crashes with SIGSYS.
It works fine if you pipe the output to something (a file, or another program). It also works fine when in a xorg terminal. But it crashes if you run it directly to stdout in the kernel VT. I know the file PKGBUILD recently re-enabled compiling-with-libseccomp... Looks like there've been other problems file(1) has had with libseccomp, but they've already been worked around. I guess this is just one last issue. I don't know if the real problem is code in libseccomp or file itself. I know using the kernel VT is niche, and this issue is easily worked around (eg, pipe to cat as noted by Cork on #archlinux). But we agreed it was worth filing a bug. Additional info: * package version(s): file 5.38-1 Steps to reproduce: (1) Open up a kernel VT (2) Run file(1) on any file |
This task depends upon
Closed by Levente Polyak (anthraxx)
Thursday, 23 January 2020, 19:19 GMT
Reason for closing: Fixed
Additional comments about closing: 5.38-2
Thursday, 23 January 2020, 19:19 GMT
Reason for closing: Fixed
Additional comments about closing: 5.38-2
FS#65100andFS#58626Here are the last few lines of an strace that I've manually copied (which I guess I should've done in the OP):
read(3, 0x..., 4096) = 3104
read(3, "", 4096) = 0
close(3) = 0
futex(0x..., FUTEX_WAIT_PRIVATE, 2^31 - 1) = 0
fstat(1, 0x...) = 0
ioctl(1, TCGETS <unfinished ...>) = ?
+++ killed by SIGSYS +++
Bad system call (core dumped)
So, if I'm reading it right, it sees stdout is a tty and decides to do an ioctl for some reason, then libseccomp doesn't like the TCGETS ioctl?