wxIPCSocketStreams::ReadData reads a length prefix from the connection and then reads that many bytes into the buffer returned by GetBufferAtLeast, but it never checks how many bytes actually arrived. That buffer is either freshly allocated and so uninitialised or, more commonly, the connection's own buffer reused from an earlier and possibly larger message, so a peer that announces more data than it sends and then drops the link leaves the unread tail untouched and it gets handed to OnExecute/OnPoke/OnAdvise with the full announced size, quietly leaking stale process memory across the connection. The socket reads are done in WAITALL mode so a short read only happens when the peer is broken or hostile, and every caller already treats a null return from ReadData as an error, so the safe thing is to return nullptr when fewer bytes than announced were read instead of using the partial buffer.
https://github.com/wxWidgets/wxWidgets/pull/26628
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Makes sense, thanks! Will merge soon.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Thank you. Appreciated
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()