mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3308] Question on private-bin & Hyperlinking #2077
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#2077
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 @svc88 on GitHub (Mar 30, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3308
Im experimenting with QuiteRSS and if i use the default profile as is, i am unable to open links in Firefox.
If i
A: comment out
private-bin quiterssfrom quiterss.profileor
B: run quiterss with
--ignore=private-binThen I am able to open the links in Firefox.
What is the significance ignoring private-bin and hyperlinks working after that?
What does private-bin actually do?
Why is this happening?
I know you will tell me that to be safe, its better to copy and paste the link, but some apps such as QuiteRSS convenience is needed when clicking on 100 links per day. If i run any app with
--ignore=private-bin, what security implications are there?Why did hyperlinking in firejail break after Firefox 67.0 version as per this https://github.com/netblue30/firejail/issues/2720
Any apps i run with firejail, hyperlinking is broken.
Im sorry i dont know much about private-bin and where the file is because i cannot find it. Is it generated on container creation? There is not much information on this in the wiki.
firejail version: 0.9.62
Xubuntu 18.04
PS: Firefox is NOT firejailed when doing this. New Firefox installation & profile.
@rusty-snake commented on GitHub (Mar 30, 2020):
If you set for example
private-bin foo,bar,bazthis in you profile, then firejail will look if foo, bar and baz exists. Then it creates a tmpfs over /bin, /usr/bin, /sbin, ... and bind-mount all program it has found (vaguely).Why is that good? It restricts the available program, for example if an attacker can know a vulnerability in quiterss which allows him to execute various shell command but there is no bash, no ls, no curl he can't exploit it.
also look at the manpage
If it works with
ignore private-bin, it is maybe enough to add firefox (or whatever) to private-binfirejail --private-bin=firefox quiterss.@svc88 commented on GitHub (Mar 30, 2020):
I see, thanks for the clarification @rusty-snake
I did try with
private-bin quiterss,firefoxi even tried with
private-bin quiterss,firefox,xdg-open,exo-openand it wont open the hyperlinks.
Is there any other other executable it uses for hyperlinks? There is no error in the log im generating.
Could you try reproduce?
@rusty-snake commented on GitHub (Mar 30, 2020):
start quiterss with this and open a link
firejail --build quiterss | grep private-bin@svc88 commented on GitHub (Mar 30, 2020):
I see that executable for firefox is a link to a firefox.sh file.
Do you think maybe thats why theres an issue?
@rusty-snake commented on GitHub (Mar 30, 2020):
firefox.sh will need a shell
@svc88 commented on GitHub (Mar 30, 2020):
This opens links now but i dont see any output in terminal or in a generated log file.
I used:
private-bin quiterss,sh,firefox.sh,bash,firefoxStill wont open links
@rusty-snake commented on GitHub (Mar 30, 2020):
no output? ok, then try
firejail --build firefox | grep private-bin.@svc88 commented on GitHub (Mar 30, 2020):
And i tried in a different terminal with opening a link:
firejail --build quiterss | grep private-binno output
@svc88 commented on GitHub (Mar 30, 2020):
So now i got this:
Error: cannot open whitelist-common.incwhen closing QuiteRSS after that in terminal
@rusty-snake commented on GitHub (Mar 30, 2020):
ok then run
firejail --trace=quiterss.trace quiterssand after thatgrep -oE " /usr/bin//?[^/:]+" quiterss.trace | sort -u.alternative go trough firefox.sh and select every program.
@svc88 commented on GitHub (Mar 30, 2020):
Thanks @rusty-snake
ok so i went into firefox.sh and literally used every single executable: export, exec, exit, break, etc
It came down to it needing only the following to make hyperlinks work again:
private-bin quiterss,firefox,sh,whichAll the other executables that were not included, does that mean the firefox.sh wouldnt run entirely correctly if i leave them out and only use
firefox,sh,which?@rusty-snake commented on GitHub (Mar 30, 2020):
thats are all shell builtins, I downloaded the firefox.deb for ubuntu and came to this:
sh,which,readlink,dirname,sed,basename,gdb,valgrindsed is only used for the usage output and basename,gdb,valgrind only for debugging. for readlink and dirname I'm not sure, but if you see no warnings in the terminal it should be ok. I the worst case firefox can't start.
@svc88 commented on GitHub (Mar 30, 2020):
Well i never start firefox by opening a link from quiterss. So only when firefox is already open will i open a link and it seems to open the tab fine so far.
Just wondering (because a system installation of firefox is using a stupid shell script to run and not just its executable) can i use the portable version
https://ftp.mozilla.org/pub/firefox/releases/74.0/linux-x86_64/en-GB/firefox-74.0.tar.bz2with firejail, do you think its safer to use that without sh,which, etc. ?@rusty-snake commented on GitHub (Mar 31, 2020):
fedora and arch are also using shell script to start firefox.
you mean like this https://github.com/netblue30/firejail/wiki/Sandboxing-Binary-Software#mozilla-firefox-opt-install
for quiterss yes, because there is no shell
for firefox no, because mozillas binarys have no PIE.
@rusty-snake commented on GitHub (May 6, 2020):
I'm closing here due to inactivity, please fell free to reopen if you have more questions.
@gasull commented on GitHub (Nov 15, 2021):
The suggested solutions didn't work for me on Debian 11. For anybody landing here, this is what I put in my
~/.config/firejail/quiterss.profile:@rusty-snake commented on GitHub (Nov 15, 2021):
The prettier way:
~/.config/firejail/quiterss.local