diff options
author | 2022-07-17 16:42:06 +0200 | |
---|---|---|
committer | 2022-07-17 17:05:36 +0200 | |
commit | f4f44a5f96c49aff62000f3a9802277152423534 (patch) | |
tree | be99566e63471008ff5edcb6957795605b77a9ad /src | |
parent | refresh and sort syscall tables (diff) | |
download | firejail-f4f44a5f96c49aff62000f3a9802277152423534.tar.gz firejail-f4f44a5f96c49aff62000f3a9802277152423534.tar.zst firejail-f4f44a5f96c49aff62000f3a9802277152423534.zip |
refresh syscall groups (#5188)
now covers syscalls up to including process_madvise (440)
group assignment was blindly copied from systemd:
https://github.com/systemd/systemd/blob/729d2df8065ac90ac606e1fff91dc2d588b2795d/src/shared/seccomp-util.c#L305
the only exception is close_range, which was added to both @basic-io and @file-system
this commit adds the following syscalls to the default blacklist:
pidfd_getfd,fsconfig,fsmount,fsopen,fspick,move_mount,open_tree
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/syscall.c | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/src/lib/syscall.c b/src/lib/syscall.c index a17f6423a..29cf6318f 100644 --- a/src/lib/syscall.c +++ b/src/lib/syscall.c | |||
@@ -92,7 +92,16 @@ static const SyscallGroupList sysgroups[] = { | |||
92 | "io_setup," | 92 | "io_setup," |
93 | #endif | 93 | #endif |
94 | #ifdef SYS_io_submit | 94 | #ifdef SYS_io_submit |
95 | "io_submit" | 95 | "io_submit," |
96 | #endif | ||
97 | #ifdef SYS_io_uring_enter | ||
98 | "io_uring_enter," | ||
99 | #endif | ||
100 | #ifdef SYS_io_uring_register | ||
101 | "io_uring_register," | ||
102 | #endif | ||
103 | #ifdef SYS_io_uring_setup | ||
104 | "io_uring_setup" | ||
96 | #endif | 105 | #endif |
97 | }, | 106 | }, |
98 | { .name = "@basic-io", .list = | 107 | { .name = "@basic-io", .list = |
@@ -102,6 +111,9 @@ static const SyscallGroupList sysgroups[] = { | |||
102 | #ifdef SYS_close | 111 | #ifdef SYS_close |
103 | "close," | 112 | "close," |
104 | #endif | 113 | #endif |
114 | #ifdef SYS_close_range | ||
115 | "close_range," | ||
116 | #endif | ||
105 | #ifdef SYS_dup | 117 | #ifdef SYS_dup |
106 | "dup," | 118 | "dup," |
107 | #endif | 119 | #endif |
@@ -212,6 +224,9 @@ static const SyscallGroupList sysgroups[] = { | |||
212 | #ifdef SYS_perf_event_open | 224 | #ifdef SYS_perf_event_open |
213 | "perf_event_open," | 225 | "perf_event_open," |
214 | #endif | 226 | #endif |
227 | #ifdef SYS_pidfd_getfd | ||
228 | "pidfd_getfd," | ||
229 | #endif | ||
215 | #ifdef SYS_process_vm_writev | 230 | #ifdef SYS_process_vm_writev |
216 | "process_vm_writev," | 231 | "process_vm_writev," |
217 | #endif | 232 | #endif |
@@ -290,7 +305,7 @@ static const SyscallGroupList sysgroups[] = { | |||
290 | "remap_file_pages," | 305 | "remap_file_pages," |
291 | #endif | 306 | #endif |
292 | #ifdef SYS_set_mempolicy | 307 | #ifdef SYS_set_mempolicy |
293 | "set_mempolicy" | 308 | "set_mempolicy," |
294 | #endif | 309 | #endif |
295 | #ifdef SYS_vmsplice | 310 | #ifdef SYS_vmsplice |
296 | "vmsplice," | 311 | "vmsplice," |
@@ -350,6 +365,9 @@ static const SyscallGroupList sysgroups[] = { | |||
350 | #ifdef SYS_close | 365 | #ifdef SYS_close |
351 | "close," | 366 | "close," |
352 | #endif | 367 | #endif |
368 | #ifdef SYS_close_range | ||
369 | "close_range," | ||
370 | #endif | ||
353 | #ifdef SYS_creat | 371 | #ifdef SYS_creat |
354 | "creat," | 372 | "creat," |
355 | #endif | 373 | #endif |
@@ -503,6 +521,9 @@ static const SyscallGroupList sysgroups[] = { | |||
503 | #ifdef SYS_openat | 521 | #ifdef SYS_openat |
504 | "openat," | 522 | "openat," |
505 | #endif | 523 | #endif |
524 | #ifdef SYS_openat2 | ||
525 | "openat2," | ||
526 | #endif | ||
506 | #ifdef SYS_readlink | 527 | #ifdef SYS_readlink |
507 | "readlink," | 528 | "readlink," |
508 | #endif | 529 | #endif |
@@ -657,6 +678,9 @@ static const SyscallGroupList sysgroups[] = { | |||
657 | #ifdef SYS_pipe2 | 678 | #ifdef SYS_pipe2 |
658 | "pipe2," | 679 | "pipe2," |
659 | #endif | 680 | #endif |
681 | #ifdef SYS_process_madvise | ||
682 | "process_madvise," | ||
683 | #endif | ||
660 | #ifdef SYS_process_vm_readv | 684 | #ifdef SYS_process_vm_readv |
661 | "process_vm_readv," | 685 | "process_vm_readv," |
662 | #endif | 686 | #endif |
@@ -731,9 +755,27 @@ static const SyscallGroupList sysgroups[] = { | |||
731 | #ifdef SYS_chroot | 755 | #ifdef SYS_chroot |
732 | "chroot," | 756 | "chroot," |
733 | #endif | 757 | #endif |
758 | #ifdef SYS_fsconfig | ||
759 | "fsconfig," | ||
760 | #endif | ||
761 | #ifdef SYS_fsmount | ||
762 | "fsmount," | ||
763 | #endif | ||
764 | #ifdef SYS_fsopen | ||
765 | "fsopen," | ||
766 | #endif | ||
767 | #ifdef SYS_fspick | ||
768 | "fspick," | ||
769 | #endif | ||
734 | #ifdef SYS_mount | 770 | #ifdef SYS_mount |
735 | "mount," | 771 | "mount," |
736 | #endif | 772 | #endif |
773 | #ifdef SYS_move_mount | ||
774 | "move_mount," | ||
775 | #endif | ||
776 | #ifdef SYS_open_tree | ||
777 | "open_tree," | ||
778 | #endif | ||
737 | #ifdef SYS_pivot_root | 779 | #ifdef SYS_pivot_root |
738 | "pivot_root," | 780 | "pivot_root," |
739 | #endif | 781 | #endif |
@@ -985,6 +1027,9 @@ static const SyscallGroupList sysgroups[] = { | |||
985 | #ifdef SYS_clone | 1027 | #ifdef SYS_clone |
986 | "clone," | 1028 | "clone," |
987 | #endif | 1029 | #endif |
1030 | #ifdef SYS_clone3 | ||
1031 | "clone3," | ||
1032 | #endif | ||
988 | #ifdef SYS_execveat | 1033 | #ifdef SYS_execveat |
989 | "execveat," | 1034 | "execveat," |
990 | #endif | 1035 | #endif |
@@ -997,6 +1042,9 @@ static const SyscallGroupList sysgroups[] = { | |||
997 | #ifdef SYS_kill | 1042 | #ifdef SYS_kill |
998 | "kill," | 1043 | "kill," |
999 | #endif | 1044 | #endif |
1045 | #ifdef SYS_pidfd_open | ||
1046 | "pidfd_open," | ||
1047 | #endif | ||
1000 | #ifdef SYS_pidfd_send_signal | 1048 | #ifdef SYS_pidfd_send_signal |
1001 | "pidfd_send_signal," | 1049 | "pidfd_send_signal," |
1002 | #endif | 1050 | #endif |