https://bugs.winehq.org/show_bug.cgi?id=48735
Bug ID: 48735 Summary: OVERLAPPED struct has uninitialized bytes Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: jeffersoncarpenter2@gmail.com Distribution: ---
Created attachment 66619 --> https://bugs.winehq.org/attachment.cgi?id=66619 Configure output.
Steps to reproduce
* Check out 26ffc40bfb42b7c05ce9513bf479e31eb85294b1 (latest commit as of this posting). Configure and build wine. (Configure output attached) * Disable wine preloader to make valgrind a little quieter * Compile a test program (I used 'int main() { return 0; }') using i686-w64-mingw32-gcc * Run this under valgrind. Valgrind output attached.
The topmost error is
==30622== Syscall param writev(vector[...]) points to uninitialised byte(s) ... ==30622== by 0x406EFD80: process_send_command (rpc.c:1137)
The root cause is that the OVERLAPPED struct does not have Offset and OffsetHigh initialized before they are written into the wineserver request pipe.
In this case, the target file is the process_entry's control_pipe. MSDN specifies the Offset and OffsetHigh members must be zero when writing to a file that does not support seeking (https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-...).
https://bugs.winehq.org/show_bug.cgi?id=48735
--- Comment #1 from jeffersoncarpenter2@gmail.com --- Created attachment 66620 --> https://bugs.winehq.org/attachment.cgi?id=66620 Valgrind output.
https://bugs.winehq.org/show_bug.cgi?id=48735
--- Comment #2 from jeffersoncarpenter2@gmail.com --- Created attachment 66621 --> https://bugs.winehq.org/attachment.cgi?id=66621 A patch.
https://bugs.winehq.org/show_bug.cgi?id=48735
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang@codeweavers.com
--- Comment #3 from Zhiyi Zhang zzhang@codeweavers.com --- (In reply to jeffersoncarpenter2 from comment #2)
Created attachment 66621 [details] A patch.
Please send the patch to the wine-devel mail list.
https://bugs.winehq.org/show_bug.cgi?id=48735
--- Comment #4 from jeffersoncarpenter2@gmail.com --- (In reply to Zhiyi Zhang from comment #3)
(In reply to jeffersoncarpenter2 from comment #2)
Created attachment 66621 [details] A patch.
Please send the patch to the wine-devel mail list.
Sent. The wine-devel mailing list seems to be backed up so you should see it as soon as that thing flushes.
https://bugs.winehq.org/show_bug.cgi?id=48735
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Summary|OVERLAPPED struct has |Wine builtin services.exe |uninitialized bytes |process_send_command: | |OVERLAPPED struct for | |control pipe has | |uninitialized Offset and | |OffsetHigh fields Version|unspecified |5.3 Component|-unknown |programs
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
thanks for the report and patch contribution. A note fore the future: try to be more specific in the ticket summary line. "OVERLAPPED struct has uninitialized bytes" can mean *anything* *anywhere*. Mention the program/component/module/function, even if it's a Wine builtin. Thanks
Regards
https://bugs.winehq.org/show_bug.cgi?id=48735
--- Comment #6 from jeffersoncarpenter2@gmail.com --- (In reply to Anastasius Focht from comment #5)
Hello folks,
thanks for the report and patch contribution. A note fore the future: try to be more specific in the ticket summary line. "OVERLAPPED struct has uninitialized bytes" can mean *anything* *anywhere*. Mention the program/component/module/function, even if it's a Wine builtin. Thanks
Regards
OK, thanks.
https://bugs.winehq.org/show_bug.cgi?id=48735
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4dfd5f22f4032efdc283adf861d | |82e43c3b08d42 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #7 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by ttps://source.winehq.org/git/wine.git/?a=commit;h=4dfd5f22f4032efdc283adf861d82e43c3b08d42
https://bugs.winehq.org/show_bug.cgi?id=48735
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.4.
https://bugs.winehq.org/show_bug.cgi?id=48735
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=48735
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #9 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.1.