mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6088] The tracing mechanism does not always properly handle an existing ld.so.preload file #3172
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#3172
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 @mardy on GitHub (Nov 14, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6088
Firejail version: 0.9.72
If the user has a non-empty file
/etc/ld.so.preloadin his/her host machine, and it doesn't contain a whitespace at the end, firejail will generate an invalid/etc/ld.so.preloadfile inside the sandbox, that will have the last existing path concatenated with the tracing library, with no spaces in between. The result is that neither library will be loaded.I can provide a patch to fix this, but first I'd like to know if the preferred approach is just to unconditionally add a newline (or a space) before adding our tracing library, or if you prefer to seek to the end of the
ld.so.preloadfile, check whether the last character is a whitespace, and only in that case add a space (I'd vote for the first option -- less code and headaches).@kmk3 commented on GitHub (Nov 14, 2023):
By "doesn't contain a whitespace at the end" do you mean that the original file
is missing a line terminator (0x0a) at the end or that it actually needs an
extra space (0x20)?
Please provide a hexdump of the original file and of the one that firejail
generates.
Example: