mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #496] Question: Where do tracelog messages go? #350
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#350
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 @chiraag-nataraj on GitHub (May 3, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/496
I've looked in literally every log in
/var/log. I know I need to whitelist a syscall because Emacs crashes when resizing the window when launched in my Mutt sandbox. However, I can't find the log where the syscall violation information should be listed. I'm using systemd. I've checked in/var/log/syslog,dmesg,journalctl -xe, and every other log in/var/logincluding/var/log/kern.log, and/var/log/debug.@reinerh commented on GitHub (May 3, 2016):
tracelog only logs blacklist violations to syslog.
firejail can't log syscall violations, as the kernel immediately kills the program when they are violated.
You can run your tool with strace and record all required syscalls, and then check which ones are needed and blacklisted by firejail.
@chiraag-nataraj commented on GitHub (May 3, 2016):
Oh right. So I guess the real question is why syscall violations aren't showing up in any of my logs...
I already trying using strace to pinpoint which syscall I was missing...there was too much stuff going on for it to actually be useful.
@reinerh commented on GitHub (May 3, 2016):
try something like this:
strace -qq -o /tmp/ls.log ls /
cat /tmp/ls.log | cut -d '(' -f 1 | sort -u
@chiraag-nataraj commented on GitHub (May 3, 2016):
Oh wow...that really helps! Unfortunately, I have all the syscalls that show up there whitelisted in my config. Here's the log generated by strace when I have everything blacklisted (I stopped collecting as soon as I Emacs crashed).
muttdebug.txt
@netblue30 commented on GitHub (May 4, 2016):
First you need to find out where the messages go: /var/log/syslog for Debian-based distros, /var/log/audit/audit.log on CentoOS, and so on - every distro keeps them in a different place. Then you run:
In the log you get:
The message is generate by audit subsystem in the kernel. You should have a process kauditd running on your system.:
Some distros also enable an auditd daemon in user space: http://linux-audit.com/configuring-and-auditing-linux-systems-with-audit-daemon/
@chiraag-nataraj commented on GitHub (May 4, 2016):
Yeah I have absolutely no idea why audit messages aren't being logged to
/var/log/syslogas they used to. Regardless, I installed auditd and used ausearch to find the syscall in question - no idea whykillis needed to resize the window(!) but whatever...now it works!@netblue30 commented on GitHub (May 4, 2016):
Interesting, I just looked at debian testing and they moved all audit messages including seccomp to /var/log/audit/audit.log. You would need "sudo apt-get install auditd" to get them.
@curiosity-seeker commented on GitHub (May 4, 2016):
The problem is that audit is not enabled in all distros, e.g. it isn't in Arch Linux. And journalctl doesn't report syscalls.
A nice alternative seems to be sysdig. Just execute it as
sudo sysdig proc.name=myprogramand execute myprogram. sysdig will show all syscalls used. A nice introduction is https://sysdig.com/blog/fascinating-world-linux-system-calls/