[Bug 39439] New: calling CreateProcess from windows code on a program binary mounted with noexec crashes wine

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Oct 12 07:10:20 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=39439

            Bug ID: 39439
           Summary: calling CreateProcess from windows code on a program
                    binary mounted with noexec crashes wine
           Product: Wine
           Version: 1.7.51
          Hardware: x86-64
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: kernel32
          Assignee: wine-bugs at winehq.org
          Reporter: hramrach at gmail.com
      Distribution: ---

I moved a windows application from a failed disk partition to a flash drive.

I mounted the flash drive using pmount which adds the noexec flag.

Executing the application as in 

wine ./Client.exe works. 

However, the application also spawns Client.bin (presumably using
CreateProcess) and that binary crashes on start when spawned from noexec
filesystem. It raises an exception very early in Wine code so I guess the
application is in no position to catch it. And it raises it in the spawned
application, not the spawning application. The Client.bin itself is not
executable (as in +x mode).

I can add traces if needed but this should be easy to reproduce.

I see multiple related problems here

1) wine does not check the noexec flag when loading a binary initially from the
commandline but does check it (or uses a library function that does) when a
windows application calls spawn or clone or whatever - inconsistency

2) wine checks the noexec in the wrong place - it should check before
performing CreateProcess and report error in the calling application but it
fails executing the created process and crashes

3) when wine fails executing an application due to the noexec flag it should
produce an intelligible error message rather than crash

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list