Go to file
Peter Korsgaard f204766b8f package/openssh: allow sandboxing to be disabled as workaround for seccomp issues
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>
2022-09-18 16:51:03 +02:00
arch arch/Config.in.powerpc: change conditions to positive logic 2022-09-18 14:42:08 +02:00
board Merge branch 'next' 2022-09-11 09:57:08 +02:00
boot Merge branch 'next' 2022-09-11 09:57:08 +02:00
configs configs/ls1028ardb: configure eno0 with DHCP 2022-09-17 14:22:12 +02:00
docs docs/website/news.html: add 2022.08 announcement link 2022-09-10 17:44:02 +02:00
fs fs/cpio: accept a list of dracut.conf files 2022-09-17 22:13:22 +02:00
linux {linux, linux-headers}: bump 4.{9, 14, 19}.x / 5.{4, 10, 15}.x series 2022-09-09 21:48:51 +02:00
package package/openssh: allow sandboxing to be disabled as workaround for seccomp issues 2022-09-18 16:51:03 +02:00
support package/polkit: test /usr/share/polkit-1/rules.d 2022-09-17 23:36:10 +02:00
system package/systemd: add setting for systemd default.target 2022-05-02 22:58:44 +02:00
toolchain toolchain/Config.in: update gcc bug 90620 2022-09-11 21:21:11 +02:00
utils utils/genrandconfig: disable libopenssl without atomics 2022-09-18 15:36:36 +02:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore
.gitlab-ci.yml utils/checkpackagelib/lib_sysv: run shellcheck 2022-02-06 18:27:03 +01:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2022.08 2022-09-10 17:00:09 +02:00
Config.in Config.in: move toolchain menu before build options 2022-07-27 11:11:19 +02:00
Config.in.legacy Config.in.legacy: add missing select 2022-09-18 09:46:41 +02:00
COPYING
DEVELOPERS support/testing/tests/package/test_hwloc.py: new runtime test 2022-09-17 15:06:08 +02:00
Makefile Kickoff 2022.11 cycle 2022-09-10 17:42:09 +02:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches