mirror of
https://github.com/netblue30/firejail.git
synced 2026-09-10 17:40:36 -06:00
[GH-ISSUE #6195] landlock: "Invalid argument" error when creating the ruleset #3217
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#3217
Loading…
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?
Originally created by @curiosityseeker on GitHub (Feb 5, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6195
Description
After adding several Landlock rules I'm seeing errors after today's update of firejail-git
Steps to Reproduce
Steps to reproduce the behavior
Add the following rules to ~/.config/firejail/firefox:
Expected behavior
Until yesterday I haven't seen Landlock-related errors.
Actual behavior
Environment
1c9494769c@kmk3 commented on GitHub (Feb 6, 2024):
Cannot reproduce it on Artix with:
What is the command-line used?
What is the kernel version?
PR #6187 has Landlock-related changes but it did not change the full ruleset.
Can you try to bisect?
@ghost commented on GitHub (Feb 6, 2024):
I can (fully) reproduce on my Arch Linux. Will try to find some time to bisect.
@curiosityseeker commented on GitHub (Feb 6, 2024):
Nothing special. Just
firefoxwith the default profile and the additions to the local profile as mentioned above.6.7.3-arch1-2
The latest 2 commits didn't change anything:
@ghost commented on GitHub (Feb 6, 2024):
Bisecting shows
github.com/netblue30/firejail@760f50f78aas the first commit where this starts to show. As it happens that is the commit that introducedlandlock.enforce. Anything after that doesn't affect this (up and including latest git build).@kmk3 commented on GitHub (Feb 6, 2024):
@glitsj16 on Feb 6:
Are the firefox profile changes needed to reproduce the errors (other than
landlock.enforce/landlock)? If so, which line(s) seem to cause them?Could you run the following in
760f50fand post the output?@kmk3 commented on GitHub (Feb 6, 2024):
@curiosityseeker on Feb 6:
Does it work without the profile changes (but with
landlock.enforce)?Could you run the following and post the output in a gist?
At least from the
Active seccomp files:line until the end.@ghost commented on GitHub (Feb 6, 2024):
@kmk3
Negative. The errors show, even when there's only one line in the firefox.local:
include landlock-common.inc.Here are the logs.
test 01 :: including landlock-common.inc
fj.6195.debug.01.log
https://gist.github.com/glitsj16/09e5453d0d3d36d6be5be936a8384831
Reproducable cfr. OP's report.
test 02 :: WITHOUT including landlock-common.inc
fj.6195.debug.02.log
https://gist.github.com/glitsj16/839ef34908016c663c38ef8fce3a2827
No surprises here...
@kmk3 commented on GitHub (Feb 7, 2024):
The only thing that I could imagine being an invalid argument in that syscall
was if a struct had some wrong value/uninitialized field. And indeed, after
looking at linux/landlock.h I noticed that there was a new field. I was able
to reproduce it after upgrading linux-api-headers and initializing the structs
to 0 fixed the issue.
It should be fixed in #6200.
@curiosityseeker @glitsj16
Thanks for reporting/testing/bisecting.
@ghost commented on GitHub (Feb 7, 2024):
@kmk3
Confirmed, just checked with a firejail build carrying the patch from #6200. All fine now. Thanks for your speedy and intense detective-work on this issue!
@curiosityseeker commented on GitHub (Feb 8, 2024):
Cool! I can confirm that that commit fixed the Issue:
32 Landlock rules initialized in 0.23 msThanks a lot, @kmk3 !