Bug 3268 - ssh_sandbox_violation: unexpected system call: getpid on Linux x32
Summary: ssh_sandbox_violation: unexpected system call: getpid on Linux x32
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 8.4p1
Hardware: x32 Linux
: P5 major
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-02 02:37 AEDT by Arkadiusz Miśkiewicz
Modified: 2021-03-04 09:51 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arkadiusz Miśkiewicz 2021-03-02 02:37:25 AEDT
On Linux x32, glibc 2.33 and kernel 4.9.256 I'm getting sshd killed due to sandbox violation. With debugging:

9563  getpid()                          = 1073741863
9563  --- SIGSYS {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_call_addr=0xf71b164b, si_syscall=__NR_getpid, si_arch=AUDIT_ARCH_X86_64} ---
9563  write(8, "\0\0\0g\0\0\0\1\0\0\0_ssh_sandbox_violation: unexpected system call (arch:0xc000003e,syscall:1073741863 @ 0xf71b164b)", 107) = 1073741825

1073741863 is getpid on x32


but there is
        SC_ALLOW(__NR_getpid),
already there, so should allow it right?

I even tried:
    SC_ALLOW(1073741863),
to see if that will work but it doesn't.
Comment 1 Damien Miller 2021-03-02 09:03:07 AEDT
Could you please try git HEAD from https://github.com/openssh/openssh-portable ?
Comment 2 Arkadiusz Miśkiewicz 2021-03-02 10:13:42 AEDT
commit e3f27006f15abacb7e89fda3f5e9a0bd420b7e38
Author: Damien Miller <djm@mindrot.org>
Date:   Fri Nov 13 14:20:43 2020 +1100

    Revert "detect Linux/X32 systems"

    This reverts commit 5b56bd0affea7b02b540bdbc4d1d271b0e4fc885.

    The approach used was incorrect; discussion in bz#3085


fixed it, thanks.
Comment 3 Damien Miller 2021-03-04 09:51:40 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle