mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6532] Assertion failed: env_get("LD_PRELOAD") == NULL (run_symlink.c: run_symlink: 81) #3297
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#3297
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 @elde-n on GitHub (Nov 5, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6532
Description
Having LD_PRELOAD set while trying to run a symlinked firejail application in /usr/local/bin/ will cause a failed assertion
Steps to Reproduce
Steps to reproduce the behavior
ln -s /usr/bin/firejail /usr/local/bin/fooLD_PRELOAD=1 fooAssertion failed: env_get("LD_PRELOAD") == NULL (run_symlink.c: run_symlink: 81)Additional context
It would be nice to have an option to ignore/drop the LD_PRELOAD env instead of asserting
@rusty-snake commented on GitHub (Nov 5, 2024):
Which firejail version? Is it reproducible with firejail-git?
@elde-n commented on GitHub (Nov 5, 2024):
I'm on version 0.9.72, it's reproducible with latest commit, this is the line causing the assertion
https://github.com/netblue30/firejail/blob/master/src/firejail/run_symlink.c#L81@hlein commented on GitHub (Apr 10, 2026):
Trying some Gentoo emerges (compile and install packages via the package manager) with
firejail-0.9.80and most things enabled in/etc/firejail/firecfg.config, and buildingapp-office/libreoffice-25.2.7.2-r1fails with something extremely similar:I can see the value in being paranoid about
LD_PRELOAD. Insrc/firejail/run_symlink.c:If I understand it,
env_getis examining the original environmentfirejailwas handed, andsecure_getenvis consulting the sanitized env that has been constructed for the child we're about to launch.But maybe instead of assert checks here, there should be a profile knob that allows passing
LD_PRELOAD, making it configurable. Still default to no, but we could update the profiles of tools used in package-building withLD_PRELOADset to allow it. The alternative would be that for any tool where this crops up, have to disablefirejailwrapping entirely, at least on Gentoo (and probably other source distros like Arch?).