[GH-ISSUE #6144] Add support for running inside distrobox #3200

Open
opened 2026-05-05 09:49:03 -06:00 by gitea-mirror · 21 comments
Owner

Originally created by @neurodiverseEsoteric on GitHub (Dec 30, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6144

I tried running ˋfirejail --force ---private librewolfˋ inside a distrobox of archlinux on a fedora-based distro which doesn't offer librewolf at all, but firejail still ignored everything for being run inside of a "sandbox..."

Originally created by @neurodiverseEsoteric on GitHub (Dec 30, 2023). Original GitHub issue: https://github.com/netblue30/firejail/issues/6144 I tried running ˋfirejail --force ---private librewolfˋ inside a distrobox of archlinux on a fedora-based distro which doesn't offer librewolf at all, but firejail still ignored everything for being run inside of a "sandbox..."
gitea-mirror added the
enhancement
label 2026-05-05 09:49:03 -06:00
Author
Owner

@rusty-snake commented on GitHub (Dec 30, 2023):

How old is your firejail?

You should upgrade to fix multiple vulnerabilities.

<!-- gh-comment-id:1872493289 --> @rusty-snake commented on GitHub (Dec 30, 2023): How old is your firejail? You should upgrade to fix multiple vulnerabilities.
Author
Owner

@rusty-snake commented on GitHub (Dec 30, 2023):

Regarding LW:
https://librewolf.net/installation/fedora/
https://librewolf.net/installation/linux/

<!-- gh-comment-id:1872493521 --> @rusty-snake commented on GitHub (Dec 30, 2023): Regarding LW: https://librewolf.net/installation/fedora/ https://librewolf.net/installation/linux/
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

@rusty-snake

It's archlinux, it shouldn't be that old

<!-- gh-comment-id:1872569315 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): @rusty-snake It's archlinux, it shouldn't be that old
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

@rusty-snake

That defeats the purpose of avoiding all host system and app breakages being blamed on my installing outsider software (it's not just librewolf)

<!-- gh-comment-id:1872569771 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): @rusty-snake That defeats the purpose of avoiding all host system and app breakages being blamed on my installing outsider software (it's not just librewolf)
Author
Owner

@ghost commented on GitHub (Dec 30, 2023):

I tried running ˋfirejail --force ---private librewolfˋ inside a distrobox of archlinux on a fedora-based distro which doesn't offer librewolf at all, but firejail still ignored everything for being run inside of a "sandbox..."

(1) I'm assuming the triple dash in ---private is a typo and isn't the actual command you ran.
(2) Firejail dropped the --force option since version 0.9.54:
db09546f29/RELNOTES (L490-L491)

For example, when running firejail --force --private librewolf on Arch Linux with 0.9.72, you should see:

Error: invalid --force command line option

Not sure what the actual problem is. Can you rephrase your issue?

<!-- gh-comment-id:1872573749 --> @ghost commented on GitHub (Dec 30, 2023): > I tried running ˋfirejail --force ---private librewolfˋ inside a distrobox of archlinux on a fedora-based distro which doesn't offer librewolf at all, but firejail still ignored everything for being run inside of a "sandbox..." (1) I'm assuming the triple dash in `---private` is a typo and isn't the actual command you ran. (2) Firejail dropped the `--force` option since version 0.9.54: https://github.com/netblue30/firejail/blob/db09546f2946c921da1b07d9d3569c287238989b/RELNOTES#L490-L491 For example, when running `firejail --force --private librewolf` on Arch Linux with 0.9.72, you should see: ``` Error: invalid --force command line option ``` Not sure what the actual problem is. Can you rephrase your issue?
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

Oh if it did throw that error i didn't see it...how do I put --force back in?

<!-- gh-comment-id:1872598187 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): Oh if it did throw that error i didn't see it...how do I put --force back in?
Author
Owner

@rusty-snake commented on GitHub (Dec 30, 2023):

4c71ddbcd
https://github.com/turgs/firejail-force

<!-- gh-comment-id:1872600525 --> @rusty-snake commented on GitHub (Dec 30, 2023): 4c71ddbcd https://github.com/turgs/firejail-force
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

ok thanks

<!-- gh-comment-id:1872607504 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): ok thanks
Author
Owner

@rusty-snake commented on GitHub (Dec 30, 2023):

FWIW, the following contaiers are supported container=(lxc|docker|lxc-libvirt|systemd-nspawn|rkt) firejail ... according to

db09546f29/src/firejail/no_sandbox.c (L29-L38)

<!-- gh-comment-id:1872608944 --> @rusty-snake commented on GitHub (Dec 30, 2023): FWIW, the following contaiers are supported `container=(lxc|docker|lxc-libvirt|systemd-nspawn|rkt) firejail ...` according to https://github.com/netblue30/firejail/blob/db09546f2946c921da1b07d9d3569c287238989b/src/firejail/no_sandbox.c#L29-L38
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

Wait nob that release is a thouzandoulus years old...

<!-- gh-comment-id:1872614564 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): Wait nob that release is a thouzandoulus years old...
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

FWIW, the following contaiers are supported container=(lxc|docker|lxc-libvirt|systemd-nspawn|rkt) firejail ... according to

db09546f29/src/firejail/no_sandbox.c (L29-L38)

What would happen if I just naively added distrobox to the list?

<!-- gh-comment-id:1872617288 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): > FWIW, the following contaiers are supported `container=(lxc|docker|lxc-libvirt|systemd-nspawn|rkt) firejail ...` according to > > https://github.com/netblue30/firejail/blob/db09546f2946c921da1b07d9d3569c287238989b/src/firejail/no_sandbox.c#L29-L38 What would happen if I just naively added distrobox to the list?
Author
Owner

@rusty-snake commented on GitHub (Dec 30, 2023):

Either it works or it does not work.

<!-- gh-comment-id:1872618640 --> @rusty-snake commented on GitHub (Dec 30, 2023): Either it works or it does not work.
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

It didn't work, firejail still detects a sandbox...

<!-- gh-comment-id:1872620090 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): It didn't work, firejail still detects a sandbox...
Author
Owner

@rusty-snake commented on GitHub (Dec 30, 2023):

db09546f29/src/firejail/no_sandbox.c (L41-L47)

That's the first check, if it still detects a sandbox you added the wrong value.

<!-- gh-comment-id:1872621342 --> @rusty-snake commented on GitHub (Dec 30, 2023): https://github.com/netblue30/firejail/blob/db09546f2946c921da1b07d9d3569c287238989b/src/firejail/no_sandbox.c#L41-L47 That's the first check, if it still detects a sandbox you added the wrong value.
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 30, 2023):

Ah, it might be one of these pod-based labels:

3435f4d270/distrobox-create (L441-L469)

(how did you get the code preview thing?)

<!-- gh-comment-id:1872625867 --> @neurodiverseEsoteric commented on GitHub (Dec 30, 2023): Ah, it might be one of these pod-based labels: https://github.com/89luca89/distrobox/blob/3435f4d27070a99668bfa29a3e508db4ecc09009/distrobox-create#L441-L469 (how did you get the code preview thing?)
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 31, 2023):

Okay I added the right values, but...

Reading profile /usr/local/etc/firejail/librewolf.profile
Reading profile /usr/local/etc/firejail/firefox-common.profile
Reading profile /usr/local/etc/firejail/disable-common.inc
Reading profile /usr/local/etc/firejail/disable-devel.inc
Reading profile /usr/local/etc/firejail/disable-exec.inc
Reading profile /usr/local/etc/firejail/disable-interpreters.inc
Reading profile /usr/local/etc/firejail/disable-proc.inc
Reading profile /usr/local/etc/firejail/disable-programs.inc
Reading profile /usr/local/etc/firejail/whitelist-common.inc
Reading profile /usr/local/etc/firejail/whitelist-run-common.inc
Reading profile /usr/local/etc/firejail/whitelist-runuser-common.inc
Reading profile /usr/local/etc/firejail/whitelist-usr-share-common.inc
Reading profile /usr/local/etc/firejail/whitelist-var-common.inc
firejail version 0.9.73

Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Warning: /usr/bin/xdg-dbus-proxy was not found, downgrading dbus-user policy to allow.
To enable DBus filtering, install the xdg-dbus-proxy program.
Ignoring "dbus-user.own io.gitlab.librewolf.*" and 1 other dbus-user filter rule.
Parent pid 15028, child pid 15029
Warning: cannot find /var/run/utmp
Error: cannot create /dev/zero device: Operation not permitted
Error: proc 15028 cannot sync with peer: unexpected EOF
Peer 15029 unexpectedly exited with status 1
<!-- gh-comment-id:1872637746 --> @neurodiverseEsoteric commented on GitHub (Dec 31, 2023): Okay I added the right values, but... ``` Reading profile /usr/local/etc/firejail/librewolf.profile Reading profile /usr/local/etc/firejail/firefox-common.profile Reading profile /usr/local/etc/firejail/disable-common.inc Reading profile /usr/local/etc/firejail/disable-devel.inc Reading profile /usr/local/etc/firejail/disable-exec.inc Reading profile /usr/local/etc/firejail/disable-interpreters.inc Reading profile /usr/local/etc/firejail/disable-proc.inc Reading profile /usr/local/etc/firejail/disable-programs.inc Reading profile /usr/local/etc/firejail/whitelist-common.inc Reading profile /usr/local/etc/firejail/whitelist-run-common.inc Reading profile /usr/local/etc/firejail/whitelist-runuser-common.inc Reading profile /usr/local/etc/firejail/whitelist-usr-share-common.inc Reading profile /usr/local/etc/firejail/whitelist-var-common.inc firejail version 0.9.73 Seccomp list in: !chroot, check list: @default-keep, prelist: unknown, Warning: /usr/bin/xdg-dbus-proxy was not found, downgrading dbus-user policy to allow. To enable DBus filtering, install the xdg-dbus-proxy program. Ignoring "dbus-user.own io.gitlab.librewolf.*" and 1 other dbus-user filter rule. Parent pid 15028, child pid 15029 Warning: cannot find /var/run/utmp Error: cannot create /dev/zero device: Operation not permitted Error: proc 15028 cannot sync with peer: unexpected EOF Peer 15029 unexpectedly exited with status 1 ```
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 31, 2023):

Does podman support need to be added into firejail?

<!-- gh-comment-id:1872637840 --> @neurodiverseEsoteric commented on GitHub (Dec 31, 2023): Does podman support need to be added into firejail?
Author
Owner

@rusty-snake commented on GitHub (Dec 31, 2023):

  1. Try if --profile=noprofile works.
  2. Try rootfull podman with --privileged and --security-opt=label=disable --security-opt=seccomp=unconfined
<!-- gh-comment-id:1872866727 --> @rusty-snake commented on GitHub (Dec 31, 2023): 1. Try if --profile=noprofile works. 2. Try rootfull podman with --privileged and --security-opt=label=disable --security-opt=seccomp=unconfined
Author
Owner

@neurodiverseEsoteric commented on GitHub (Dec 31, 2023):

By rootful podman you mean run distrobox with the --root flag?

<!-- gh-comment-id:1873036463 --> @neurodiverseEsoteric commented on GitHub (Dec 31, 2023): By rootful podman you mean run distrobox with the --root flag?
Author
Owner

@rusty-snake commented on GitHub (Dec 31, 2023):

I never used distrobox but firejail might not work inside rootless podman (https://github.com/containers/podman#rootless).

<!-- gh-comment-id:1873054299 --> @rusty-snake commented on GitHub (Dec 31, 2023): I never used distrobox but firejail might not work inside rootless podman (https://github.com/containers/podman#rootless).
Author
Owner

@neurodiverseEsoteric commented on GitHub (Jan 1, 2024):

Distrobox keeps freezing the entire OS whever I try creating a rootful container...and the podman command used to "enter" the container, ˋpodman exec,ˋ doesn't take the "--security-opt" flag, anyway...

<!-- gh-comment-id:1873087422 --> @neurodiverseEsoteric commented on GitHub (Jan 1, 2024): Distrobox keeps freezing the entire OS whever I try creating a rootful container...and the podman command used to "enter" the container, ˋpodman exec,ˋ doesn't take the "--security-opt" flag, anyway...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3200
No description provided.