-
Notifications
You must be signed in to change notification settings - Fork 588
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
modif: keep plugdev group unless nou2f is used #6664
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make hardware tokens available for ordinary users, some distributions
include a udev rule to make the corresponding entry in /dev/... available for
users belonging to a specific group.
Which group?
It would likely be better to just whitelist the group(s) if nou2f
is not
used.
For example, see:
Also, does the issue still happen with
firejail-git?
9ffcbfc
to
aa0a69a
Compare
Thanks for the feedback. The group in question is "users" on Void Linux. The issue is also present on the latest build, but based on your example I've implemented a fix to keep that group: 8576b7d |
No problem.
That seems like a pretty generic group name. What else is it intended to allow access to? What is the output of the following: find /dev -group users | LC_ALL=C sort -u |
Void Linux is now using I've updated and tested the code accordingly, by keeping group |
Nice, glad to see that it's more specific now.
Why change from Giving access to all of /dev/input seems rather broad. What is the output of the following command?
It's unclear to me where exactly these devices appear in /dev. Also, note that this PR currently breaks test-seccomp-extra: |
The YubiKey appears as the following device nodes:
Usually permission to these devices is given by the session manager (logind) but udev does also change the group permissions so users without a session manager can still access them.
I thought that users who grant access to input devices are also likely ok with firejail also giving them access to plugdev devices, for me they seem very similar. |
Thanks for the details.
I see what you mean, but for the sake of consistency I'd just use Also, do the security keys actually show up in /dev/input? I thought they only Ideally they would indeed appear in a more specific path (like /dev/tpm for TPM Anyway, feel free to open a discussion about |
I have now switched back to nou2f. I did some testing, including whether it is detecting the YubiKey when the sandbox is already launched and if it works when pcscd is running, both working fine.
Only in
At least on my system, only some devices are accessed via The build pipeline still fails, do you know how to further debug this?
|
To make hardware tokens available for ordinary users, some distributions include a udev rule to make the corresponding entry in /dev available for users belonging to a specific group. In the case of Void Linux, it now uses the `plugdev` group for FIDO2 access[1] and when using a YubiKey, it appears as the following device nodes: $ find /dev -group plugdev | LC_ALL=C sort -u /dev/hidraw1 /dev/hidraw2 $ ls -l /dev/hidraw1 /dev/hidraw2 crw-rw---- 1 root plugdev 240, 1 Mar 7 19:53 /dev/hidraw1 crw-rw---- 1 root plugdev 240, 2 Mar 7 19:53 /dev/hidraw2 [1] void-linux/void-packages#54519
Comparing a sucessful run against a failed run (see From https://github.com/netblue30/firejail/actions/runs/13737961110/job/38423882671:
From https://github.com/netblue30/firejail/actions/runs/13731504189/job/38423927322:
Also added some details to the commit message; feel free to edit it if you |
To make hardware tokens available for ordinary users, some distributions include a udev rule to make the corresponding entry in /dev/... available for users belonging to a specific group.
The options
noroot
andnogroups
currently break this behavior.This PR implements a fix that checks whether
browser-disable-u2f
is set tono
in order to disable these two options.