mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2083] --build broken #1410
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#1410
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 @reinerh on GitHub (Aug 15, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2083
I just noticed that the --build feature seems to be broken currently:
@SkewedZeppelin commented on GitHub (Aug 15, 2018):
Unable to reproduce on Fedora or Arch built from
9c44e7a437@chiraag-nataraj commented on GitHub (Aug 15, 2018):
Unable to reproduce on Debian sid+experimental built from
df3f0b618e@reinerh commented on GitHub (Aug 15, 2018):
oh, interesting... thanks. will investigate why it fails here.
@reinerh commented on GitHub (Aug 15, 2018):
Okay, it was an issue on my side...
I still had a file /tmp/firejail-trace owned by the root user.
And invoking --build with my normal user failed because it wanted to write trace output there as well.
But there still seems to be a different issue. By just creating a file /tmp/firejail-trace you can deny other users from using certain firejail functionality which requires writing to that file.
firejail doesn't even clean it up. So when you run
firejail --build ls, and afterwards run the same command as another user, it will not be successful.It's a small denial of service, if you can prevent other users from doing stuff.
Anyone else able to reproduce that?
@SkewedZeppelin commented on GitHub (Aug 15, 2018):
I can reproduce that.
@chiraag-nataraj commented on GitHub (Aug 15, 2018):
Hmm. I created
/tmp/firejail-trace(sudo touch /tmp/firejail-trace) and yet I was still able to usefirejail --buildsuccessfully...[edit] never mind, I can reproduce.
@reinerh commented on GitHub (Aug 15, 2018):
So root is the owner of your file and you are running firejail as normal user?
When you add
--debug, do you see--output=/tmp/firejail-trace?@chiraag-nataraj commented on GitHub (Aug 15, 2018):
@reinerh When I ran it the first time, I suspect
touchdidn't actually do anything (since the files already existed). When I cleaned up from previous runs and repeated the steps, I could reproduce the issue.@Vincent43 commented on GitHub (Aug 16, 2018):
Perhaps instead of
touch /tmp/firejail-traceit should usemktemp /tmp/firejail-trace-XXXXXX.@chiraag-nataraj commented on GitHub (Aug 16, 2018):
Working on it.
@chiraag-nataraj commented on GitHub (Aug 16, 2018):
Also @Vincent43, the
touchstuff was just me testing to see if I could reproduce. In the C code, there was a hard-coded filename, which is what I ended up changing (so same idea, just the C version).@reinerh commented on GitHub (Aug 16, 2018):
@chiraag-nataraj Are you also cleaning up the files again when they are no longer needed? I couldn't find an
unlinkin your commit.Because that was also a reason why this bug occured.
@chiraag-nataraj commented on GitHub (Aug 16, 2018):
@reinerh I'm currently not doing that, but since a unique file is created each time it's run, the bug should be fixed. I can also modify it to clean up after itself, but I wasn't sure if we wanted to keep the files around so that they could be inspected later?
@reinerh commented on GitHub (Aug 16, 2018):
I think cleaning up would be better, as they are no longer needed after the profile is built, and it would only fill /tmp with trash.
@chiraag-nataraj commented on GitHub (Aug 16, 2018):
👍 I'll put that in.