On CBS.com: You a Survivor Fan?Play Survivor Fantasy
BNET Business Network:
BNET
TechRepublic
ZDNet

November 7th, 2008

Worst. Bug. Ever.

Posted by Ed Burnette @ 12:04 pm

Categories: Android, General, Programming

Tags: Phone, Keyboards, Telecom & Utilities, Hardware, Peripherals, Ed Burnette

It turns out the bug in Android I wrote about yesterday was worse than we thought. When the phone booted it started up a command shell as root and sent every keystroke you ever typed on the keyboard from then on to that shell. Thus every word you typed, in addition to going to the foreground application would be silently and invisibly interpreted as a command and executed with superuser privileges. Wow!

In the bug report (issue 1207) jdhorvat writes:

Funny story behind finding this:

I was in the middle of a text conversation with my girl when she asked why I hadn’t responded. I had just rebooted my phone and the first thing I typed was a response to her text which simply stated “Reboot” - which, to my surprise, rebooted my phone.

When I first read this I didn’t believe it. Then I read it again, and again, and finally tried it for myself. It’s true. Don’t believe me? Save anything you’re working on (this will reboot your phone!), open the keyboard tray on your G1, ignore anything you see on the screen, and type these 8 keystrokes: <return>-r-e-b-o-o-t-<return>. Poof, your phone will reboot. This only works on a real phone, not in the emulator, and only with firmware version 1.0 TC4-RC29 and earlier.

From the home screen select Menu > Settings > About phone, and look for the Build number (near the bottom). If you see this:

kila-user 1.0 TC4-RC29 115247 ota-rel-keys,release-keys (US)

kila_uk-user 1.0 TC5-RC7 112931  (UK)

then you’re vulnerable. If you see anything later than RC29 in the US or RC7 in the UK then you already have the fix.

Because Android is open source, the problem was quickly tracked down by users to a couple lines in the system file init.rc. My guess is that this was accidentally left in during device debugging. Thankfully the fix is trivial; you can probably even make it yourself if you’re so inclined (just comment out the offending lines described in the reports above and reboot).

Here’s a workaround I just discovered: Open the keyboard and type these 5 keystrokes: <return>-c-a-t-<return>. That will cause the phantom shell to not listen to commands any more, at least until the next reboot.

A patch from Google should be on its way soon. Meanwhile, be careful what you type.

Updated 10Nov2008: The patch installed itself on my G1 this weekend. I can verify that the bug has been fixed, so it’s safe to type “rm -r” in your instant messages again.

Ed BurnetteEd Burnette is a professional developer and author of several articles and books about computing including Hello, Android: Introducing Google's Mobile Development Platform, 2nd Edition. For disclosure of Ed's industry affiliations, click here or to view his full profile click here.

Email Ed Burnette

Subscribe to Dev Connection via Email alerts or RSS.

  • Talkback
  • Most Recent of 42 Talkback(s)
RE: Worst. Bug. Ever.
Good to know about unix hosting voip.Worst bug ever that silently and invisibly interpreted as a command and executed with superuser privileges.... (Read the rest)
Posted by: jason12343 Posted on: 07/22/09 You are currently: a Guest | | Terms of Use
sounds like....  ridingthewind | 11/07/08
LMAO... nt  T1Oracle | 11/07/08
I had to look this one up  Ed BurnetteZDNet Moderator | 11/07/08
good story anyway  ridingthewind | 11/07/08
Steve Jobs at Oracle World ('98?)  daboochmeister | 11/10/08
Confirmed.  andrew.nuscaZDNet Moderator | 11/07/08
Android is a java framework it doesn't have an init.rc  stevey_d | 11/07/08
Android IS NOT a java framework.  aphistic | 11/07/08
Its ALL Android  storm14k | 11/08/08
my bad.  stevey_d | 11/09/08
IOW...  mejohnsn | 11/12/08
RE: Worst. Bug. Ever.  jasonwheeler | 11/07/08
Please do...  storm14k | 11/08/08
Message has been deleted.  rkrenzis | 11/08/08
Do *not* type "rm -rf /*"  gmatht | 11/08/08
Already reported. Just stupid.  TripleII | 11/09/08
G1 is linux based  qmlscycrajg | 11/08/08
Are you sure about that?  rkrenzis | 11/08/08
Oh really? Then why do the paypal servers run linux?  g2g591 | 11/08/08
Wow... just wow...  zagman76@... | 11/08/08
Irrelevant is right  seanferd | 11/10/08
this isn't about the linux kernel  stevey_d | 11/09/08
RE: Worst. Bug. Ever.  Bert0 | 11/08/08
RE: Worst. Bug. Ever.  james_p | 11/08/08
cat  bjepson | 11/08/08
Do *not* type "rm -rf /*"  gmatht | 11/08/08
It is the worst oversight, to be sure, but not a bug.  TripleII | 11/09/08
If its from MS its a bug. Nice try though but you're foolling no one. NT  transposeIT | 11/09/08
Not trying to fool anyone, it's not a bug.  TripleII | 11/10/08
It's a bug  jgaskell | 11/10/08
Is not  FatherJ | 11/11/08
Is SED installed?  TripleII | 11/09/08
RE: Worst. Bug. Ever.  rjt@... | 11/10/08
Old Patriot guidance & firing system  seanferd | 11/10/08
RE: Worst. Bug. Ever.  Alan Smithie | 11/11/08
RE: Worst. Bug. Ever.  mejohnsn | 11/12/08
There are worse bugs  AzuMao | 11/12/08
Vista and Retards  neverhome | 11/12/08
Like I said,,  AzuMao | 11/13/08
There is nothing retarded about his post  markbn | 11/17/08
Actually..  AzuMao | 11/18/08
RE: Worst. Bug. Ever.  jason12343 | 07/22/09

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement

Recent Entries

Archives

Favorite Links

ZDNet Blogs

White Papers, Webcasts, and Downloads