mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #152] Logging for violations of blacklisted directories #104
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#104
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 @reinerh on GitHub (Nov 22, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/152
A Debian user is requesting the enhancement that firejail logs or warns the user when an application is trying to access a blacklisted directory.
I also think this would be a good idea.
Would it be possible to watch the blacklisted files/directories with inotify?
Link to the bug report: https://bugs.debian.org/794837
@ghost commented on GitHub (Nov 22, 2015):
I also think this is a good idea. Maybe even more generally logging every attempt of using forbidden functions, if this isn't yet implemented.
@netblue30 commented on GitHub (Nov 23, 2015):
I'll implement it for the next release, thanks.
@netblue30 commented on GitHub (Dec 6, 2015):
I ended up implementing it using library calls interposition (there is a new libtracelog.so in /usr/lib/firejail). With inotify, the kernel will emit notifications only on files the user has permissions to access, and since they are already blacklisted, there will be no notification.
The new option is --tracelog. These are some sample syslog messages (using LOG_INFO):
The solution is not perfect, it can be bypassed if the file access is implemented outside glibc. However, regular programs such as Firefox always use glibc for access.
@reinerh commented on GitHub (Dec 6, 2015):
Can this be made the default? So that you don't have to always include the cmdline flag?
I think if there is a blacklist violation, the users are interested in this.
Or is the performance impact too high to make it a default?
@netblue30 commented on GitHub (Dec 6, 2015):
I'll add support for it in profile files. For Firefox wouldn't be a problem. There could be a problem for programs that access files all the time. I'll make it default for browsers, mail, bittorrent and chat.
@netblue30 commented on GitHub (Dec 7, 2015):
I ended up with default logging in firefox, chromium, thunderbird and transmission. I'll go with this in the next release, I need more testing from users.
@reinerh commented on GitHub (Dec 7, 2015):
Awesome, thanks! :)
@netblue30 commented on GitHub (Dec 10, 2015):
You're welcome!