Skip to content

Commit 54be775

Browse files
committed
Disable rseq properly instead of allowing it
1 parent 4541014 commit 54be775

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/seccomp/policy/DefaultPolicy.cc

+5-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ void DefaultPolicy::addExecutionControlRules(bool allowFork) {
4444
"clock_nanosleep",
4545
"open",
4646
"epoll_create1",
47-
"openat",
48-
"rseq"});
47+
"openat"});
4948

5049
rules_.emplace_back(SeccompRule(
5150
"set_thread_area", action::ActionTrace([](auto& /* tracee */) {
@@ -87,6 +86,10 @@ void DefaultPolicy::addExecutionControlRules(bool allowFork) {
8786
rules_.emplace_back(SeccompRule(syscall, action::ActionTrace()));
8887
}
8988

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

0 commit comments

Comments
 (0)