Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate Syscalls to Block with seccomp-bpf #106

Open
MarkKoz opened this issue Apr 8, 2021 · 0 comments
Open

Investigate Syscalls to Block with seccomp-bpf #106

MarkKoz opened this issue Apr 8, 2021 · 0 comments
Labels
area: nsjail Related to NsJail and its configuration priority: 3 - low status: planning Discussing details type: feature New feature or request

Comments

@MarkKoz
Copy link
Member

MarkKoz commented Apr 8, 2021

A long time ago I made a rough draft of a filter:

seccomp_string: "KILL {"
seccomp_string: "   execve,"
seccomp_string: "   execveat,"
seccomp_string: "   shmget,"
seccomp_string: "   shmat,"
seccomp_string: "   shmdt,"
seccomp_string: "   shmctl,"
seccomp_string: "   fork,"
seccomp_string: "   clone"
seccomp_string: "}"
seccomp_string: "DEFAULT ALLOW"

However, because nsjail applies the filter to the forked process before it changes from nsjail to Python, blocking some syscalls may interfere with the functionality of nsjail. The most important one is execve, which is what changes the fork from nsjail to Python, so it would have to be excluded from the above filter.

The rest of the syscalls above are merely redundancies given the current nsjail configuration. The shared memory syscalls are just there as insurance since the exploit was already fixed long ago by not mounting the stuff needed for it to work. fork and clone are redundant since the PID limit is 1 anyway.

Any other ideas for syscalls to filter are welcome.

@MarkKoz MarkKoz added type: feature New feature or request status: planning Discussing details area: nsjail Related to NsJail and its configuration priority: 2 - normal priority: 3 - low and removed priority: 2 - normal labels Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nsjail Related to NsJail and its configuration priority: 3 - low status: planning Discussing details type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant