So yesterday I was messing around with trying to get cm7 working when I ran an innocent shell command and my phone crashed. I tracked the cause back to the driver for the backlight in our LCD screen. While I was looking at it, I saw that the bug I found could actually be used to gain root access on our phone from any app that runs.
It took a couple hours to work up a working example for this that did something besides crash the phone, and named it 'Lit'. I already have quite a few root exploits for our phone saved up in case LG decides to fix the ones we have publicly. So theres nothing really to lose by not keeping this one to myself.
I suspect this one also affect other LG phones using the same buggy backlight driver. I have hardcoded an address in this code. To get it working on other models, somebody would need to get the correct address. Lit is a commandline program, so run it from the terminal emulator or adb or something and hopefully it'll give you a root shell. You might also want to contact LG and demand they fix it. I'm not really going to bother with that since I called and emailed them back in July about another one and got ignored.
Download lit.tar.gz from Sendspace.com - send big files the easy way
It took a couple hours to work up a working example for this that did something besides crash the phone, and named it 'Lit'. I already have quite a few root exploits for our phone saved up in case LG decides to fix the ones we have publicly. So theres nothing really to lose by not keeping this one to myself.
I suspect this one also affect other LG phones using the same buggy backlight driver. I have hardcoded an address in this code. To get it working on other models, somebody would need to get the correct address. Lit is a commandline program, so run it from the terminal emulator or adb or something and hopefully it'll give you a root shell. You might also want to contact LG and demand they fix it. I'm not really going to bother with that since I called and emailed them back in July about another one and got ignored.
Code:
j@media-pc:~$ adb shell
$ uname -a
Linux localhost 2.6.35.11 #1 PREEMPT Tue Jun 19 23:02:28 KST 2012 armv7l GNU/Linux
$ getprop | grep device
[ro.product.device]: [m3s]
$ id
uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
$ /data/local/tmp/lit
Lit - root exploit for the LG LM3530 backlight driver
2012 giantpune
[+] Using 29287461 as adapter address
[+] Opened led reg file
[+] Mapped 29287000
[+] algoAddr is at 29287000
[+] got root
# id
uid=0(root) gid=0(root)
#