Hi you all!
I'm doing Win32 DBI on Linux running Wine in a custom version of usermode QEMU
and I have several questions about error handling in Wine.
I need to disable the window (screenshot attached) that reports faults and let the program crash like any Linux binary.
There is an option that disable such window or I need to patch Wine?
Also, I want to hook functions used to report assertion errors that need user interaction without a real motivation,
like MessageBoxA, can i hook them with something similar to the ELF LD_PRELOAD?
(bonus OT question: how safe is to disable the preloader? it seems to work on Ubuntu 18.04 w/o problems).
Regards,
Andrea
Wine Error handling questions
Re: Wine Error handling questions
I need to disable the window (screenshot attached) that reports faults and let the program crash like any Linux binary.
There is an option that disable such window or I need to patch Wine?
Code: Select all
winetricks autostart_winedbg=disable
Re: Wine Error handling questions
Yeah thank you,
this disable the debugger window but do not let the program to crash.
$ wine ./djpeg.exe /home/andrea/Desktop/jpegfuzz/www/queue/id\:000001\,src\:000000\,time\:2908\,op\:havoc\,rep\:2\,+cov
wine: Unhandled page fault on write access to 0x00001c00 at address 0x241674 (thread 0009), starting debugger...
0009:err:seh:start_debugger Couldn't start debugger ("false") (2)
Read the Wine Developers Guide on how to set up winedbg or another debugger
andrea@malweisse:~/Desktop/jpegfuzz$ echo $?
5
Probably wine uses self-ptrace by default and I have to investigate in the code.
this disable the debugger window but do not let the program to crash.
$ wine ./djpeg.exe /home/andrea/Desktop/jpegfuzz/www/queue/id\:000001\,src\:000000\,time\:2908\,op\:havoc\,rep\:2\,+cov
wine: Unhandled page fault on write access to 0x00001c00 at address 0x241674 (thread 0009), starting debugger...
0009:err:seh:start_debugger Couldn't start debugger ("false") (2)
Read the Wine Developers Guide on how to set up winedbg or another debugger
andrea@malweisse:~/Desktop/jpegfuzz$ echo $?
5
Probably wine uses self-ptrace by default and I have to investigate in the code.
Re: Wine Error handling questions
Ok thank you I solved disabling sigation.
ntdll uses sigation for the excetion handling and preloading it with an empty function solves my first problem.
(https://github.com/andreafioraldi/WineAFLplusplusDEMO if you are curious).
Regards the second, my current idea is to patch the PE file to include an additional DLL with high priority that implements
and empty MessageBoxA function but this is ugly and a most viable solution (like LD_PRELOAD) is well accepted
Regards,
Andrea
ntdll uses sigation for the excetion handling and preloading it with an empty function solves my first problem.
(https://github.com/andreafioraldi/WineAFLplusplusDEMO if you are curious).
Regards the second, my current idea is to patch the PE file to include an additional DLL with high priority that implements
and empty MessageBoxA function but this is ugly and a most viable solution (like LD_PRELOAD) is well accepted
Regards,
Andrea