Open vinc17fr opened 2 years ago
BTW, rather independently of this issue, /usr/share/gv
should be whitelisted for security (it contains a safe workdir for gs
, and who knows what happens if this directory is not available: gv
is expected to chdir
to it).
firefox.profile is made to run firefox in it and nothing else.
IMHO we should close here.
Description
When I run
gv
on a PostScript file from thefirefox
profile, it hangs, taking 100% CPU time. If I rungs
directly on the PostScript file, it fails, and this is the cause.Note that
gv
is useful to open PostScript files on the web (this was how I found this issue), e.g. via Firefox, hence thefirefox
profile.Steps to Reproduce
file.ps
in theDownloads
directory.LC_ALL=C firejail --profile=firefox gv ~/Downloads/file.ps
.LC_ALL=C firejail --profile=firefox gs ~/Downloads/file.ps
.Expected behavior
The contents of the PostScript document should appear in the window.
Actual behavior
At step 2, a
gv
window appears. The page numbers in the left pane are correct, showing that the PostScript file could have been read. But the document pane remains blank and there's a running throbber;gv
takes 100% CPU time, apparently waiting for data fromgs
, which died.At step 3,
gs
dies with the errorGPL Ghostscript 9.53.3: Can't find initialization file gs_init.ps.
. To make it work, I need to whitelist both/usr/share/ghostscript
and/usr/share/color/icc/ghostscript
.Behavior without a profile
_What changed calling
LC_ALL=C firejail --noprofile /path/to/program
in a terminal?_No issues.
Environment
Checklist
/usr/bin/vlc
) "fixes" it).https://github.com/netblue30/firejail/issues/1139
)browser-allow-drm yes
/browser-disable-u2f no
infirejail.config
to allow DRM/U2F in browsers.--profile=PROFILENAME
to set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/program
``` Reading profile /etc/firejail/firefox.profile Reading profile /etc/firejail/whitelist-usr-share-common.inc Reading profile /etc/firejail/firefox-common.profile Reading profile /home/vinc17/.config/firejail/firefox-common.local Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-exec.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-common.inc Reading profile /etc/firejail/whitelist-runuser-common.inc Reading profile /etc/firejail/whitelist-var-common.inc Warning: networking feature is disabled in Firejail configuration file Warning: Warning: NVIDIA card detected, nogroups command disabled Seccomp list in: !chroot, check list: @default-keep, prelist: unknown, Parent pid 124528, child pid 124531 Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Seccomp list in: !chroot, check list: @default-keep, prelist: unknown, Child process initialized in 160.30 ms Warning: Cannot convert string "-*-Courier-Medium-R-Normal--*-100-*-*-M-*-ISO8859-1" to type FontStruct ```