mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5179] kodi: can access non-media paths #2904
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#2904
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 @tomasz-c on GitHub (Jun 7, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5179
Description
I noticed that the kodi profile for firejail 0.9.68 does not seem to work.
From the file manager in Kodi I can browse all directories, drives (not just those defined in the profile) and delete data from them (if Linux permissions allow it). Surely in some previous version this worked correctly.
Steps to Reproduce
run Kodi:
firejail --profile=/etc/firejail/kodi.profile kodigo to Settings
run the file manager
try to browse all directories or delete files
Expected behavior
No ability to view or delete files outside the media folders defined in the profile.
Actual behavior
Possible to view and delete files outside the media folders defined in the profile.
Behavior without a profile
In terms of viewing and deleting files, the same as with a profile.
Environment
@rusty-snake commented on GitHub (Jun 7, 2022):
@tomasz-c commented on GitHub (Jun 7, 2022):
@rusty-snake
But I understand that if I have home mounted from a separate partition it doesn't matter?
I can also view the contents of /etc and this should not work?
@rusty-snake commented on GitHub (Jun 7, 2022):
I don't understand what you mean.
Where is
/etcrestricted (via whitelisting) in kodi.profile? answer: nowhere@tomasz-c commented on GitHub (Jun 7, 2022):
Mounting /dev/sdXY to /home
I don't know how
disable-mntworks, but from what I found it should only block access to /mntThis is a bit unintuitive to me, as I always thought whitelists were for unlocking :)
I don't know firejail profile configuration well, I reported this bug because this behavior in my opinion is dangerous: allowing kodi to access everything as well as delete files. Because of the support for plugins that don't necessarily pass any security audits and can even be potentially malicious (I know of one such case).
I know that in the past firejail with the default kodi profile didn't allow this, so if it does now I consider it a bug, but if this behavior is expected then somehow I will understand it and close the bug :)
@rusty-snake commented on GitHub (Jun 7, 2022):
Yes,
disable-mntis about /mnt (and /media, /run/media, /run/mnt).@rusty-snake commented on GitHub (Jun 7, 2022):
blacklist/whitelist (or denylist/blocklist/allowlist) describe the concept:
@rusty-snake commented on GitHub (Jun 7, 2022):
You're right that the kodi.profile is rather weak and we could/should harden it (for the reason you said and the general idea). However to much hardening will break plugins and custom locations for media files so people will come here and say that kodi.profile is to strict and breaks kodi. That's the general problem with distributed sandbox configurations, find the compromise between security (strict as possible) and usability (weak as necessary). I'm not sure if kodi.profile should be whitelisting by default but we should at least add a comment ("Add the following lines to your kodi.local for whitelisting").
I do not see any such commits. Maybe you did this in your kodi.local?
@tomasz-c commented on GitHub (Jun 11, 2022):
Hardening, even too much I think is a better solution than giving the appearance of protection. I would be more worried about the reactions of people who have had their data deleted :) I was convinced that the Kodi profile protects me as before and only by accident I noticed that it allows ... much.
Unfortunately I don't have any individual configuration, but wouldn't it be possible to restore the behavior that used to be? That kodi had access only to default media directories?
If I may ask, can you suggest what in the kodi profile causes that:
it doesn't restrict access only to those directories?
@rusty-snake commented on GitHub (Jun 11, 2022):
Talking about access to files in $HOME, you need this:
But there's much more space for improvements in kodi.profile
@kmk3 commented on GitHub (Jun 14, 2022):
@tomasz-c commented on Jun 11:
Related: #4760.
@kmk3 commented on GitHub (Aug 24, 2024):
The reported issue seems to be that kodi can access paths in the user home
other than its own paths and ~/Music, ~/Picures and ~/Videos.
In which case it seems to be intentional in order to avoid being too
restrictive and potentially breaking plugins and different user setups.
So closing as wontfix.
If this is not accurate, feel free to comment.
If you have a specific bug or improvement, feel free to open a new issue.