mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5333] firejail --private=. fails in some cases #2961
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#2961
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 @ny4nk0 on GitHub (Aug 21, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5333
Description
firejail --private=.fails in some cases.Consider this:
Everything is fine here.
Now consider this:
firejailchdirs into~/uwuinside the sandbox. Strange, isn't it?Let's try with a file:
Okay, it seems fine. If
~/uwuinside the sandbox is a regular file,firejaildetects that and does not chdir.Now let's try something different:
Oh no! No sandbox for you.
Environment
@ny4nk0 commented on GitHub (Aug 21, 2022):
Also, check my DNS trips.
@ghost commented on GitHub (Aug 22, 2022):
I cannot reproduce any of the
firejail --private=.examples.Can you rephrase or otherwise provide some context as to what you mean by this?
Please see https://github.com/netblue30/firejail#ubuntu:
For Ubuntu 18.04+ and derivatives (such as Linux Mint), users are strongly advised to use the PPA.
@reinerh commented on GitHub (Aug 22, 2022):
Where did you see they are using Ubuntu/Mint? The version number indicates a backports package for Debian 11.
@ghost commented on GitHub (Aug 22, 2022):
Oops, my bad. Apologies for the confusion. Regardless, I can't reproduce any of this. Can you?
@reinerh commented on GitHub (Aug 22, 2022):
Yes, I can reproduce all the commands/behaviour above.
At first it didn't work because I was in a different directory (somewhere in /tmp), but then I tried with exactly the directories from @ny4nk0 and I observe the same behaviour.
But I think I can explain it.
It's related to $CWD, the current working directory.
firejail --private=., there is no ~/uwu in the new private home, so it falls back to ~.@ghost commented on GitHub (Aug 22, 2022):
Ow I was in ~/Downloads when trying to reproduce. Now I see my problem duh. Anyway, I always assumed/interpreted private=directory to be fed a full path (instead of . like here).
@ny4nk0 commented on GitHub (Aug 23, 2022):
@glitsj16
Oh, it's nothing. It's just a request to appreciate the subtle aestheticism of this issue's number. It starts with 53 (the port of the DNS protocol) and ends in three equal digits (trips). Besides, 53 is a prime, just like 5333. Isn't it fascinating? Maybe it is a message from God? If so, what is He trying to say?
@ny4nk0 commented on GitHub (Aug 23, 2022):
@reinerh
Yes,
$CWDis an important part of reproducing this.@glitsj16
Even if full paths are used, the issue still exists.
To reproduce this issue, these two things are required:
$CWDexists both inside and outside the sandbox;$CWDpoints to a broken symlink.@ny4nk0 commented on GitHub (Aug 23, 2022):
Also, I've come up with a (hopefully) new type of prime numbers.
5 is a prime, 53 is a prime, 5333 is a prime, but 533 is unfortunately not. But what if...
Let's define a nyanko prime as a nyanber that:
Here is a program that generates such numbers:
Its output:
If you want, we can rename such numbers to firejail primes, by the place of their discovery.
In any case, I need a research grant to research this topic in more detail.