mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1381] firefox: Yubico u2f token is not detected (private-dev) #943
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#943
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?
Originally created by @BafDyce on GitHub (Jul 14, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1381
I have a u2f token from Yubico (https://www.yubico.com/products/yubikey-hardware/fido-u2f-security-key/) and I have installed the U2F Support plugin for Firefox.
I'm running Arch and I have configured the necessary udev rules. When launching Firefox directly (without firejail), the U2F token works as expected, when I start firefox with firejail, it cannot communicate with the hardware token.
The plugin comes with a binary (
u2f) which communicates with the token. However, this binary cannot communicate with the token. The token itself registers just as a Human Interface device (like keyboard, mouse, etc.) and can be seen from inside the jail:(Note: This output is identical inside and outside of the jail)
It seems like there's a communication problem, however I don't know where/what exactly. I would be willing to (debug &) fix this myself, however I don't know where I should start. Even if I run firefox via
firejail --debug firefoxI don't get any helpful output from firejail's log. Debugging (strace for example) doesn't work in the jail either..It also cannot be due to some blocked syscall since then the u2f would fail with something like "Bad syscall" or something similar.
@smitsohu commented on GitHub (Jul 14, 2017):
Can you try if it works with
firejail --ignore=private-dev firefox?2nd EDIT: Looking at it again, a noexec flag possibly prevents execution of
u2f. You could try runningfindmnt ~/.mozillafrom inside the Firefox jail, it will show you which mount flags are set for that folder (if the output has several lines, check only for the last one).@BafDyce commented on GitHub (Jul 18, 2017):
firejail --ignore=private-dev firefoxworks!About your 2nd edit:
This was my first assumption too, however I was able to execute the u2f executable (by joining into the jail and executing it). Also since it works with your suggested command, it seems like the noexec flag is not enforced correctly? -> Is this another bug? (when I copy the u2f executable to /home/user, I am not allowed to execute it (
bash: /home/user/u2f: Permission denied))Ouput of
findmnt ~/.mozillaWhich looks correct, as the hosts' /home is mounted on /dev/mapper/vg-home.
@smitsohu commented on GitHub (Jul 18, 2017):
@BafDyce In the moment whitelisted files and folders inherit their mount flags only from the underlying file system, and the Firejail
noexecis indeed without effect for whitelisted locations.noexecworks as expected in your /home/user because that folder is probably not whitelisted/has no whitelisted parent.There are many pitfalls with the
noexecoption currently, and the manual is very right to advise caution:@jvican commented on GitHub (Jul 29, 2017):
Hello. I had this problem too. Would like to confirm that
--ignore=private-devfixed it for me.@ibahnasy commented on GitHub (Jul 10, 2021):
On Ubuntu 21.04
--ignore=private-devdoesn't solve the issue. Any other suggestion?@rusty-snake commented on GitHub (Jul 10, 2021):
See:
And so on.
ignore private-dev+ignore nou2fbrowser-disable-u2f noin/etc/firejail/firejail.configsudo sh -c "echo 'browser-disable-u2f no' >> /etc/firejail/firejail.config"sudo sed -i 's/# browser-disable-u2f yes/browser-disable-u2f no/' /etc/firejail/firejail.config@ibahnasy commented on GitHub (Jul 10, 2021):
Actually
ignore nou2fonly made it works, thanks!@RubenGarcia commented on GitHub (Jul 29, 2021):
I also have the problem on
ubuntu 18.04.5 with firefox 90.0
@rusty-snake commented on GitHub (Jul 29, 2021):
The firejail version is relevant to fix the problem (the firefox version is irrelevant). Since Ubu18.04 has 0.9.52 I guess you use this. Actually everything is already explained or linked here but that's your command:
ignore private-dev.@WhyNotHugo commented on GitHub (Nov 25, 2021):
Adding
ignore nou2ftofirefox.localworks.What's the reason for disabling U2F keys for Firefox by default? I can't image a scenario where someone would want them to NOT work, especially since they require physical interaction to operate anyway.
@rusty-snake commented on GitHub (Nov 26, 2021):
My guess is that this is because
/dev/hidraw?is more then just u2f.