mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2718] seccomp bypass when joining existing jail #1710
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#1710
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 @apmorton on GitHub (May 21, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2718
seccomp filters are copied into
/run/firejail/mnt, and are writable within the jail.A malicious process can modify files from inside the jail.
Processes that are later joined to the jail will not have seccomp filters applied.
repro steps
compile program to call blacklisted syscall
create interactive jail session
try to run program inside jail, noting syscall is blocked
open new terminal and run program by joining jail, noting syscall is blocked
back in original interactive jail session, empty the seccomp.list file and attempt to run program, noting syscall is blocked
open new terminal and run program by joining jail, noting syscall is NOT blocked
@chiraag-nataraj commented on GitHub (May 21, 2019):
This fails for me with
bash: /run/firejail/mnt/seccomp.list: Permission denied. Let me play around a bit, since idk if it's only a "my system" thing.Which version of firejail are you running? Which distro?
@chiraag-nataraj commented on GitHub (May 21, 2019):
Okay, so I can replicate with current release, but not with current git master. Is that the same for you @apmorton?
@apmorton commented on GitHub (May 21, 2019):
confirmed, this is fixed on latest master.
seccomp files are put in
/run/firejail/mnt/seccompand is mounted as a read-only filesystem, which mitigates the issue.@chiraag-nataraj commented on GitHub (May 21, 2019):
In the future, if you think you have found a security vulnerability (which this certainly would qualify as), you should probably follow the directions in the readme (i.e. email netblue30).
@chiraag-nataraj commented on GitHub (May 21, 2019):
@netblue30, this is fixed in git master, but apparently is an issue in the current release. How should we proceed?
@apmorton commented on GitHub (May 21, 2019):
neither readme (
READMEorREADME.md) have security disclosure proceduresedit: just noticed in
CONTRIBUTING.md, apologies@chiraag-nataraj commented on GitHub (May 21, 2019):
I'll add it to the README as well, since people might not think to look at CONTRIBUTING.
@chiraag-nataraj commented on GitHub (May 22, 2019):
@apmorton, if you're comfortable, can you bisect the commits to figure out which one solved this? We should probably back-port just that fix...
@smitsohu commented on GitHub (May 22, 2019):
It is commit
eecf35c2f8@chiraag-nataraj commented on GitHub (May 22, 2019):
Thanks @smitsohu! Should we back-port to LTS and current release?
@smitsohu commented on GitHub (May 22, 2019):
@chiraag-nataraj We already have a new release candidate, and 0.9.58 will be replaced very soon anyways.
LTS is a different story, imho it should be backported. What does @startx2017 think?
@SkewedZeppelin commented on GitHub (May 22, 2019):
What about getting a CVE assigned?
And many distros still aren't even shipping 0.9.58.
@smitsohu commented on GitHub (May 22, 2019):
@netblue30 ?
@SkewedZeppelin commented on GitHub (May 22, 2019):
this fine?
@smitsohu commented on GitHub (May 22, 2019):
More a side note: So far we as upstream only support the last version and LTS, and I tend to believe this is a wise decision. I'd say for earlier versions it is the maintainers job to backport fixes, in line with their respective distribution policy.
@SkewedZeppelin commented on GitHub (May 22, 2019):
@smitsohu
okay updated, would you like to send it to the oss-security list?
@SkewedZeppelin commented on GitHub (May 22, 2019):
I have done some backports here
https://gist.github.com/SkewedZeppelin/7f67a131a3d31bfa9d64eaf1a72b1971
edit: attached as a zip for archival purposes
eecf35c-backports.zip
@smitsohu commented on GitHub (May 23, 2019):
asked MITRE for a CVE number
@netblue30 commented on GitHub (May 26, 2019):
Thanks @apmorton
New release Monday morning. If you want to bring in any other fix, now is the time. If we don't get a CVE number by Monday, we'll add it later. I'll grab the patch from @SkewedZeppelin and add it in etc-fixes directory here on mainline. For LTS a new release probably sometime next week, there are some more fixes to be added there, I'll have to tak to @startx2017 .
@rusty-snake commented on GitHub (May 26, 2019):
The RELNOTES should be updated, we have some new stuff like private-cwd or deterministic-exit-code and so on.
@netblue30 commented on GitHub (May 26, 2019):
RELNOTES done, anything missing just add it in. I'm doing some testing right now, tonight or tomorrow morning it should be out.
@reinerh commented on GitHub (May 30, 2019):
@smitsohu Was there already a reply regarding CVE number?
Edit: Did you use this form? https://cveform.mitre.org/
@smitsohu commented on GitHub (May 30, 2019):
@reinerh We have no number assigned yet.
Yes, I used the webform. I think I'm going to ask if there is something we can do on our end to speed up the process.
@netblue30 commented on GitHub (May 30, 2019):
@startx2017 started porting, we will have a LTS release by the end of the week with or without CVE.
@reinerh commented on GitHub (May 30, 2019):
(FYI a backported fix is in Debian unstable since yesterday, together with a fix for #2401; and it has been unblocked for migration to Buster.)
@carnil commented on GitHub (Jun 3, 2019):
CVE-2019-12589 was assigned for this issue.
@netblue30 commented on GitHub (Jun 8, 2019):
LTS version also released, CVE status page updated - https://firejail.wordpress.com/download-2/cve-status/