http://bugs.winehq.org/show_bug.cgi?id=24488
Summary: Kernel32 / Ntdll bug. Injecting code into sub process fails in Wine. Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: ron.novy@yahoo.com
Created an attachment (id=30900) --> (http://bugs.winehq.org/attachment.cgi?id=30900) doFork or code 'injection' test.
Wine fails when injecting code into a process created in suspend mode. When trying to access a created process' memory Wine simply does not allow it to be unmapped, written to or even change the process' memory protections.
The test case I've attached works on 32bit and 64bit windows systems without changing protections on the target process' memory. An explanation on how it should work is in the Readme.txt file.
A possible fix would be to allow writing to memory of a process started in suspend mode, but not on a process that is running. This should allow the code to be copied or 'injected' into the suspended process.