Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application hard crashing if WSARecvFrom is provided with lpFromlen larger than wsaddr - (Xenia Netplay Emulator) - fixed in downstream Wine #270

Open
DeNo64 opened this issue Feb 13, 2025 · 0 comments

Comments

@DeNo64
Copy link

DeNo64 commented Feb 13, 2025

Currently experiencing hard crashes when using Xenia Canary Netplay on Proton, whenever searching for a SystemLink match or when another client attempts to join a SystemLink match.

tl;dr - require downsteam Wine commit to be pulled up to Proton to fix issue (specifically - https://gitlab.winehq.org/wine/wine/-/commit/d5bfa879088e7dfd3f79cdf724ce8f2880f872cb)

Not sure correct process. Happy to create my own PR, but assume changes like this are only pull from downstream Wine.

This is due to WSARecvFrom being provided an extremely large lpFromlen, as a placeholder until sockaddr_from_unix provides the correct value. The large value then overwriting data on the heap and crashes the application, before the correct addrlen value can be provided.
As the commits says; this is an application bug, but on Windows the From socket addr and addrlen are written to with the require data within the WSARecvFrom call and thus should be fixed here.

Removing memset( wsaddr, 0, wsaddrlen );, or changing it to memset( wsaddr, 0, sizeof(wsaddr) );, resolves the issues and allows SystemLink to function the same as windows.

Happy to provide more context if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant