mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2284] firejail always detects a sandbox when running under WSL #1523
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#1523
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 @mqudsi on GitHub (Dec 1, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2284
I'm unable to use firejail (to test for app compatibility) due to it always thinking it's running in a sandbox anytime I run it under WSL.
@SkewedZeppelin commented on GitHub (Dec 1, 2018):
I don't think WSL actually implements any of the kernel features that firejail needs, because it isn't actually running the Linux kernel.
That being said the error message should probably be tweaked for different cases like this.
@crass commented on GitHub (Jan 8, 2019):
While I highly doubt WSL implements the needed kernel container APIs, as far as I can tell, firejail doesn't actually check for the APIs. It first checks the "container" envvar (see
check_namespace_virt) and if not in a container white list, checks if its in a pid namespace by seeing if any of a list of 5 kernel process names exist in /proc (seecheck_kernel_procs). I suspect firejail isn't finding a matching kernel process name. If you run with--debug, I believe more info confirming this will be shown.This seems list a pretty hacky/error-prone way of doing this, but I'm not terribly interested in this use case, especially since the underlying APIs likely aren't there anyway.
@chiraag-nataraj commented on GitHub (May 21, 2019):
Let's go ahead and close this as wontfix for now (although apparently WSL 2 will actually run a Linux kernel? That may very well change the situation).
@erndob commented on GitHub (Jan 5, 2020):
To anyone reading this, WSL 2 doesn't work either. At least the 19041 build.
@agnosticlines commented on GitHub (Nov 7, 2023):
Hey sorry to bump this old issue but I've compiled a custom kernel with everything needed for firejail, apparmor, selinux, etc and now running into this, is there any workaround for this?
@rusty-snake commented on GitHub (Nov 7, 2023):
Try to start with
container=lxc.@agnosticlines commented on GitHub (Nov 7, 2023):
Yep that works! Although now running into a weird issue where it takes like over 60 seconds to launch if I give it a profile, --noprofile is instant, will look into that. Thanks though!