[Bug 43217] New: Wine cannot execute position-independent (PIE) host executables via CreateProcess()
https://bugs.winehq.org/show_bug.cgi?id=43217 Bug ID: 43217 Summary: Wine cannot execute position-independent (PIE) host executables via CreateProcess() Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs(a)winehq.org Reporter: osmanx(a)problemloesungsmaschine.de Distribution: --- Created attachment 58504 --> https://bugs.winehq.org/attachment.cgi?id=58504 script.sh: Test script to reproduce the problem; test.c: Windows program; hello.c: Host/Linux program The problem arises from the fact that `create_process_impl()` in `dlls/kernel32/process.c` ultimately calls `MODULE_get_binary_info()` in `dlls/kernel32/module.c` which detects PIE exectuables as ELF shared objects and thus sets `info->type = BINARY_UNIX_LIB;` instead of `info->type = BINARY_UNIX_EXE;`. I do not have enough knowledge about the precise way that Winelib apps are implemented or supposed to work, but the fact that PIE executables are in fact ELF shared objects and not ELF executables according to the ELF header, causes Wine to detect these as Winelib apps and ultimately invoke the wrong process creation path. The problem especially manifests on the just released Debian 9 Stretch because Debian 9 now uses PIE executables throughout the distribution and these cannot be started any more from within programs running on Wine. Tested with winehq-devel packages 2.10 as well as Debian 9 packaged Wine 1.8.7 and 2.0. Looking at Wine git master, the relevant code paths have not changed at all for quite some time, thus this very likely also applies to all other Wine versions as well. Non-PIE executables work fine. Test script (script.sh) to reproduce the problem as well as output of the test script attached. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Debian Keywords| |download, source, testcase CC| |austinenglish(a)gmail.com Version|unspecified |1.8.7 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Jens Reyer <jre.winesim(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jre.winesim(a)gmail.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/kernel32-MODUL | |E_get_binary_info CC| |dmitry(a)baikal.ru, | |erich.e.hoover(a)wine-staging | |.com, michael(a)fds-team.de Ever confirmed|0 |1 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 --- Comment #1 from Jörn Heusipp <osmanx(a)problemloesungsmaschine.de> --- Created attachment 58572 --> https://bugs.winehq.org/attachment.cgi?id=58572 script.sh: updated test script that also tests that Winelib executables are detected correctly I can confirm that winehq-staging packages 2.11.0~stretch (2017-06-27) fix the problem. I also verified that Winelib executables are still detected correctly. Updated test script attached in testscript2.tar. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair(a)hotmail.com --- Comment #2 from Alexandre Julliard <julliard(a)winehq.org> --- *** Bug 43628 has been marked as a duplicate of this bug. *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Julian Rüger <jr98(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98(a)gmx.net -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luca.cunegondi(a)ocme.com --- Comment #3 from Alexandre Julliard <julliard(a)winehq.org> --- *** Bug 43821 has been marked as a duplicate of this bug. *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |21149e63313797a1603ca496a4c | |876418605d495 Resolution|--- |FIXED Status|STAGED |RESOLVED --- Comment #4 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Fixed by http://source.winehq.org/git/wine.git/?a=commit;h=21149e63313797a1603ca496a4... -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 3.0-rc3. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x -- 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.
https://bugs.winehq.org/show_bug.cgi?id=43217 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |--- --- Comment #6 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 2.0.x milestone from bugs included in 2.0.5. -- 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.
participants (1)
-
wine-bugs@winehq.org