]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
seccomp: move mprotect to @default
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 13 Nov 2021 15:08:25 +0000 (16:08 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 14 Nov 2021 04:53:50 +0000 (13:53 +0900)
With glibc-2.34.9000-17.fc36.x86_64, dynamically programs newly fail in early
init with a restrictive syscall filter that does not include @system-service.
I think this is caused by 2dd87703d4386f2776c5b5f375a494c91d7f9fe4:

Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon May 10 10:31:41 2021 +0200

    nptl: Move changing of stack permissions into ld.so

    All the stack lists are now in _rtld_global, so it is possible
    to change stack permissions directly from there, instead of
    calling into libpthread to do the change.

It seems that this call will now be very widely used, so let's just move it to
default to avoid too many failures.

src/shared/seccomp-util.c

index ff90af538b390a144b44f48233de98164c5fa97c..7d2c52e18865522c957ef1a7e19162ab88cc6cac 100644 (file)
@@ -324,6 +324,7 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "membarrier\0"
                 "mmap\0"
                 "mmap2\0"
+                "mprotect\0"
                 "munmap\0"
                 "nanosleep\0"
                 "pause\0"
@@ -864,7 +865,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "ioprio_get\0"
                 "kcmp\0"
                 "madvise\0"
-                "mprotect\0"
                 "mremap\0"
                 "name_to_handle_at\0"
                 "oldolduname\0"