[GH-ISSUE #3254] seccomp with filter based on flags argument of syscall #2042

Closed
opened 2026-05-05 08:42:57 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @s3rj1k on GitHub (Feb 27, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3254

Can firejail block Open syscall with only specific argument, like O_RDWR?

If not can you please suggest another approach, for testing purposes, that can block specific syscall argument when running arbitrarily elf?

Originally created by @s3rj1k on GitHub (Feb 27, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3254 Can firejail block `Open` syscall with only specific argument, like `O_RDWR`? If not can you please suggest another approach, for testing purposes, that can block specific syscall argument when running arbitrarily elf?
Author
Owner

@topimiettinen commented on GitHub (Feb 27, 2020):

This would be doable with seccomp filters in general, as the filters have access to registers which contain system call parameters and then logical and arithmetic operations can be done with them. But Firejail constructs filters which can only block or allow system calls completely, finer control isn't available. You could modify Firejail to load your own seccomp filter to do that.

<!-- gh-comment-id:592105911 --> @topimiettinen commented on GitHub (Feb 27, 2020): This would be doable with seccomp filters in general, as the filters have access to registers which contain system call parameters and then logical and arithmetic operations can be done with them. But Firejail constructs filters which can only block or allow system calls completely, finer control isn't available. You could modify Firejail to load your own seccomp filter to do that.
Author
Owner

@s3rj1k commented on GitHub (Feb 27, 2020):

Hmm, thanks @topimiettinen

<!-- gh-comment-id:592147135 --> @s3rj1k commented on GitHub (Feb 27, 2020): Hmm, thanks @topimiettinen
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2042
No description provided.