


You need to read that in context. Is it insecure in a way that can actually be exploited on your system?I remember reading somewhere that USE="suid" is somehow unsecure, so I would like not using it if that's true.
In short, keep it simple.Tony Hoare wrote:There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.

As long as an external attacker can't exploit this, I don't really care.NeddySeagoon wrote:stefan11111,
You need to read that in context. Is it insecure in a way that can actually be exploited on your system?I remember reading somewhere that USE="suid" is somehow unsecure, so I would like not using it if that's true.
If it is, do you care?
If potential threats are people you trust, then does it matter to you?
I sure as hell don't trust anything related to Lennart or systemd with root access. The solution I was looking for was a fix to my xorg.conf or some chmod/chown stuff.NeddySeagoon wrote: Xorg requires that some of its setup is performed by root, or something running as root. e.g. elogind, systemd ... whatever.
Why would you trust them running as root and not Xorg?
I design my systems with this in mind.NeddySeagoon wrote: Security depends on evaluating your threats and deploying mitigation measures, not a blanket its insecure how do I fix it?
For the avoidance of doubt, I run a static /dev with Xorg suid. The threat model does not apply to my use case, so II don't mind.
It also has the advantage that I understand the Xorg suid threat. Being old and cynical, I'll suggest that the alternatives are just different, but I don't understand the insecurities that they add so maybe its just prejudice.
In short, keep it simple.Tony Hoare wrote:There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.




Code: Select all
grep tty /etc/udev/rules.d/*
/etc/udev/rules.d/75-tty-don.rules:SUBSYSTEM=="tty", KERNEL=="tty[7-8]", GROUP="tty", MODE="0660"
I don't recall a specific vulnerability (those tend to get fixed in version bumps anyway), but I believe this recommendation is just an instance of the more general "don't run complex software as root" recommendation. The reasoning being that the more complex a piece of software gets, the higher the probability of having undetected bugs is. In other words, the first part of Tony Hoare's quote. And Xorg is quite complex.stefan11111 wrote:However, I would still like to know how suid is vulnerable and why is elogind considered safer.
Having elevated privileges (by being root or having a nonprivileged effective user that is a member of groups that it shouldn't be a member of) is still required for other operations, including open() system calls for files in /dev. Others depend on the X11 drivers being used.Anon-E-moose wrote:Any way you choose with a modernish kernel, X doesn't need either suid root or using sudo/be root.
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though




I use xf86-input-mouse and xf86-input-keyboard from Neddy's static-gentoo overlay.GDH-gentoo wrote: And which X11 drivers? Without libudev there's a very limited selection.



Here is my Xorg.0.log:GDH-gentoo wrote:OK, then post Xorg's log. Any insufficient permissions issues should show up there.


OK, I don't see any obvious permissions problems there, and xorg.conf looks good to me. Looks like we are in "debug problems with a static /dev" territory...stefan11111 wrote:Here is my Xorg.0.log:
https://github.com/stefan11111/pastebin ... Xorg.0.log
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though


Oops, looks like I sent the wrong log, the one with suid.NeddySeagoon wrote:stefan11111,
It that log with Xorg suid or not?
Code: Select all
$ ls -lah /dev/input/mice
crw------- 1 root root 13, 63 Mar 6 10:40 /dev/input/mice

stefan11111 wrote:Here is the good log, the one without suid:
https://github.com/stefan11111/pastebin ... .0.log.new
Code: Select all
[ 220.669] (EE) xf86OpenSerial: Cannot open device /dev/input/mice
Permission denied.
[ 220.669] (EE) Mouse0: cannot open input deviceYou have to be root to open /dev/input/mice.stefan11111 wrote:Code: Select all
$ ls -lah /dev/input/mice crw------- 1 root root 13, 63 Mar 6 10:40 /dev/input/mice
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though

Well, now I feel stupid.GDH-gentoo wrote:stefan11111 wrote:Here is the good log, the one without suid:
https://github.com/stefan11111/pastebin ... .0.log.newAnd there you have it.Code: Select all
[ 220.669] (EE) xf86OpenSerial: Cannot open device /dev/input/mice Permission denied. [ 220.669] (EE) Mouse0: cannot open input device
You have to be root to open /dev/input/mice.stefan11111 wrote:Code: Select all
$ ls -lah /dev/input/mice crw------- 1 root root 13, 63 Mar 6 10:40 /dev/input/mice
Code: Select all
# chmod 606 /dev/input/mice
You are giving every program that runs on your computer full access to a hardware device, so they can do whatever they want with it. Many people might argue that you are making your attack surface larger...stefan11111 wrote:The fix was:Now, does this have any security implications?Code: Select all
# chmod 606 /dev/input/mice
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though

Another solution is:GDH-gentoo wrote:You are giving every program that runs on your computer full access to a hardware device, so they can do whatever they want with it. Many people might argue that you are making your attack surface larger...stefan11111 wrote:The fix was:Now, does this have any security implications?Code: Select all
# chmod 606 /dev/input/mice
Code: Select all
# chown stefan:root /dev/input/mice
Code: Select all
$ ls -lah /dev/input/mice
crw------- 1 stefan root 13, 63 Mar 6 10:40 /dev/input/mice
Code: Select all
# chown root:input /dev/input/mice
Code: Select all
ls /dev/input/m* -l
crw------- 1 root root 13, 63 Nov 4 2021 /dev/input/mice
Code: Select all
$ ls /dev/tty -l
crw-rw-rw- 1 root root 5, 0 Mar 19 19:34 /dev/tty