consider hardening binary plugin search #32
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
alt-gnome/Tuner#32
Loading…
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?
So plugins as of
a751505d5acan currently reside in:$libdir/tuner/plugins$datadir/tuner~/.local/share/tuner/plugins$TUNER_PLUGIN_SEARCH_PATH.In a classic GNU/Linux environment, the first two of these locations are only writable by root (i. e. package manager or pre-baked bootable image), and might be mounted read-only, covered by fsverity, ima-evm, etc.
In the same environment the
$HOMEhierarchy is freely user-writable, which is convenient for development purposes, but opens up attack surface (e. g. a malicious.so, see also #30, can shadow a system-provided plugin). E. g. Chromium can also write anywhere in$HOME.My suggestion is:
— to add a way to restrict plugin search to system locations,
— and make that the default, so to allow extending the search path the builder has to enable a meson build option.
...Part of the reason
$XDG_DATA_HOMEis defined by default to be$HOME/.local/shareis so$XDG_DATA_HOMEis not specific to the machine architecture. It's a datadir, after all. :)@arseny wrote in #32 (comment):
The inverse made total sense during the planning and early development phases. Now the project seems to gain a user base, thus this suggestion.
The degree to what we should harden Tuner, both optionally and in general, is up for discussion and careful consideration, of course.