diff options
| author | Philipp Stephani | 2021-10-09 19:39:31 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2021-10-09 19:39:31 +0200 |
| commit | b497add9719dac16696f64d5a551d2b813f0c825 (patch) | |
| tree | 2f1318216462ae7b660ed12b802320fbeecf1c37 /lib-src/seccomp-filter.c | |
| parent | 75d9fbec8853c2040bbb0d5a447894cca86b9df9 (diff) | |
| download | emacs-b497add9719dac16696f64d5a551d2b813f0c825.tar.gz emacs-b497add9719dac16696f64d5a551d2b813f0c825.zip | |
Fix Seccomp filter for newer GNU/Linux systems (Bug#51073).
On some systems, process startup calls prctl(PR_CAPBSET_READ) via
'cap_get_bound'. We can just return EINVAL.
* lib-src/seccomp-filter.c (main): Add a rule for
prctl(PR_CAPBSET_READ, ...).
Diffstat (limited to 'lib-src/seccomp-filter.c')
| -rw-r--r-- | lib-src/seccomp-filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c index d378e0b0278..e7496053a86 100644 --- a/lib-src/seccomp-filter.c +++ b/lib-src/seccomp-filter.c | |||
| @@ -351,6 +351,8 @@ main (int argc, char **argv) | |||
| 351 | calls at startup time to set up thread-local storage. */ | 351 | calls at startup time to set up thread-local storage. */ |
| 352 | RULE (SCMP_ACT_ALLOW, SCMP_SYS (execve)); | 352 | RULE (SCMP_ACT_ALLOW, SCMP_SYS (execve)); |
| 353 | RULE (SCMP_ACT_ALLOW, SCMP_SYS (set_tid_address)); | 353 | RULE (SCMP_ACT_ALLOW, SCMP_SYS (set_tid_address)); |
| 354 | RULE (SCMP_ACT_ERRNO (EINVAL), SCMP_SYS (prctl), | ||
| 355 | SCMP_A0_32 (SCMP_CMP_EQ, PR_CAPBSET_READ)); | ||
| 354 | RULE (SCMP_ACT_ALLOW, SCMP_SYS (arch_prctl), | 356 | RULE (SCMP_ACT_ALLOW, SCMP_SYS (arch_prctl), |
| 355 | SCMP_A0_32 (SCMP_CMP_EQ, ARCH_SET_FS)); | 357 | SCMP_A0_32 (SCMP_CMP_EQ, ARCH_SET_FS)); |
| 356 | RULE (SCMP_ACT_ERRNO (EINVAL), SCMP_SYS (arch_prctl), | 358 | RULE (SCMP_ACT_ERRNO (EINVAL), SCMP_SYS (arch_prctl), |