http://bugs.winehq.org/show_bug.cgi?id=34479
Bug #: 34479 Summary: Advantage Cooking: crashes on start Product: Wine Version: 1.7.1 Platform: x86 URL: http://advantagecooking.com/html/downloads.html OS/Version: Linux Status: NEW Keywords: download, obfuscation Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com Classification: Unclassified
Created attachment 45912 --> http://bugs.winehq.org/attachment.cgi?id=45912 relay,seh,tid trace
A user asked about this in #winehq. Installs fine, but crashes on start: fixme:wbemprox:client_security_Release 0x7de6b2b8 fixme:reg:RegSetKeySecurity :(0xa0,4,0x154dd28): stub err:seh:raise_exception Unhandled exception code 80000001 flags 0 addr 0x7bc7fc39
protection ID reports it's using Armadillo 7.2.0: [!] Armadillo v7.20 (or newer) detected !
austin@aw25 ~ $ sha1sum AdvCooking211Installer30DG.exe 1db17ae7e00a309ab3dffa4f9f4708254bb5708f AdvCooking211Installer30DG.exe austin@aw25 ~ $ du -h AdvCooking211Installer30DG.exe 16M AdvCooking211Installer30DG.exe austin@aw25 ~ $ wine --version wine-1.7.1-190-g00e6951
http://bugs.winehq.org/show_bug.cgi?id=34479
--- Comment #1 from Austin English austinenglish@gmail.com 2013-09-09 18:18:29 CDT --- Created attachment 45913 --> http://bugs.winehq.org/attachment.cgi?id=45913 terminal output
http://bugs.winehq.org/show_bug.cgi?id=34479
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|-unknown |ntdll Summary|Advantage Cooking: crashes |Advantage Cooking: crashes |on start |on start (check for ATL | |thunk triggers unexpected | |guard page fault)
--- Comment #2 from Anastasius Focht focht@gmx.net 2013-09-09 19:59:52 CDT --- Hello folks,
confirming.
From a quick glance it seems the check for ATL thunk triggers a guard page
fault which the parent process (which acts as debugger) doesn't expect.
Source: http://source.winehq.org/git/wine.git/blob/f8cdbecc25b589ce3e008f9d735fbd9df...
--- snip --- 1602 static BOOL check_atl_thunk( EXCEPTION_RECORD *rec, CONTEXT *context ) 1603 { 1604 const struct atl_thunk *thunk = (const struct atl_thunk *)rec->ExceptionInformation[1]; 1605 BOOL ret = FALSE; 1606 1607 if (!virtual_is_valid_code_address( thunk, sizeof(*thunk) )) return FALSE; 1608 1609 __TRY 1610 { 1611 if (thunk->movl == 0x042444c7 && thunk->jmp == 0xe9) 1612 { 1613 *((DWORD *)context->Esp + 1) = thunk->this; 1614 context->Eip = (DWORD_PTR)(&thunk->func + 1) + thunk->func; 1615 TRACE( "emulating ATL thunk at %p, func=%08x arg=%08x\n", 1616 thunk, context->Eip, *((DWORD *)context->Esp + 1) ); 1617 ret = TRUE; 1618 } 1619 } 1620 __EXCEPT_PAGE_FAULT 1621 { 1622 return FALSE; 1623 } 1624 __ENDTRY 1625 return ret; 1626 } --- snip ---
Guard pages are for example used when CopyMem-II feature has been enabled in protection (client causes access fault, parent = debugger sees special exception type and writes decrypted page back to client process).
Regards
http://bugs.winehq.org/show_bug.cgi?id=34479
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Advantage Cooking: crashes |Multiple apps wrapped with |on start (check for ATL |Armadillo software |thunk triggers unexpected |protection scheme fail with |guard page fault) |unexpected guard page fault | |caused by Wine's ATL thunk | |check (Advantage Cooking, | |Wayne Gould's Sudoku)
--- Comment #3 from Anastasius Focht focht@gmx.net 2013-11-30 14:21:34 CST --- Hello folks,
another victim: "Wayne Gould's Sudoku" v1.1 by Pappocom
A user reported this app here: http://forum.winehq.org/viewtopic.php?f=8&t=20422
Download: http://gencon.crius.feralhosting.com/files/SudokuSetup.zip
The app is protected by Armadillo software protection scheme (two processes where one acts as debugger of the other).
--- snip --- -=[ ProtectionID v0.6.4.0 JULY]=- (c) 2003-2010 CDKiLLER & TippeX Build 07/08/10-17:57:05 Ready... Scanning -> Z:\home\focht.wine\drive_c\Program Files\Pappocom\Sudoku\Sud.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 839680 (0CD000h) Byte(s) [File Heuristics] -> Flag : 00000000000000001100001000000011 (0x0000C203) [!] Armadillo v3.78 detected ! [CompilerDetect] -> Visual C/C++ - Scan Took : 0.638 Second(s) --- snip ---
Trace log:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Pappocom/Sudoku
$ WINEDEBUG=+tid,+seh,+relay wine ./Sud.exe >>log.txt 2>&1 ... 0026:Call user32.RegisterClassA(0033d590) ret=0034fcf4 0026:Ret user32.RegisterClassA() retval=0000c04f ret=0034fcf4 0026:Call KERNEL32.CreateThread(00000000,00000000,00350459,00000000,00000000,0033d5c4) ret=0034fc2a 0026:Ret KERNEL32.CreateThread() retval=000000ac ret=0034fc2a 0026:trace:seh:raise_exception code=80000001 flags=0 addr=0x7bc83bbe ip=7bc83bbe tid=0026 0024:Ret KERNEL32.WaitForDebugEvent() retval=00000001 ret=00488e75 0024:Call KERNEL32.GetLocalTime(0033bad4) ret=00498b56 0024:Ret KERNEL32.GetLocalTime() retval=00000001 ret=00498b56 0024:Call KERNEL32.GetSystemTime(0033bac4) ret=00498b60 0024:Ret KERNEL32.GetSystemTime() retval=00000001 ret=00498b60 0024:Call ntdll.RtlAllocateHeap(005b8000,00000000,00000010) ret=00498f79 0024:Ret ntdll.RtlAllocateHeap() retval=005b9040 ret=00498f79 0024:Call KERNEL32.ContinueDebugEvent(00000025,00000028,00010002) ret=0048b574 0024:Ret KERNEL32.ContinueDebugEvent() retval=00000001 ret=0048b574 0024:Call KERNEL32.GetExitCodeProcess(00000058,004b4a58) ret=00486e45 0026:trace:seh:raise_exception info[0]=00000000 0028:Call PE DLL (proc=0x7ed2af30,module=0x7ec70000 L"user32.dll",reason=THREAD_ATTACH,res=(nil)) 0024:Ret KERNEL32.GetExitCodeProcess() retval=00000001 ret=00486e45 0026:trace:seh:raise_exception info[1]=00453976 0028:Ret PE DLL (proc=0x7ed2af30,module=0x7ec70000 L"user32.dll",reason=THREAD_ATTACH,res=(nil)) retval=1 0024:Call KERNEL32.WaitForDebugEvent(0033cbbc,000003e8) ret=00488e75 0028:Call PE DLL (proc=0x7e82ce9c,module=0x7e7d0000 L"winex11.drv",reason=THREAD_ATTACH,res=(nil)) 0026:trace:seh:raise_exception eax=00453976 ebx=7bccf000 ecx=9b0e6441 edx=0033d168 esi=0033d294 edi=00453976 0028:Ret PE DLL (proc=0x7e82ce9c,module=0x7e7d0000 L"winex11.drv",reason=THREAD_ATTACH,res=(nil)) retval=1 0026:trace:seh:raise_exception ebp=0033d238 esp=0033d140 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010246 0028:Call PE DLL (proc=0x7e702500,module=0x7e6e0000 L"ws2_32.dll",reason=THREAD_ATTACH,res=(nil)) 0028:Ret PE DLL (proc=0x7e702500,module=0x7e6e0000 L"ws2_32.dll",reason=THREAD_ATTACH,res=(nil)) retval=1 0028:Call PE DLL (proc=0x7d9fa5e0,module=0x7d9a0000 L"rpcrt4.dll",reason=THREAD_ATTACH,res=(nil)) 0024:Ret KERNEL32.WaitForDebugEvent() retval=00000001 ret=00488e75 0024:Call KERNEL32.GetLocalTime(0033bad4) ret=00498b56 0024:Ret KERNEL32.GetLocalTime() retval=00000001 ret=00498b56 0024:Call KERNEL32.GetSystemTime(0033bac4) ret=00498b60 0024:Ret KERNEL32.GetSystemTime() retval=00000001 ret=00498b60 0024:Call KERNEL32.GetThreadContext(0000005c,0033c8d4) ret=004890bd 0024:Ret KERNEL32.GetThreadContext() retval=00000001 ret=004890bd 0024:Call KERNEL32.ContinueDebugEvent(00000025,00000026,80010001) ret=0048b574 0024:Ret KERNEL32.ContinueDebugEvent() retval=00000001 ret=0048b574 0024:Call KERNEL32.GetExitCodeProcess(00000058,004b4a58) ret=00486e45 0026:trace:seh:call_stack_handlers calling handler at 0x7bc9dc83 code=80000001 flags=0 ... --- snip ---
The debugger process doesn't expect the guard page fault.
$ sha1sum SudokuSetup.exe 2b33811b1456689939676908f036f5e0df45b4d5 SudokuSetup.exe
$ du -sh SudokuSetup.exe 2.1M SudokuSetup.exe
$ wine --version wine-1.7.7-230-g2507330
Regards
https://bugs.winehq.org/show_bug.cgi?id=34479
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- This series should fix the issue. Could someone confirm please?
https://github.com/wine-compholio/wine-staging/tree/master/patches/ntdll-ATL...
https://bugs.winehq.org/show_bug.cgi?id=34479
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |34b2d920b47122007b65d435e06 | |4d018fb37b21f Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
the software protection scheme is happy now :)
Fixed by commit http://source.winehq.org/git/wine.git/commitdiff/34b2d920b47122007b65d435e06...
Thanks Sebastian
Regards
https://bugs.winehq.org/show_bug.cgi?id=34479
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.29.