-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arbitrary file modification #40
Comments
FWIW, I expect there are other vulnerabilities of comparable severity lurking here. Things I noticed that made me uneasy during my brief scan of the source code:
I would suggest that the architecture of the program needs a rethink to account for the highly‐privileged context it executes in, as right now it is likely that there are local privilege escalation bugs lurking even if this specific instance is fixed. A good start would be to ensure that the majority of the code runs as an unprivileged user in a systemd service sandbox, and if it’s not possible to use fine‐grained capabilities or things like PolKit to achieve the tasks that require high privileges, communicate with a separate daemon that runs the minimum amount of code possible, doesn’t accept any configuration from an unprivileged source, doesn’t write to any files, and treats its client as untrusted. |
Thanks for the detailed report. As I mentioned in NixOS/nixpkgs#336449 I'm taking a break from working on picosnitch. I'll pin this issue for now. |
When running picosnitch as a daemon, it will look for the first folder in
/home/
that matches a uid > 1000. then loads config and dumps error logs and the database into that users.config/picosnitch
folder.This can be exploited by symlinking files:
When picosnitch starts, it will start appending logs to whatever file this unprivileged user specified.
This can lead to data corruption, denial of service, and in the worst case privilege escalation.
Found by:
@dali99 @jcaesar @emilazy
The text was updated successfully, but these errors were encountered: