f204766b8f
As explained in bug #14796, there are situations where the seccomp based sandboxing in openssh can get confused, leading to connection issues. As explained by Thomas in the bug report: glibc does not care about the kernel headers when deciding whether to try the clock_gettime64() syscall or not: it always use it, and if that fails at runtime, it falls back to clock_gettime(). This is how glibc ends up using clock_gettime64() even if your kernel does not support it. On the other hand, the OpenSSL seccomp code relies on kernel headers to decide whether the clock_gettime64() syscall should be in the allowed list of syscalls or not. So when you are in a situation where glibc is recent, but your kernel is older, you get into precisely the problem you have: glibc tries to use clock_gettime64, but OpenSSH seccomp configuration prevents that, which does not allow glibc to gracefully fallback to clock_gettime (as seccomp is configured to kill the process on filter violations). As a workaround, add a _OPENSSH_SANDBOX option (defaulting to y) to decide if sandboxing should be used or not. --with-sandbox expects the type of sandboxing to use, and if not specified, will use the first one available in a list: pledge, systrace, darwin, seccomp, capsicum, rlimit. On Linux, only seccomp and rlimit are available, and rlimit probably does not bring much security-wise, so in all practical matters, on Linux, sandboxing uses seccomp or there is no sandboxing, so let's just disable sandboxing when we do not want to use seccomp, and let configure detect seccomp when we request sandboxing. Fixes (works around) #14796 Signed-off-by: Peter Korsgaard <peter@korsgaard.com> [yann.morin.1998@free.fr: add § about sandboxing types] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
43 lines
953 B
Plaintext
43 lines
953 B
Plaintext
config BR2_PACKAGE_OPENSSH
|
|
bool "openssh"
|
|
depends on BR2_USE_MMU # fork()
|
|
select BR2_PACKAGE_OPENSSL
|
|
select BR2_PACKAGE_ZLIB
|
|
help
|
|
A free version of the SSH protocol suite of network
|
|
connectivity tools. The standard 'ssh', 'sshd', 'scp', and
|
|
friends.
|
|
|
|
http://www.openssh.com/
|
|
|
|
if BR2_PACKAGE_OPENSSH
|
|
|
|
config BR2_PACKAGE_OPENSSH_CLIENT
|
|
bool "client"
|
|
default y
|
|
help
|
|
Client programs: ssh, scp, sftp, ssh-agent, ssh-add,
|
|
ssh-copy-id.
|
|
|
|
config BR2_PACKAGE_OPENSSH_SERVER
|
|
bool "server"
|
|
default y
|
|
help
|
|
Server programs: sshd, sftp-server
|
|
|
|
config BR2_PACKAGE_OPENSSH_KEY_UTILS
|
|
bool "key utilities"
|
|
default y
|
|
help
|
|
Key utilities: ssh-keygen, ssh-keyscan.
|
|
|
|
config BR2_PACKAGE_OPENSSH_SANDBOX
|
|
bool "use sandboxing"
|
|
default y
|
|
help
|
|
Use sandboxing for extra privilege protection of processes.
|
|
|
|
This is normally preferable, but may cause seccomp problems
|
|
for certain combinations of C libraries and kernel versions.
|
|
endif
|