mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4592] --build creates invalid paths with "after,$HOME" $HOME expanded #2713
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#2713
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 @matu3ba on GitHub (Oct 5, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4592
Description
Path handling for
firejail --build nvimis broken.Steps to Reproduce
Steps to reproduce the behavior
LANG=C firejail --build nvimallow ${HOME}/.local/share/nvim/site/after,/etc/xdg/nvim/after,/home/misterspoon/.config/kdedefaults/nvim/after,/home/misterspoon/.config/nvim/after/startExpected behavior
There should be never invalid paths generated. I hope this code is not used elsewhere.
Actual behavior
site/after,/ ... nvim/after, and especially
/kdedefaults/nvim/after,looks broken. Invalid path generated.Additional context
PATH contains the path to nvim installation from source.
I have a file $HOME/.local/share/nvim/site/pack/packer/start/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pip/_vendor/tenacity/after.py
and
$HOME/.local/share/nvim/site/pack/packer/start/coq_nvim/.vars/runtime/lib/python3.9/site-packages/pip/_vendor/tenacity/pycache/after.cpython-39.pyc.
Environment
firejail --version). master with commit32fb5edd55Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
firejail --build nvim@matu3ba commented on GitHub (Oct 6, 2021):
looks like a wild pointer to me. The only occurence of
afteris in build_profile.c on line 95:printf("--- Built profile beings after this line ---\n");Is there a way to run firejail within valgrind or do I need to use gdb for this?
UPDATED description.
@rusty-snake commented on GitHub (Oct 6, 2021):
Maybe this is helpful https://github.com/netblue30/firejail/wiki/Debugging-Firejail#advanced-troubleshooting.
ASAN build would be nice too however I did not make it work so far.
@smitsohu commented on GitHub (Oct 6, 2021):
Just run
fbuildermanually. It will be much easier to debug./usr/lib64/firejail/fbuilder nvim(probably)@smitsohu commented on GitHub (Oct 6, 2021):
+1
I also tried a while back but didn't make it past an endless loop in the instrumented binary.
@matu3ba commented on GitHub (Oct 6, 2021):
nvm. I should not use mold for this stuff.
The binary seems very messed up. valgrind cant read the debug sections. Can you confirm this?Changing
common.mkby removing-O2did not change this for me.objdump -h fbuilderreturns very oddly looking 2 .rodata sectionsand valgrind has problem to read the debug data:
valgrind --leak-check=full -s ./fbuilder ~/.local/nvim/bin/nvim +q@rusty-snake commented on GitHub (Oct 7, 2021):
Building with
-fanalyzer(gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)) findsfiledb.c:71:22: error: use of possibly-NULL ‘strdup(fname)’ where non-null expected [CWE-690] [-Werror=analyzer-possible-null-argument]