Skip to content

Commit 717181e

Browse files
committed
Add a seccomp rule for the rseq syscall
Executables built with a recent glibc will always try this syscall on startup. ENOSYS will inform them that it is unavailable.
1 parent db4d48e commit 717181e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/seccomp/policy/DefaultPolicy.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ void DefaultPolicy::addExecutionControlRules(bool allowFork) {
8686
rules_.emplace_back(SeccompRule(syscall, action::ActionTrace()));
8787
}
8888

89+
for (const auto& syscall: {"rseq"}) {
90+
rules_.emplace_back(SeccompRule(syscall, action::ActionErrno(ENOSYS)));
91+
}
92+
8993
if (allowFork) {
9094
allowSyscalls({"fork"});
9195
}

0 commit comments

Comments
 (0)