seccomp-tools 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/README.md +17 -0
- data/lib/seccomp-tools/audit/catalog.rb +3 -0
- data/lib/seccomp-tools/consts/sys_arg.rb +43 -5
- data/lib/seccomp-tools/consts/sys_nr/aarch64.rb +52 -1
- data/lib/seccomp-tools/consts/sys_nr/amd64.rb +53 -1
- data/lib/seccomp-tools/consts/sys_nr/i386.rb +83 -2
- data/lib/seccomp-tools/consts/sys_nr/s390x.rb +30 -1
- data/lib/seccomp-tools/dumper.rb +3 -4
- data/lib/seccomp-tools/syscall.rb +1 -3
- data/lib/seccomp-tools/util.rb +6 -0
- data/lib/seccomp-tools/version.rb +1 -1
- metadata +1 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a82e64649a42a26b1011701568ba1ca9c3a7a905cebb3653f10c0811a16c4f95
|
|
4
|
+
data.tar.gz: 75b0b1eac26826b39c85f5245f0ad6fe4564959bc6b6a59a1fef42637a736891
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97c2d819038edc38e9af6f3c2abf815695c136e6ef2b44789f120b9c2150694ed72003f681fb42528654b1d659e84f3a52e6dc49b6ba2e5edaa891ac93b0af07
|
|
7
|
+
data.tar.gz: 934be74f304f9ff5912e82b1db3166799b9137aac7ef3bda21a9b083e793bfff8d171cef7e24523dc6b1590b0936230393ae80591ca311e2486baaa2a7d65642
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.7.1] - 2026-08-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `audit` now flags `io_uring_setup` reaching ALLOW: io_uring performs reads/writes/opens as ring operations, bypassing seccomp filters on those syscalls. The `openat2`/`clone3` equivalent-syscall gaps are also detected now that the syscall tables know those names.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Updated the syscall tables to Linux 7.1: amd64, i386, aarch64 and s390x were years out of date and missing modern syscalls (io_uring, clone3, openat2, the landlock family, futex_waitv, mseal, ...), so they now show up by name in disasm/explain/audit instead of as raw numbers. Existing numbers are unchanged.
|
|
17
|
+
- Refreshed syscall argument names to Linux 7.1, so disasm labels the arguments of the modern syscalls (e.g. `openat2(dfd, filename, how, size)`) instead of showing bare `args[n]`.
|
|
18
|
+
- Dropped the `os` gem dependency; host-OS detection now uses `RbConfig`, so seccomp-tools installs with fewer dependencies.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- i386 syscall 283 is now named `kexec_load`, matching every other architecture; it was mistakenly `sys_kexec_load`, so `kexec_load` did not resolve in asm/disasm on i386.
|
|
22
|
+
|
|
10
23
|
## [1.7.0] - 2026-08-01
|
|
11
24
|
|
|
12
25
|
### Added
|
|
@@ -138,7 +151,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
138
151
|
### Added
|
|
139
152
|
- Initial release: the `dump` and `disasm` commands, ptrace-based dumping with `--limit` and `--output`, and i386 support.
|
|
140
153
|
|
|
141
|
-
[Unreleased]: https://github.com/david942j/seccomp-tools/compare/v1.7.
|
|
154
|
+
[Unreleased]: https://github.com/david942j/seccomp-tools/compare/v1.7.1...HEAD
|
|
155
|
+
[1.7.1]: https://github.com/david942j/seccomp-tools/compare/v1.7.0...v1.7.1
|
|
142
156
|
[1.7.0]: https://github.com/david942j/seccomp-tools/compare/v1.6.2...v1.7.0
|
|
143
157
|
[1.6.2]: https://github.com/david942j/seccomp-tools/compare/v1.6.1...v1.6.2
|
|
144
158
|
[1.6.1]: https://github.com/david942j/seccomp-tools/compare/v1.6.0...v1.6.1
|
data/README.md
CHANGED
|
@@ -497,6 +497,10 @@ $ seccomp-tools audit spec/data/twctf-2016-diary.bpf -a amd64
|
|
|
497
497
|
# another AUDIT_ARCH, so the checks can be dodged by invoking through a different ABI (e.g. i386 numbering on amd64).
|
|
498
498
|
# fix: Compare data[4] against your AUDIT_ARCH_* and KILL every architecture you do not explicitly handle.
|
|
499
499
|
#
|
|
500
|
+
# [HIGH] io_uring_setup is allowed (amd64)
|
|
501
|
+
# io_uring_setup reaches ALLOW - reads/writes/opens as ring operations, bypassing filters on those syscalls.
|
|
502
|
+
# fix: Block io_uring_setup unless the program genuinely needs it.
|
|
503
|
+
#
|
|
500
504
|
# [HIGH] process_vm_readv is allowed (amd64)
|
|
501
505
|
# process_vm_readv reaches ALLOW - read another process's memory.
|
|
502
506
|
# fix: Block process_vm_readv unless the program genuinely needs it.
|
|
@@ -509,11 +513,20 @@ $ seccomp-tools audit spec/data/twctf-2016-diary.bpf -a amd64
|
|
|
509
513
|
# ptrace reaches ALLOW - inspect/inject into other processes.
|
|
510
514
|
# fix: Block ptrace unless the program genuinely needs it.
|
|
511
515
|
#
|
|
516
|
+
# [HIGH] A file can be opened and its contents copied out (amd64)
|
|
517
|
+
# openat2, read and write all reach ALLOW, so the contents of an arbitrary file (e.g. the flag) can be copied straight
|
|
518
|
+
# back out.
|
|
519
|
+
# fix: Deny the open-family syscalls unless the program genuinely needs arbitrary files.
|
|
520
|
+
#
|
|
512
521
|
# [HIGH] Default action is ALLOW (denylist) (amd64)
|
|
513
522
|
# Any syscall the filter does not explicitly block is allowed; a denylist is bypassable by any syscall the author
|
|
514
523
|
# overlooked.
|
|
515
524
|
# fix: Use an allowlist: default to KILL/ERRNO and permit only the needed syscalls.
|
|
516
525
|
#
|
|
526
|
+
# [HIGH] open/openat blocked but openat2 allowed (amd64)
|
|
527
|
+
# open, openat denied, but the equivalent openat2 reaches ALLOW - same capability, different syscall number.
|
|
528
|
+
# fix: Deny every equivalent in the group: also block openat2.
|
|
529
|
+
#
|
|
517
530
|
# [HIGH] x32 ABI is not guarded (amd64)
|
|
518
531
|
# Syscalls blocked by their native number are reachable via their x32 number (nr | 0x40000000): open, clone, fork,
|
|
519
532
|
# vfork, execve, creat, openat, execveat.
|
|
@@ -526,6 +539,10 @@ $ seccomp-tools audit spec/data/twctf-2016-diary.bpf -a amd64
|
|
|
526
539
|
# [MEDIUM] socket is allowed (amd64)
|
|
527
540
|
# socket reaches ALLOW - network access (exfiltration).
|
|
528
541
|
# fix: Block socket unless the program genuinely needs it.
|
|
542
|
+
#
|
|
543
|
+
# [MEDIUM] fork/vfork/clone blocked but clone3 allowed (amd64)
|
|
544
|
+
# fork, vfork, clone denied, but the equivalent clone3 reaches ALLOW - same capability, different syscall number.
|
|
545
|
+
# fix: Deny every equivalent in the group: also block clone3.
|
|
529
546
|
```
|
|
530
547
|
|
|
531
548
|
Use `--format json` for CI or tooling:
|
|
@@ -18,6 +18,9 @@ module SeccompTools
|
|
|
18
18
|
ptrace: { severity: :high, why: 'inspect/inject into other processes' },
|
|
19
19
|
process_vm_readv: { severity: :high, why: "read another process's memory" },
|
|
20
20
|
process_vm_writev: { severity: :high, why: "write another process's memory" },
|
|
21
|
+
io_uring_setup: {
|
|
22
|
+
severity: :high, why: 'reads/writes/opens as ring operations, bypassing filters on those syscalls'
|
|
23
|
+
},
|
|
21
24
|
socket: { severity: :medium, why: 'network access (exfiltration)' },
|
|
22
25
|
connect: { severity: :medium, why: 'network access (exfiltration)' }
|
|
23
26
|
}.freeze
|
|
@@ -11,26 +11,32 @@
|
|
|
11
11
|
io_pgetevents: %w[ctx_id min_nr nr events timeout sig],
|
|
12
12
|
io_pgetevents_time32: %w[ctx_id min_nr nr events timeout sig],
|
|
13
13
|
io_uring_setup: %w[entries p],
|
|
14
|
-
io_uring_enter: %w[fd to_submit min_complete flags
|
|
14
|
+
io_uring_enter: %w[fd to_submit min_complete flags argp argsz],
|
|
15
15
|
io_uring_register: %w[fd op arg nr_args],
|
|
16
16
|
setxattr: %w[path name value size flags],
|
|
17
|
+
setxattrat: %w[dfd path at_flags name args size],
|
|
17
18
|
lsetxattr: %w[path name value size flags],
|
|
18
19
|
fsetxattr: %w[fd name value size flags],
|
|
19
20
|
getxattr: %w[path name value size],
|
|
21
|
+
getxattrat: %w[dfd path at_flags name args size],
|
|
20
22
|
lgetxattr: %w[path name value size],
|
|
21
23
|
fgetxattr: %w[fd name value size],
|
|
22
24
|
listxattr: %w[path list size],
|
|
25
|
+
listxattrat: %w[dfd path at_flags list size],
|
|
23
26
|
llistxattr: %w[path list size],
|
|
24
27
|
flistxattr: %w[fd list size],
|
|
25
28
|
removexattr: %w[path name],
|
|
29
|
+
removexattrat: %w[dfd path at_flags name],
|
|
26
30
|
lremovexattr: %w[path name],
|
|
27
31
|
fremovexattr: %w[fd name],
|
|
32
|
+
file_getattr: %w[dfd filename attr usize at_flags],
|
|
33
|
+
file_setattr: %w[dfd filename attr usize at_flags],
|
|
28
34
|
getcwd: %w[buf size],
|
|
29
|
-
lookup_dcookie: %w[cookie64 buf len],
|
|
30
35
|
eventfd2: %w[count flags],
|
|
31
36
|
epoll_create1: %w[flags],
|
|
32
37
|
epoll_ctl: %w[epfd op fd event],
|
|
33
38
|
epoll_pwait: %w[epfd events maxevents timeout sigmask sigsetsize],
|
|
39
|
+
epoll_pwait2: %w[epfd events maxevents timeout sigmask sigsetsize],
|
|
34
40
|
dup: %w[fildes],
|
|
35
41
|
dup3: %w[oldfd newfd flags],
|
|
36
42
|
fcntl: %w[fd cmd arg],
|
|
@@ -55,24 +61,32 @@
|
|
|
55
61
|
statfs64: %w[path sz buf],
|
|
56
62
|
fstatfs: %w[fd buf],
|
|
57
63
|
fstatfs64: %w[fd sz buf],
|
|
64
|
+
statmount: %w[req buf bufsize flags],
|
|
65
|
+
listmount: %w[req mnt_ids nr_mnt_ids flags],
|
|
66
|
+
listns: %w[req ns_ids nr_ns_ids flags],
|
|
58
67
|
truncate: %w[path length],
|
|
59
68
|
ftruncate: %w[fd length],
|
|
60
69
|
truncate64: %w[path length],
|
|
61
70
|
ftruncate64: %w[fd length],
|
|
62
71
|
fallocate: %w[fd mode offset len],
|
|
63
72
|
faccessat: %w[dfd filename mode],
|
|
73
|
+
faccessat2: %w[dfd filename mode flags],
|
|
64
74
|
chdir: %w[filename],
|
|
65
75
|
fchdir: %w[fd],
|
|
66
76
|
chroot: %w[filename],
|
|
67
77
|
fchmod: %w[fd mode],
|
|
68
78
|
fchmodat: %w[dfd filename mode],
|
|
79
|
+
fchmodat2: %w[dfd filename mode flags],
|
|
69
80
|
fchownat: %w[dfd filename user group flag],
|
|
70
81
|
fchown: %w[fd user group],
|
|
71
82
|
openat: %w[dfd filename flags mode],
|
|
83
|
+
openat2: %w[dfd filename how size],
|
|
72
84
|
close: %w[fd],
|
|
85
|
+
close_range: %w[fd max_fd flags],
|
|
73
86
|
vhangup: %w[],
|
|
74
87
|
pipe2: %w[fildes flags],
|
|
75
88
|
quotactl: %w[cmd special id addr],
|
|
89
|
+
quotactl_fd: %w[fd cmd id addr],
|
|
76
90
|
getdents64: %w[fd dirent count],
|
|
77
91
|
llseek: %w[fd offset_high offset_low result whence],
|
|
78
92
|
lseek: %w[fd offset whence],
|
|
@@ -119,6 +133,10 @@
|
|
|
119
133
|
futex_time32: %w[uaddr op val utime uaddr2 val3],
|
|
120
134
|
get_robust_list: %w[pid head_ptr len_ptr],
|
|
121
135
|
set_robust_list: %w[head len],
|
|
136
|
+
futex_waitv: %w[waiters nr_futexes flags timeout clockid],
|
|
137
|
+
futex_wake: %w[uaddr mask nr flags],
|
|
138
|
+
futex_wait: %w[uaddr val mask flags timespec clockid],
|
|
139
|
+
futex_requeue: %w[waiters flags nr_wake nr_requeue],
|
|
122
140
|
nanosleep: %w[rqtp rmtp],
|
|
123
141
|
nanosleep_time32: %w[rqtp rmtp],
|
|
124
142
|
getitimer: %w[which value],
|
|
@@ -241,6 +259,7 @@
|
|
|
241
259
|
add_key: %w[_type _description _payload plen destringid],
|
|
242
260
|
request_key: %w[_type _description _callout_info destringid],
|
|
243
261
|
keyctl: %w[cmd arg2 arg3 arg4 arg5],
|
|
262
|
+
clone3: %w[uargs size],
|
|
244
263
|
execve: %w[filename argv envp],
|
|
245
264
|
fadvise64_64: %w[fd offset len advice],
|
|
246
265
|
swapon: %w[specialfile swap_flags],
|
|
@@ -253,7 +272,10 @@
|
|
|
253
272
|
munlockall: %w[],
|
|
254
273
|
mincore: %w[start len vec],
|
|
255
274
|
madvise: %w[start len behavior],
|
|
275
|
+
process_madvise: %w[pidfd vec vlen behavior flags],
|
|
276
|
+
process_mrelease: %w[pidfd flags],
|
|
256
277
|
remap_file_pages: %w[start size prot pgoff flags],
|
|
278
|
+
mseal: %w[start len flags],
|
|
257
279
|
mbind: %w[start len mode nmask maxnode flags],
|
|
258
280
|
get_mempolicy: %w[policy nmask maxnode addr flags],
|
|
259
281
|
set_mempolicy: %w[mode nmask maxnode],
|
|
@@ -273,6 +295,7 @@
|
|
|
273
295
|
clock_adjtime32: %w[which_clock tx],
|
|
274
296
|
syncfs: %w[fd],
|
|
275
297
|
setns: %w[fd nstype],
|
|
298
|
+
pidfd_open: %w[pid flags],
|
|
276
299
|
sendmmsg: %w[fd msg vlen flags],
|
|
277
300
|
process_vm_readv: %w[pid lvec liovcnt rvec riovcnt flags],
|
|
278
301
|
process_vm_writev: %w[pid lvec liovcnt rvec riovcnt flags],
|
|
@@ -287,7 +310,7 @@
|
|
|
287
310
|
bpf: %w[cmd attr size],
|
|
288
311
|
execveat: %w[dfd filename argv envp flags],
|
|
289
312
|
userfaultfd: %w[flags],
|
|
290
|
-
membarrier: %w[cmd flags],
|
|
313
|
+
membarrier: %w[cmd flags cpu_id],
|
|
291
314
|
mlock2: %w[start len flags],
|
|
292
315
|
copy_file_range: %w[fd_in off_in fd_out off_out len flags],
|
|
293
316
|
preadv2: %w[fd vec vlen pos_l pos_h flags],
|
|
@@ -297,14 +320,30 @@
|
|
|
297
320
|
pkey_free: %w[pkey],
|
|
298
321
|
statx: %w[dfd path flags mask buffer],
|
|
299
322
|
rseq: %w[rseq rseq_len flags sig],
|
|
323
|
+
rseq_slice_yield: %w[],
|
|
300
324
|
open_tree: %w[dfd path flags],
|
|
325
|
+
open_tree_attr: %w[dfd path flags uattr usize],
|
|
301
326
|
move_mount: %w[from_dfd from_path to_dfd to_path ms_flags],
|
|
327
|
+
mount_setattr: %w[dfd path flags uattr usize],
|
|
302
328
|
fsopen: %w[fs_name flags],
|
|
303
329
|
fsconfig: %w[fs_fd cmd key value aux],
|
|
304
330
|
fsmount: %w[fs_fd flags ms_flags],
|
|
305
331
|
fspick: %w[dfd path flags],
|
|
306
332
|
pidfd_send_signal: %w[pidfd sig info flags],
|
|
333
|
+
pidfd_getfd: %w[pidfd fd flags],
|
|
334
|
+
landlock_create_ruleset: %w[attr size flags],
|
|
335
|
+
landlock_add_rule: %w[ruleset_fd rule_type rule_attr flags],
|
|
336
|
+
landlock_restrict_self: %w[ruleset_fd flags],
|
|
337
|
+
memfd_secret: %w[flags],
|
|
338
|
+
set_mempolicy_home_node: %w[start len home_node flags],
|
|
339
|
+
cachestat: %w[fd cstat_range cstat flags],
|
|
340
|
+
map_shadow_stack: %w[addr size flags],
|
|
341
|
+
lsm_get_self_attr: %w[attr ctx size flags],
|
|
342
|
+
lsm_set_self_attr: %w[attr ctx size flags],
|
|
343
|
+
lsm_list_modules: %w[ids size flags],
|
|
307
344
|
ioperm: %w[from num on],
|
|
345
|
+
uretprobe: %w[],
|
|
346
|
+
uprobe: %w[],
|
|
308
347
|
pciconfig_read: %w[bus dfn off len buf],
|
|
309
348
|
pciconfig_write: %w[bus dfn off len buf],
|
|
310
349
|
pciconfig_iobase: %w[which bus devfn],
|
|
@@ -352,10 +391,8 @@
|
|
|
352
391
|
epoll_wait: %w[epfd events maxevents timeout],
|
|
353
392
|
ustat: %w[dev ubuf],
|
|
354
393
|
vfork: %w[],
|
|
355
|
-
bdflush: %w[func data],
|
|
356
394
|
oldumount: %w[name],
|
|
357
395
|
uselib: %w[library],
|
|
358
|
-
sysctl: %w[args],
|
|
359
396
|
sysfs: %w[option arg1 arg2],
|
|
360
397
|
fork: %w[],
|
|
361
398
|
stime: %w[tptr],
|
|
@@ -399,6 +436,7 @@
|
|
|
399
436
|
mmap_pgoff: %w[addr len prot flags fd pgoff],
|
|
400
437
|
old_mmap: %w[arg],
|
|
401
438
|
ni_syscall: %w[],
|
|
439
|
+
ni_posix_timers: %w[],
|
|
402
440
|
io_submit: %w[ctx_id nr iocbpp],
|
|
403
441
|
pselect6: %w[n inp outp exp tsp sig],
|
|
404
442
|
pselect6_time32: %w[n inp outp exp tsp sig],
|
|
@@ -280,5 +280,56 @@
|
|
|
280
280
|
pkey_mprotect: 288,
|
|
281
281
|
pkey_alloc: 289,
|
|
282
282
|
pkey_free: 290,
|
|
283
|
-
statx: 291
|
|
283
|
+
statx: 291,
|
|
284
|
+
io_pgetevents: 292,
|
|
285
|
+
rseq: 293,
|
|
286
|
+
kexec_file_load: 294,
|
|
287
|
+
pidfd_send_signal: 424,
|
|
288
|
+
io_uring_setup: 425,
|
|
289
|
+
io_uring_enter: 426,
|
|
290
|
+
io_uring_register: 427,
|
|
291
|
+
open_tree: 428,
|
|
292
|
+
move_mount: 429,
|
|
293
|
+
fsopen: 430,
|
|
294
|
+
fsconfig: 431,
|
|
295
|
+
fsmount: 432,
|
|
296
|
+
fspick: 433,
|
|
297
|
+
pidfd_open: 434,
|
|
298
|
+
clone3: 435,
|
|
299
|
+
close_range: 436,
|
|
300
|
+
openat2: 437,
|
|
301
|
+
pidfd_getfd: 438,
|
|
302
|
+
faccessat2: 439,
|
|
303
|
+
process_madvise: 440,
|
|
304
|
+
epoll_pwait2: 441,
|
|
305
|
+
mount_setattr: 442,
|
|
306
|
+
quotactl_fd: 443,
|
|
307
|
+
landlock_create_ruleset: 444,
|
|
308
|
+
landlock_add_rule: 445,
|
|
309
|
+
landlock_restrict_self: 446,
|
|
310
|
+
memfd_secret: 447,
|
|
311
|
+
process_mrelease: 448,
|
|
312
|
+
futex_waitv: 449,
|
|
313
|
+
set_mempolicy_home_node: 450,
|
|
314
|
+
cachestat: 451,
|
|
315
|
+
fchmodat2: 452,
|
|
316
|
+
map_shadow_stack: 453,
|
|
317
|
+
futex_wake: 454,
|
|
318
|
+
futex_wait: 455,
|
|
319
|
+
futex_requeue: 456,
|
|
320
|
+
statmount: 457,
|
|
321
|
+
listmount: 458,
|
|
322
|
+
lsm_get_self_attr: 459,
|
|
323
|
+
lsm_set_self_attr: 460,
|
|
324
|
+
lsm_list_modules: 461,
|
|
325
|
+
mseal: 462,
|
|
326
|
+
setxattrat: 463,
|
|
327
|
+
getxattrat: 464,
|
|
328
|
+
listxattrat: 465,
|
|
329
|
+
removexattrat: 466,
|
|
330
|
+
open_tree_attr: 467,
|
|
331
|
+
file_getattr: 468,
|
|
332
|
+
file_setattr: 469,
|
|
333
|
+
listns: 470,
|
|
334
|
+
rseq_slice_yield: 471
|
|
284
335
|
}
|
|
@@ -337,5 +337,57 @@ X32_MODE_BIT = 0x40000000
|
|
|
337
337
|
pkey_mprotect: 329,
|
|
338
338
|
pkey_alloc: 330,
|
|
339
339
|
pkey_free: 331,
|
|
340
|
-
statx: 332
|
|
340
|
+
statx: 332,
|
|
341
|
+
io_pgetevents: 333,
|
|
342
|
+
rseq: 334,
|
|
343
|
+
uretprobe: 335,
|
|
344
|
+
uprobe: 336,
|
|
345
|
+
pidfd_send_signal: 424,
|
|
346
|
+
io_uring_setup: 425,
|
|
347
|
+
io_uring_enter: 426,
|
|
348
|
+
io_uring_register: 427,
|
|
349
|
+
open_tree: 428,
|
|
350
|
+
move_mount: 429,
|
|
351
|
+
fsopen: 430,
|
|
352
|
+
fsconfig: 431,
|
|
353
|
+
fsmount: 432,
|
|
354
|
+
fspick: 433,
|
|
355
|
+
pidfd_open: 434,
|
|
356
|
+
clone3: 435,
|
|
357
|
+
close_range: 436,
|
|
358
|
+
openat2: 437,
|
|
359
|
+
pidfd_getfd: 438,
|
|
360
|
+
faccessat2: 439,
|
|
361
|
+
process_madvise: 440,
|
|
362
|
+
epoll_pwait2: 441,
|
|
363
|
+
mount_setattr: 442,
|
|
364
|
+
quotactl_fd: 443,
|
|
365
|
+
landlock_create_ruleset: 444,
|
|
366
|
+
landlock_add_rule: 445,
|
|
367
|
+
landlock_restrict_self: 446,
|
|
368
|
+
memfd_secret: 447,
|
|
369
|
+
process_mrelease: 448,
|
|
370
|
+
futex_waitv: 449,
|
|
371
|
+
set_mempolicy_home_node: 450,
|
|
372
|
+
cachestat: 451,
|
|
373
|
+
fchmodat2: 452,
|
|
374
|
+
map_shadow_stack: 453,
|
|
375
|
+
futex_wake: 454,
|
|
376
|
+
futex_wait: 455,
|
|
377
|
+
futex_requeue: 456,
|
|
378
|
+
statmount: 457,
|
|
379
|
+
listmount: 458,
|
|
380
|
+
lsm_get_self_attr: 459,
|
|
381
|
+
lsm_set_self_attr: 460,
|
|
382
|
+
lsm_list_modules: 461,
|
|
383
|
+
mseal: 462,
|
|
384
|
+
setxattrat: 463,
|
|
385
|
+
getxattrat: 464,
|
|
386
|
+
listxattrat: 465,
|
|
387
|
+
removexattrat: 466,
|
|
388
|
+
open_tree_attr: 467,
|
|
389
|
+
file_getattr: 468,
|
|
390
|
+
file_setattr: 469,
|
|
391
|
+
listns: 470,
|
|
392
|
+
rseq_slice_yield: 471
|
|
341
393
|
}.tap { |h| h.keys.each { |k| h[:"x32_#{k}"] = h[k] | X32_MODE_BIT } }
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
mq_timedreceive: 280,
|
|
283
283
|
mq_notify: 281,
|
|
284
284
|
mq_getsetattr: 282,
|
|
285
|
-
|
|
285
|
+
kexec_load: 283,
|
|
286
286
|
waitid: 284,
|
|
287
287
|
add_key: 286,
|
|
288
288
|
request_key: 287,
|
|
@@ -381,5 +381,86 @@
|
|
|
381
381
|
pkey_mprotect: 380,
|
|
382
382
|
pkey_alloc: 381,
|
|
383
383
|
pkey_free: 382,
|
|
384
|
-
statx: 383
|
|
384
|
+
statx: 383,
|
|
385
|
+
arch_prctl: 384,
|
|
386
|
+
io_pgetevents: 385,
|
|
387
|
+
rseq: 386,
|
|
388
|
+
semget: 393,
|
|
389
|
+
semctl: 394,
|
|
390
|
+
shmget: 395,
|
|
391
|
+
shmctl: 396,
|
|
392
|
+
shmat: 397,
|
|
393
|
+
shmdt: 398,
|
|
394
|
+
msgget: 399,
|
|
395
|
+
msgsnd: 400,
|
|
396
|
+
msgrcv: 401,
|
|
397
|
+
msgctl: 402,
|
|
398
|
+
clock_gettime64: 403,
|
|
399
|
+
clock_settime64: 404,
|
|
400
|
+
clock_adjtime64: 405,
|
|
401
|
+
clock_getres_time64: 406,
|
|
402
|
+
clock_nanosleep_time64: 407,
|
|
403
|
+
timer_gettime64: 408,
|
|
404
|
+
timer_settime64: 409,
|
|
405
|
+
timerfd_gettime64: 410,
|
|
406
|
+
timerfd_settime64: 411,
|
|
407
|
+
utimensat_time64: 412,
|
|
408
|
+
pselect6_time64: 413,
|
|
409
|
+
ppoll_time64: 414,
|
|
410
|
+
io_pgetevents_time64: 416,
|
|
411
|
+
recvmmsg_time64: 417,
|
|
412
|
+
mq_timedsend_time64: 418,
|
|
413
|
+
mq_timedreceive_time64: 419,
|
|
414
|
+
semtimedop_time64: 420,
|
|
415
|
+
rt_sigtimedwait_time64: 421,
|
|
416
|
+
futex_time64: 422,
|
|
417
|
+
sched_rr_get_interval_time64: 423,
|
|
418
|
+
pidfd_send_signal: 424,
|
|
419
|
+
io_uring_setup: 425,
|
|
420
|
+
io_uring_enter: 426,
|
|
421
|
+
io_uring_register: 427,
|
|
422
|
+
open_tree: 428,
|
|
423
|
+
move_mount: 429,
|
|
424
|
+
fsopen: 430,
|
|
425
|
+
fsconfig: 431,
|
|
426
|
+
fsmount: 432,
|
|
427
|
+
fspick: 433,
|
|
428
|
+
pidfd_open: 434,
|
|
429
|
+
clone3: 435,
|
|
430
|
+
close_range: 436,
|
|
431
|
+
openat2: 437,
|
|
432
|
+
pidfd_getfd: 438,
|
|
433
|
+
faccessat2: 439,
|
|
434
|
+
process_madvise: 440,
|
|
435
|
+
epoll_pwait2: 441,
|
|
436
|
+
mount_setattr: 442,
|
|
437
|
+
quotactl_fd: 443,
|
|
438
|
+
landlock_create_ruleset: 444,
|
|
439
|
+
landlock_add_rule: 445,
|
|
440
|
+
landlock_restrict_self: 446,
|
|
441
|
+
memfd_secret: 447,
|
|
442
|
+
process_mrelease: 448,
|
|
443
|
+
futex_waitv: 449,
|
|
444
|
+
set_mempolicy_home_node: 450,
|
|
445
|
+
cachestat: 451,
|
|
446
|
+
fchmodat2: 452,
|
|
447
|
+
map_shadow_stack: 453,
|
|
448
|
+
futex_wake: 454,
|
|
449
|
+
futex_wait: 455,
|
|
450
|
+
futex_requeue: 456,
|
|
451
|
+
statmount: 457,
|
|
452
|
+
listmount: 458,
|
|
453
|
+
lsm_get_self_attr: 459,
|
|
454
|
+
lsm_set_self_attr: 460,
|
|
455
|
+
lsm_list_modules: 461,
|
|
456
|
+
mseal: 462,
|
|
457
|
+
setxattrat: 463,
|
|
458
|
+
getxattrat: 464,
|
|
459
|
+
listxattrat: 465,
|
|
460
|
+
removexattrat: 466,
|
|
461
|
+
open_tree_attr: 467,
|
|
462
|
+
file_getattr: 468,
|
|
463
|
+
file_setattr: 469,
|
|
464
|
+
listns: 470,
|
|
465
|
+
rseq_slice_yield: 471
|
|
385
466
|
}
|
|
@@ -361,5 +361,34 @@
|
|
|
361
361
|
faccessat2: 439,
|
|
362
362
|
process_madvise: 440,
|
|
363
363
|
epoll_pwait2: 441,
|
|
364
|
-
mount_setattr: 442
|
|
364
|
+
mount_setattr: 442,
|
|
365
|
+
quotactl_fd: 443,
|
|
366
|
+
landlock_create_ruleset: 444,
|
|
367
|
+
landlock_add_rule: 445,
|
|
368
|
+
landlock_restrict_self: 446,
|
|
369
|
+
memfd_secret: 447,
|
|
370
|
+
process_mrelease: 448,
|
|
371
|
+
futex_waitv: 449,
|
|
372
|
+
set_mempolicy_home_node: 450,
|
|
373
|
+
cachestat: 451,
|
|
374
|
+
fchmodat2: 452,
|
|
375
|
+
map_shadow_stack: 453,
|
|
376
|
+
futex_wake: 454,
|
|
377
|
+
futex_wait: 455,
|
|
378
|
+
futex_requeue: 456,
|
|
379
|
+
statmount: 457,
|
|
380
|
+
listmount: 458,
|
|
381
|
+
lsm_get_self_attr: 459,
|
|
382
|
+
lsm_set_self_attr: 460,
|
|
383
|
+
lsm_list_modules: 461,
|
|
384
|
+
mseal: 462,
|
|
385
|
+
setxattrat: 463,
|
|
386
|
+
getxattrat: 464,
|
|
387
|
+
listxattrat: 465,
|
|
388
|
+
removexattrat: 466,
|
|
389
|
+
open_tree_attr: 467,
|
|
390
|
+
file_getattr: 468,
|
|
391
|
+
file_setattr: 469,
|
|
392
|
+
listns: 470,
|
|
393
|
+
rseq_slice_yield: 471
|
|
365
394
|
}
|
data/lib/seccomp-tools/dumper.rb
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'os'
|
|
4
3
|
require 'timeout'
|
|
5
4
|
|
|
6
5
|
require 'seccomp-tools/logger'
|
|
7
|
-
require 'seccomp-tools/ptrace' if OS.linux?
|
|
8
|
-
require 'seccomp-tools/syscall'
|
|
9
6
|
require 'seccomp-tools/util'
|
|
7
|
+
require 'seccomp-tools/ptrace' if SeccompTools::Util.linux?
|
|
8
|
+
require 'seccomp-tools/syscall'
|
|
10
9
|
|
|
11
10
|
module SeccompTools
|
|
12
11
|
# Dump seccomp-bpf using ptrace of binary.
|
|
13
12
|
module Dumper
|
|
14
13
|
# Whether the dumper is supported.
|
|
15
14
|
# Dumper works based on ptrace, so we need the platform to be Linux.
|
|
16
|
-
SUPPORTED =
|
|
15
|
+
SUPPORTED = Util.linux?
|
|
17
16
|
|
|
18
17
|
module_function
|
|
19
18
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
# encoding: ascii-8bit
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
require 'os'
|
|
5
|
-
|
|
6
4
|
require 'seccomp-tools/const'
|
|
7
5
|
require 'seccomp-tools/util'
|
|
8
|
-
require 'seccomp-tools/ptrace' if
|
|
6
|
+
require 'seccomp-tools/ptrace' if SeccompTools::Util.linux?
|
|
9
7
|
|
|
10
8
|
module SeccompTools
|
|
11
9
|
# Record syscall number, arguments, return value.
|
data/lib/seccomp-tools/util.rb
CHANGED
|
@@ -16,6 +16,12 @@ module SeccompTools
|
|
|
16
16
|
.sort
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
# Whether the host operating system is Linux, where the +ptrace+-based dumping works.
|
|
20
|
+
# @return [Boolean]
|
|
21
|
+
def linux?
|
|
22
|
+
RbConfig::CONFIG['host_os'].include?('linux')
|
|
23
|
+
end
|
|
24
|
+
|
|
19
25
|
# Detect system architecture.
|
|
20
26
|
# @return [Symbol]
|
|
21
27
|
# One of {supported_archs}, or +:unknown+ if the host CPU is not supported.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: seccomp-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- david942j
|
|
@@ -121,26 +121,6 @@ dependencies:
|
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: '0'
|
|
124
|
-
- !ruby/object:Gem::Dependency
|
|
125
|
-
name: os
|
|
126
|
-
requirement: !ruby/object:Gem::Requirement
|
|
127
|
-
requirements:
|
|
128
|
-
- - "~>"
|
|
129
|
-
- !ruby/object:Gem::Version
|
|
130
|
-
version: '1.1'
|
|
131
|
-
- - ">="
|
|
132
|
-
- !ruby/object:Gem::Version
|
|
133
|
-
version: 1.1.1
|
|
134
|
-
type: :runtime
|
|
135
|
-
prerelease: false
|
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
-
requirements:
|
|
138
|
-
- - "~>"
|
|
139
|
-
- !ruby/object:Gem::Version
|
|
140
|
-
version: '1.1'
|
|
141
|
-
- - ">="
|
|
142
|
-
- !ruby/object:Gem::Version
|
|
143
|
-
version: 1.1.1
|
|
144
124
|
- !ruby/object:Gem::Dependency
|
|
145
125
|
name: racc
|
|
146
126
|
requirement: !ruby/object:Gem::Requirement
|