[Bug 60204] New: AcceptEx broken for Unix-domain sockets
http://bugs.winehq.org/show_bug.cgi?id=60204 Bug ID: 60204 Summary: AcceptEx broken for Unix-domain sockets Product: Wine Version: 11.10 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs@list.winehq.org Reporter: me@purplesyringa.moe Target Milestone: --- Distribution: --- sockaddr_from_unix [1] is unimplemented for the AF_UNIX family. Normally that's not a problem, most callees ignore the -1 output silently, but fill_accept_output validates that it's non-negative and returns an error if so. Since errno is not set explicitly on this path, this just ends up forwarding the last native error, i.e. garbage. I'm not sure if the moral of the story is that sockaddr_from_unix should be validated everywhere else (from a quick glance at least IOCTL_AFD_WINE_GETPEERNAME seems to misbehave and return STATUS_BUFFER_TOO_SMALL in this case) and implemented for AF_UNIX, or if fill_accept_output should ignore errors just like other callers. [1]: https://gitlab.winehq.org/wine/wine/-/blob/9306b8e8de4efe3a6035bc5df878e7504... -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60204 --- Comment #1 from Ken Sharp <imwellcushtymelike@gmail.com> --- Which apps are affected by this? Are they available to download? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60204 --- Comment #2 from Alisa Sireneva <me@purplesyringa.moe> --- Created attachment 81890 --> http://bugs.winehq.org/attachment.cgi?id=81890 Binary reproducer I don't know any well-known program using this -- some async frameworks use AcceptEx, but at least Rust's tokio seems to have dropped it, and I don't think it ever supported it in combination with AF_UNIX. I want to submit a PR to Rust to use it by default, but that hasn't happened either. But I can provide a test program I'm working on that uncovered this. It tests IPC for https://github.com/purplesyringa/crossmist; you can find the relevant code using AcceptEx at [1], the CI job that passes on native Windows at [2], the Wine failure at [3], and the CI-built test at [4] (you want tmp.rOduF6V1VK). If that's not enough, I can provide a C reproducer in a bit if necessary. [1]: https://github.com/purplesyringa/crossmist/blob/7130fbe56e5e4272fdbad8499512... [2]: https://github.com/purplesyringa/crossmist/actions/runs/32373249949/job/9643... [3]: https://github.com/purplesyringa/crossmist/actions/runs/32373249949/job/9643... [4]: https://github.com/purplesyringa/crossmist/actions/runs/32373249949/artifact... -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60204 Alisa Sireneva <me@purplesyringa.moe> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81890|0 |1 is obsolete| | -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60204 --- Comment #3 from Alisa Sireneva <me@purplesyringa.moe> --- Created attachment 81891 --> http://bugs.winehq.org/attachment.cgi?id=81891 Binary reproducer Apologies, attached the wrong file. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60204 Alisa Sireneva <me@purplesyringa.moe> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source -- 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.
http://bugs.winehq.org/show_bug.cgi?id=60204 --- Comment #4 from Alisa Sireneva <me@purplesyringa.moe> --- I'm realizing my initial code analysis was wrong -- I assumed AF_UNIX sockets were part of the core Wine build, but they're actually in staging. The issue is that the ws2_32-af_unix patchset doesn't patch fill_accept_output in the commit where it patches getsockname and accept. -- 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)
-
WineHQ Bugzilla