mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #5315] [MERGED] Add Landlock support to Firejail #5441
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#5441
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/netblue30/firejail/pull/5315
Author: @ChrysoliteAzalea
Created: 8/15/2022
Status: ✅ Merged
Merged: 8/29/2022
Merged by: @netblue30
Base:
master← Head:landlock📝 Commits (5)
61b1544Landlock support has been added.ba828beLandlock functions are added to the code of Firejail, removing the dependency on tinyLL877fc99Update quotation marks in src/zsh_completion/_firejail.in460fa7aProposed fixes.c6d7474tinyLL has been removed as it's no longer needed📊 Changes
15 files changed (+447 additions, -5 deletions)
View changed files
📝
config.mk.in(+2 -1)📝
configure(+16 -0)📝
configure.ac(+9 -1)📝
contrib/vim/syntax/firejail.vim(+1 -1)📝
src/bash_completion/firejail.bash_completion.in(+16 -0)📝
src/firejail/firejail.h(+26 -0)➕
src/firejail/landlock.c(+79 -0)📝
src/firejail/main.c(+81 -0)📝
src/firejail/profile.c(+84 -0)📝
src/firejail/sandbox.c(+25 -2)📝
src/firejail/usage.c(+6 -0)📝
src/firejail/util.c(+4 -0)📝
src/man/firejail-profile.txt(+29 -0)📝
src/man/firejail.txt(+63 -0)📝
src/zsh_completion/_firejail.in(+6 -0)📄 Description
Hello everyone!
In Linux kernel 5.13 version, a new LSM was added called "Landlock" that allows unprivileged processes to impose filesystem access self-restrictions (similar to the "unveil" in OpenBSD). It's similar to another Linux kernel feature -- seccomp, that allows unprivileged processes to impose system call access self-restrictions. I propose using this LSM in Firejail, and I've added support for four options (for both command-line and profiles) that create and populate the ruleset. I think it's a feature worth having, if we plan to make Firejail usable without SUID bit.
Landlock support was proposed in issues #3992 and #5269.
Enabling Landlock self-restriction requires a process to have either CAP_SYS_ADMIN in an effective capability set, or the "No New Privileges" enabled.
P.S. I'd like to note, that this PR uses my tinyLL library that has to be built before the version of Firejail in this PR, and has to be located in a directory like /usr/lib.Necessary functions have been added to Firejail's code.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.