4 ms·
What are the permissions on /proc/sunxi_debug/sunxi_debug? Anyone know? This could be locked down so that, say, only processes which are members of a certain
by kazinator 11y ago
What are the permissions on /proc/sunxi_debug/sunxi_debug?
Anyone know?
This could be locked down so that, say, only processes which are members of a certain group can open a file descriptor to this proc entry.
This is a lot of unnecessary effort to implement something that can be obtained with a simple /bin/rootmydevice executable that is chmod u+s. (Though it is somewhat more streamlined: no intervening process execution is required).
Which, in turn, is a lot of effort to reinvent sudo.
(But of course, those are arguably front doors; you can easily scan the filesystem image for items that have u+s perms.)
I would do this kind of hole differently: why not just hack the kernel so that any process can do setuid(0). Or, slightly hide it: say, setuid(-42) gives you root privs.
- chadcatlett 11y agoIt is created with 0666 as the mode. https://github.com/allwinner-zh/linux-3.4-sunxi/blob/A83T/arch/arm/mach-sunxi/sunxi-debug.c#L69 https://github.com/allwinner-zh/linux-3.4-sunxi/blob/A83T/ar...