Skip to content
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

Docs suggest creating user writable script in home folder run by root? #4808

Open
2 tasks done
jgarvin opened this issue May 6, 2024 · 2 comments
Open
2 tasks done

Comments

@jgarvin
Copy link

jgarvin commented May 6, 2024

Issue description

In the udev rules section of the docs it mentions that udev needs to qtile in in $PATH and so recommends editing the udev script to make sure it references the qtile install in your home folder.

This lets anyone with write access to the user home folder run arbitrary code as root by changing qtile or any of the python source in $HOME/.local/lib/python3/site-packages. Seems like there should be a way that doesn't require this but still lets people install qtile in their home folder? This looks like a possible target for malware to run code as root without requiring the user to type their password.

Version

0.25.0

Backend

Wayland (experimental)

Config

No response

Logs

No response

Required

  • I have searched past issues to see if this bug has already been reported, and it hasn't been.
  • I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
@jgarvin
Copy link
Author

jgarvin commented May 6, 2024

Looking at https://github.com/qtile/qtile/blob/53f3711866d67d33f38a6e72de37ad857decb1a2/libqtile/scripts/udev.py it seems like the rules file could instead just run chmod and chown on a few files? This would also get rid of the need for people to need to worry about modifying the script to find qtile in $PATH.

@tych0
Copy link
Member

tych0 commented May 7, 2024

Sure, the rules file could do all this stuff itself, but it's another entrypoint to distribute and manage. IMO, if someone can write to your home directory, the game is already over: https://xkcd.com/1200/

I would take a patch that implemented a separate udev rules script, as long as you promise to go pester all the distro packagers as well to include it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants