mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4428] vscodium: crashes due to seccomp #2668
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#2668
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 @mYnDstrEAm on GitHub (Jul 29, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4428
Codium (v1.58.2) doesn't run with firejail anymore.
When I run
firejail --profile=/etc/firejail/vscodium.profile /usr/bin/codiumI get:with the only thing in syslog being this:
kernel: [...] traps: codium[...] trap int3 ip:... sp:... error:0 in codium[...]Furthermore, the profile should be renamed to codium.profile as vscodium has been renamed: #3871.
Bug and expected behavior
I expected it to start VsCodium like it used to but it didn't.
No profile and disabling firejail
Reproduce
Steps to reproduce the behavior:
firejail --profile=/etc/firejail/vscodium.profile /usr/bin/codiumEnvironment
Additional context
Checklist
https://github.com/netblue30/firejail/issues/1139)--profile=PROFILENAMEis used to set the right profile.LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PROGRAMto get english error-messages.browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.debug output
@rusty-snake commented on GitHub (Jul 29, 2021):
I've no idea, looks like you need to comment the profile and uncomment it like for line.
What's in it.
@mYnDstrEAm commented on GitHub (Jul 29, 2021):
a few
blacklist ${HOME}/...andcaps.drop all. I'll try removing the latter even though I don't know why it worked earlier in that case.Edit: Commenting out
caps.drop alldidn't make the profile work and I think it should probably not be removed.@rusty-snake commented on GitHub (Jul 29, 2021):
well
@mYnDstrEAm commented on GitHub (Jul 29, 2021):
I added
noblacklist ${HOME}/.config/VSCodiumto code.local but it still doesn't start with no error message getting displayed that's useful for solving it.@rusty-snake commented on GitHub (Jul 29, 2021):
@mYnDstrEAm commented on GitHub (Jul 29, 2021):
What's the point of sandboxing if you have to disable all of it at least once to get things working?
Also I had to comment out so many things this can't be fine. It used to work with earlier version of VsCodium so what's causing it to require so many sandboxing rules to get lifted?
Furthermore, there probably should / could be error messages which provide some info about why something is failing / which sandboxing rules are causing the shutdown.
I could get it to work by commenting out these:
in code.profile and
#caps.drop allindisable-common.local@mYnDstrEAm commented on GitHub (Jul 29, 2021):
Why is it closed before there is at least a pull-request for these changes to code.profile? The duplicate issue is only about renaming the .profile afaik.
There should probably also be an issue at vscodium (and/or vscode) about why these changes are suddenly required to make it start.
@rusty-snake commented on GitHub (Jul 29, 2021):
Duplicate of #4408. Fixed by
8f867d029a8f867d029aSee above
Nope.
Read #3754, #2946, #2933, #4087, #3871.
Summary: The electron sandbox requires the
chrootsyscall. And if you disable unprivileged userns it also needs to execute a SUID => you can not use seccomp and nnp. And you need to keep some caps.Looks like VsCodium has updated the electron version they use.
What's the reason you do sandboxing?
@rusty-snake commented on GitHub (Jul 29, 2021):
TBH code.profile does to have
whitelist ${HOME}/.../read-only ${HOME}/privatenor does it havedbus-{user,system} (filter|none). It's already a weak profile that can be escaped easily. Furthermore it has nonet IFACE/net noneand it also to execute program from${HOME}. You only need to drop "advanced" sandbox features that protect kernel/root/system in a sandbox that already lacks escape protection.I recommend to set
sysctl kernel.unprivileged_userns_clone=1@mYnDstrEAm commented on GitHub (Jul 29, 2021):
So the weak sandboxing profile for Codium and its further weakening are due to Electron and changes to Electron and the solution you propose for that would be setting
sysctl kernel.unprivileged_userns_clone=1. Did I understand that right? After setting that would all Electron-using packages run fine?@rusty-snake commented on GitHub (Jul 29, 2021):
With
kernel.unprivileged_userns_clone=1you caninclude chromium-common-hardened.inc(Attention: In firejail 0.9.66 and above it isinclude chromium-common-hardened.inc.profile) inelectron.localandchromium-common.local.https://github.com/netblue30/firejail/blob/0.9.64.4/etc/profile-a-l/electron.profile#L21-L23
https://github.com/netblue30/firejail/blob/0.9.64.4/etc/profile-a-l/chromium-common.profile#L33-L35
Which will set
https://github.com/netblue30/firejail/blob/0.9.64.4/etc/inc/chromium-common-hardened.inc
And you can remove the sudi bit from
chrome-sandboxandbwrap.