Re:EXploit X: “Give Me Root” [video]
by NullPrefix on Sunday November 11, 2018 @07:47AM
(#18426131)
xorg-server doesn't need suid useflag these days anymore, does it?
[ Parent
| on HN ]
The Xorg process runs as the root user unless you are using Wayland.
innovative way of using X11.
% ls -l /bin/Xorg
-rwxr-xr-x 1 root root 271 Oct 25 18:42 /bin/Xorg
That 271 byte file is just a shell script that execs either Xorg.wrap or Xorg from the X basedir (eg /usr/lib/xorg/). One of those target files is usually setuid.
If you have Xorg.wrap, it will be the setuid file and it is usually configured to drop root before executing the real Xorg if root isn't needed (eg. KMS is available).