mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4558] --tracelog and --trace override /etc/ld.so.preload inside the sandbox #2705
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#2705
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 @rusty-snake on GitHub (Sep 18, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4558
Description
--tracelogand--traceoverride/etc/ld.so.preloadinside the sandbox.Steps to Reproduce
Expected behavior
--tracelogand--traceappend to an existing/etc/ld.so.preload.Actual behavior
--tracelogand--traceoverride an existing/etc/ld.so.preload.Additional context
Workaround is to
env LD_PRELOAD=…in globals.local.Environment
Checklist
OT: We need to split-up between regressions with programs/profiles and bug in firejail itself.
Log
Output of
firejail --debug /path/to/program@topimiettinen commented on GitHub (Sep 19, 2021):
Off topic, but I wish there was a
malloc()library which would not make any compromises on randomization or security. For example,libhardened_mallocuses slab structures to keep allocations together to reduce memory waste. I don't care about memory waste with 16GB of memory which is almost entirely unused! I want the allocator always get a new page at fully random address when the old one is full andrealloc()to always move the memory to a new fully random location. With fully random, I don't mean kernel's keep-pages-together algorithm but using all available address space.@kmk3 commented on GitHub (Sep 20, 2021):
@topimiettinen commented on Sep 19:
This reminds me of the following article:
One of the relevant parts:
Man page:
I don't know much about it, but it looks like it should be doing "randomization
[and] security". Thoughts on it?
@topimiettinen commented on GitHub (Sep 20, 2021):
Filling memory with junk before malloc() and immediately after free() is nice and very lightweight compared to gcc/llvm MSAN or valgrind. But that's for finding bugs and not for preventing attacks utilizing weak address space layout randomization (ASLR).
I'd make OpenBSD realloc() instead of trying to not to move the mapping, always move. The randomization feature relies on mmap() returning pages at really random addresses and this probably works well on OpenBSD, but on Linux this is not so true (the base is randomized only once). The cache feature could be even counterproductive to security, at least I'd try to make it as small as possible.
@topimiettinen commented on GitHub (Sep 22, 2021):
Ok, after a few days' work, I came up with libaslrmalloc. Now I wish its bugs were magically fixed.