-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
DRAFT: Add landlock support #575
Conversation
This looks much more maintainable then the seccomp filters. So could we just drop the seecomp filter and move to landlock? With the ability to restrict on a path-basis, this would also enable the use of dbus and stop crippling the user experience in strict sandbox mode. |
While this certainly provides a simple way to isolate the filesystem, it does not address the kernel attack surface at all. For that we need to filter system calls as well. In order to make a complete sandbox that does not block any features, we would need to split the zathura process and have one sandboxed renderer process that is managed through IPC by a primary zathura process (like openssh and modern browsers do it). |
For now I kept some of the currently unused code in case we do use it for an alternative sandbox version. Also credit for most of the code goes to @l0kod and his documentation. |
I am not sure if seccomp is actually a maintainable approach in the long run. The last years have shown that it requires whitelisting of platform specific syscalls and they change without notice depending on the dependencies. It would potentially make more sense to provide flatpak images (or comparable) for some sandboxing without breaking features and a separate zathura-seccomp binary for people that want it.
The likely hood of that being merged is close to 0. |
Thanks for the review
I see what you mean and frankly I did not expect this feature to require this many adjustments when I first implemented it. Though to me it seems manageable to address upcoming syscall changes introduced by dependencies by addressing new kernel syscalls with the ERRNO_RULE like this since those are usually the syscalls that are used by newer version of dependent libraries and they always have fallbacks for older kernels included.
A separate binary would address issues such as the default gtk dbus socket, so maybe this is a more reasonable approach.
Can you please elaborate on this? Do you mean you don't see a feature like sandboxed-api to make it into projects like poppler or are you opposed to having this implemented as part of zathura? edit: |
Github still shows "Changes Requested" but I believe all issues were addressed. |
Haven't had the the time to test the changes yet. |
This adds landlock support to the sandbox feature.
While the seccomp filter should already prevent writing to files, this adds another safeguard to prevent file modifications.
Todo: