mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6071] clamtk: program fails to start #3170
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#3170
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 @tetoNidan on GitHub (Oct 28, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6071
Description
clamtk fails to open. When run from the terminal you get:
You can run
firejail --noprofile clamtkand clamtk runs as expected.Steps to Reproduce
open terminal and type
clamtkor open from the.desktopfile.Expected behavior
Clamtk to open it's gui and be able to scan files and directories.
Actual behavior
Nothing but the error included above in the discription.
Behavior without a profile
clamtk open just fine
Additional context
see description for detailed error message from the terminal
Environment
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)Log
Output of
LC_ALL=C firejail clamtkOutput of
LC_ALL=C firejail --debug clamtkhttps://pastebin.com/7YPgkVxq
@rusty-snake commented on GitHub (Oct 28, 2023):
Try without ipc-namespace.
@ghost commented on GitHub (Oct 28, 2023):
Just curious. Why aren't you using /etc/firejail/clamtk.profile? Is /home/tool/.config/firejail/clamtk.profile an exact copy or did you change anything?
Always use the full path to the clamtk executable (/usr/bin/clamtk) when running firejail from CLI. Otherwise it will run /usr/local/bin/clamtk, which is a symlink created by firecfg.
I cannot exactly reproduce on Arch, although there are some problems. Just installed clamtk, which pulls in clamav 1.2.1-1, updated in the extra repo only yesterday. Are you seeing this with that version? For me clamtk opens fine, but showing yellowish warning bar about unavailable databases.
The clamtk profile has
net noneandprotocol unix, and as such doesn't seem to be designed for per-user control of signatures updating. According to the AL wiki you're supposed to usefreshclamfor updating the signatures. These are configured to reside under /var/lib/clamav, 0640 uid 64/clamav gid 64/clamav. Bothnogroupsandnorooteffectively block clamtk's access to that path. You could change clamtk's settings to put the databases under ~/.clamtk/db (Update Assistant > I would like to update signatures myself). But I don't know if that's at all practical, never used clamtk/clamav before.Our freshclam.profile does work from CLI, I've tested that just now. Obviously the clamav-freshclam.service would need changes when you want to sandbox that via Firejail. Alternatively, use systemd's sandboxing features. See: https://github.com/netblue30/firejail/wiki/Comparison-of-firejail-and-systemd's-hardening-options.
@tetoNidan commented on GitHub (Oct 28, 2023):
Yes but I changed it back for my reports. I find it easier to use a
$USER/.config/firejailcopy to test rather than passing multiple arguments in the terminal. That way when you find a fix you can keep that fix and only have to remember that fix when firejail update's profiles and you don't have to transfer arguments to the profile. Hope that makes sense.That did the trick. but gives the errors and warning. Might me normal for not using
ipc-namespacethough, I dont know?WARNING **: Unable to connect to dbus: Could not connect: Permission denied at /usr/share/perl5/vendor_perl/Gtk3.pm line 555. failed remote tk check >500 Can't connect to raw.githubusercontent.com:443 (Temporary failure in name resolution)Failed to create secure directory (/run/user/1000/pulse): Permission deniedCommenting out
net nonealso seemed to let me manually download new definitions. Progress bar moves and turns green when finished which seems to be normal behavior. I know you can usefreshclambut it's nice to have a fully working app.EDIT: Terminal output says update has failed.Guess you cant go by the GUI to tell if definitions are being updated! Is there potential security issue with allowing clamtk to have internet access?clamtk 6.14-1
clamav 1.2.1-1
And Thanks by the way!
@ghost commented on GitHub (Oct 28, 2023):
It does :) Just wanted to rule out potential additional firejail options that we were not aware of.
The dbus and pulse errors and warning can safely be ignored. It's quite common to see those and similar ones while sandboxing an application. It isn't aware of the imposed restrictions (which is a good thing) and uses its only other option left: complain :)
Can you post the exact output here? In my brief test I had to
ignore net noneAND expand the allowed protocols withprotocol unix,inet,inet6for sucessfully updating the signatures. When allowing networking it's advised to also addnetfilter. Which relates to your other question...Is there potential security issue with allowing clamtk to have internet access?
Potentially yes. ClamAV can use databases/signature from other repositories or security vendors. Apply common-sense, don't add just anything that's out there and you'll be fine.
@rusty-snake commented on GitHub (Oct 29, 2023):
Keep in mind that removing
net nonegrants it access to localhost and abstract sockets.@tetoNidan commented on GitHub (Oct 30, 2023):
i will do as soon as I get back to my computer late tonight or late tomorrow.
I will take note that there are security flaws allowing clamtk internet access. Is there a suggested way of updating virus definitions inside the sandbox or should I run
/usr/bin/freshclamto update definitions? I have not added any third party definitions to clamxav so I'm assuming that's not a security issue, updating from official clamxav definitions that is.@tetoNidan commented on GitHub (Oct 31, 2023):
I think that worked. Before my outuput when updating was:
My profile looks like this:
Is it best practice to use
ignorerather than commenting out thins like#ipc-namespace. I believe this issue is solved. Thanks firejail team!I was also wondering if I could pick your brains about
steamand controllers best practices? Would you like me to create a new issue to discus that?@rusty-snake commented on GitHub (Oct 31, 2023):
Yes, because you can use .locals. See the Wiki for more.
Yes.
@tetoNidan commented on GitHub (Oct 31, 2023):
Thanks I will close this and start composing my controller question. I will close this and thanks again firejail team!