mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #959] Firefox blacklist violation for fontconfig #654
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#654
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 @acrobat1 on GitHub (Dec 6, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/959
I have no idea if this is a relevant issue or am I doing something I'm not supposed to, however if I run Firefox with the --private=directory option in Firejail 0.9.44 with a profile and/or commandline option to blacklist /home/user/.cache/fontconfig, after a while I can see this message in the logs
blacklist violation - sandbox 10331, exe firefox, syscall access, path /home/user/.cache/fontconfigblacklist violation - sandbox 10331, exe firefox, syscall access, path /home/user/.fontconfigso not only Firefox is using the .cache/fontconfig directory in the private directory, it is also creating a new .fontconfig directory at the upper level: is that an issue?
Does Firefox absolutely need to use the fonts cache?
As far as I can see, apparently this is only happening when using the --private=directory option (first I launch Firefox to let firejail create the new firefox profile inside that private directory, than overwrite its contents with files from a custom profile), otherwise I can't see that message in the logs - so why would Firefox need to access the fonts config only with --private=directory option, violating the blacklisting, and apparently respect the fontconfig blacklisting in "normal" sandboxed mode ?
Isn't the font cache a vector for some kind of fingerprinting/tracking activity?
@netblue30 commented on GitHub (Dec 8, 2016):
Yes, most programs end up using fontconfig directories - I guess is one of Xorg libraries doing it.n There seem to be 3 directories, depending on Xorg version: ~/.fontconfig, ~/.config/fontconfig, ~/.cache/fontconfig
@chiraag-nataraj commented on GitHub (Dec 18, 2016):
@acrobat1 If, indeed, it's a vector for tracking and fingerprinting (and that seems likely), the way to defeat it is most likely by disabling Javascript unless it's needed on a site (e.g. NoScript or uMatrix in block-by-default mode will do the trick).
@acrobat1 commented on GitHub (Dec 21, 2016):
I surely agree on selectively enabling JS and disabling remote fonts with either NoScript/uBlock/uMatrix.
Still, why isn't Firejail able to enforce the fontconfig blacklisting only when using the --private=directory argument ?
@chiraag-nataraj commented on GitHub (Jan 15, 2017):
I don't know if I correctly understand this, so correct me if I'm wrong. From what you're saying, it seems that Firefox doesn't try to access
~/.fontconfigif you don't use--private. Furthermore, it tries to access the folder if you use--privateand thus triggers a syslog message. This might imply that Firefox has some local cache it uses in the profile and only tries to access~/.fontconfigif that local cache (in the profile folder) doesn't exist.@acrobat1 commented on GitHub (Jan 27, 2017):
Thanks for your reply, I'll have to delve into this a bit more and report back later on.
@acrobat1 commented on GitHub (Feb 5, 2017):
That seems to be the case: as far as I can see, if I don't use --private, no warnings appear in the logs.
If on the other hand I do use --private, at some point it will create (or even re-create if it has been manually deleted) the ~/.fontconfig directory inside the private home directory in use.
@chiraag-nataraj commented on GitHub (Feb 5, 2017):
So...that's interesting. I took a look and mine does the same thing. Specifically, my firefox creates a
~/.cache/fontconfigdirectory inside the jail. I don't think you have to worry about that - it's going to do it and there isn't much you can do about it per se. What would be worrying is if it were somehow circumventing the jail and accessing the real~/.fontconfig(or~/.cache/fontconfigor whatever) directory, which I don't think is happening.That being said, I'm not sure where it's storing the information. Just as a confirmation:
firejail --blacklist=~/.cache/fontconfig firefoxdoesn't raise an error, butfirejail --private --blacklist=~/.cache/fontconfig firefoxdoes, right? I'm just asking because you never specified the exact commands. For best results when testing, it's also probably good to use--noprofileas well, sofirejail --noprofile --blacklist=~/.cache/fontconfig firefoxfirejail --noprofile --private --blacklist=~/.cache/fontconfig firefox