Skip to content

Validate special ping packets before decoding - #5818

Merged
Alayan-stk-2 merged 1 commit into
supertuxkart:masterfrom
acts-1631:fix-ping-packet-length
Sep 16, 2026
Merged

Alayan-stk-2 merged 1 commit into
supertuxkart:masterfrom
acts-1631:fix-ping-packet-length

Conversation

@acts-1631

Copy link
Copy Markdown
Contributor

The client receive loop handles unencrypted ping packets before normal event parsing. It accepted any packet with the five-byte ping prefix, then read a timestamp and a counted peer list without first checking that those bytes were present. A malformed packet from a connected server could terminate the listening thread.

Check the fixed ping header before decoding it, then verify that the remaining packet contains every advertised peer record. Invalid ping packets are dropped before they reach the decoder.

The receive loop accepted a five-byte ping prefix, then read a timestamp

and a counted peer list without checking their lengths.

Reject packets shorter than the fixed header or the advertised peer

records before decoding them.
@acts-1631

Copy link
Copy Markdown
Contributor Author

A friendly ping if you have time, for this and #5819

@Alayan-stk-2 Alayan-stk-2 added this to the 1.5.1 milestone Sep 16, 2026
@Alayan-stk-2
Alayan-stk-2 merged commit 734f180 into supertuxkart:master Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants