mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6364] hashcat: failure with private-dev & private-bin #3250
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#3250
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 @schrotthaufen on GitHub (Jun 2, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6364
Description
The default profile for hashcat uses, private-bin, and private-dev, which break hashcat.
I have a AMD RX 7900 XT GPU.
Steps to Reproduce
LC_ALL=C firejail hashcat -b -m 1000Expected behavior
hashcat starts working.
Actual behavior
private-bin hashcat: hashcat throws an error, and quits:/usr/local/bin/OpenCL/: No such file or directoryprivate-dev: hashcat throws an error, and quits:No devices found/left.Behavior without a profile
hashcat works as expected.
Additional context
I think
/dev/kfdis required to makeprivate-devwork, but if I pass--whitelist=/dev/kfd, the/dev/directory is empty.Environment
Compile time support:
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)@rusty-snake commented on GitHub (Jun 2, 2024):
Related: https://github.com/netblue30/firejail/issues/6148
@ghost commented on GitHub (Jun 2, 2024):
Thanks for reporting. Sadly my current hardware is partly broken so I can't reliably test hashcat. I do have a few questions/remarks.
Do you have binaries installed under that
/usr/local/bin/OpenCL/path (or under /usr/bin)? Just asking because instead of droppingprivate-binwe might be able to keep that and add the needed binary name(s) to it.After installing the hashcat package and running
hashcat -hI noticed it creates only two directories under ${HOME}:${HOME}/.cache/hashcat${HOME}/.local/share/hashcatThe referenced
${HOME}/.hashcatdoes not exist on my box after running the app (unsandboxed). Do you have that dir on your Arch Linux machine?This isn't directly related to this issue IMO, but it would be nice to update the profile accordingly if we can check/confirm these discrepancies.
Regards
@schrotthaufen commented on GitHub (Jun 2, 2024):
Hashcat is installed to
/usr/bin/, but I have firejail symlinks in/usr/local/bin/(generated withfirecfg). When I runfirejail /usr/bin/hashcat -b -m 1000, I only get theNo devices found/left.error. Maybe the OpenCL path issue is because the sandboxed hashcat can´t find/usr/share/hashcat/OpenCL/, and so it tries to find it next to/usr/local/bin/hashcat.Yes, this directory exists on my box, and contains the potfile, session data, etc.
It seems
${HOME}/.local/share/hashcatis the new location for${HOME}/.hashcat.@ghost commented on GitHub (Jun 2, 2024):
Thanks. We'll better keep that in then for backward-compatibility.
@hlein commented on GitHub (Sep 3, 2025):
FYI this is still present; I think I have workarounds.
hashcat's./src/backend.c:generate_source_kernel_filenameconstructs various paths-to-kernel-files based onshared_dir, which normally is:But (based on the error) is I think calculated to be
/usr/local/binwhen we run it underfirejail.When I disable
private-bin hashcat, that error goes away:And the final error is I think caused by needing group
videoto access/dev/nvidia*on many distros including mine (Gentoo). It goes away if Iignore novideo.I'll submit a PR making both those changes.
But this won't fix all
hashcatissues like https://github.com/netblue30/firejail/issues/6148 where the user couldn't load hashes in/tmp/due toprivate-tmpbeing on by default.@kmk3 commented on GitHub (Sep 7, 2025):
Make sure to always use the full path to the program to avoid
firejail-in-firejail issues (see #2877).
This breaks hashcat in all of the above examples:
vs
Does it work with the full path and without
private-bin?What is the output of the following?