12.07.2015 Views

Bug Hunter Diary

Bug Hunter Diary

Bug Hunter Diary

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

I printed the current call stack:(gdb) backtrace#0 0x3493d5dc in MP4AudioStream::ParseHeader ()#1 0x3490d748 in AudioFileStreamWrapper::ParseBytes ()#2 0x3490cfa8 in AudioFileStreamParseBytes ()#3 0x345dad70 in PushBytesThroughParser ()#4 0x345dbd3c in FigAudioFileStreamFormatReaderCreateFromStream ()#5 0x345dff08 in instantiateFormatReader ()#6 0x345e02c4 in FigFormatReaderCreateForStream ()#7 0x345d293c in itemfig_assureBasicsReadyForInspectionInternal ()#8 0x345d945c in itemfig_makeReadyForInspectionThread ()#9 0x3146178c in _pthread_body ()#10 0x00000000 in ?? ()The first stack frame on the list was the one I was looking for. Iused the following command to display information about the currentstack frame of MP4AudioStream::ParseHeader():(gdb) info frame 0Stack frame at 0x1301c00:pc = 0x3493d5dc in MP4AudioStream::ParseHeader(AudioFileStreamContinuation&); savedpc 0x3490d748called by frame at 0x1301c30Arglist at 0x1301bf8, args:Locals at 0x1301bf8, Saved registers:r4 at 0x1301bec, r5 at 0x1301bf0, r6 at 0x1301bf4, r7 at 0x1301bf8, r8 at →0x1301be0, sl at 0x1301be4, fp at 0x1301be8, lr at 0x1301bfc, pc at 0x1301bfc,s16 at 0x1301ba0, s17 at 0x1301ba4, s18 at 0x1301ba8, s19 at 0x1301bac, s20 at →0x1301bb0, s21 at 0x1301bb4, s22 at 0x1301bb8, s23 at 0x1301bbc,s24 at 0x1301bc0, s25 at 0x1301bc4, s26 at 0x1301bc8, s27 at 0x1301bcc, s28 at →0x1301bd0, s29 at 0x1301bd4, s30 at 0x1301bd8, s31 at 0x1301bdc(gdb) continueContinuing.The most interesting information was the memory locationwhere the program counter (pc register) was stored on the stack. Asthe debugger output shows, pc was saved at address 0x1301bfc on thestack (see “Saved registers”).I then continued the execution of the process:Program received signal EXC_BAD_ACCESS, Could not access memory.Reason: KERN_PROTECTION_FAILURE at address: 0x000000720x00000072 in ?? ()After the crash, I looked at the stack location (memory address0x1301bfc) where the MP4AudioStream::ParseHeader() function expects tofind its saved program counter.The Ringtone Massacre 145

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

Saved successfully!

Ooh no, something went wrong!