Skip to content

Ignore malformed LAN discovery replies - #5819

Open
acts-1631 wants to merge 1 commit into
supertuxkart:masterfrom
acts-1631:fix-lan-discovery-packet-length
Open

Ignore malformed LAN discovery replies#5819
acts-1631 wants to merge 1 commit into
supertuxkart:masterfrom
acts-1631:fix-lan-discovery-packet-length

Conversation

@acts-1631

Copy link
Copy Markdown

The LAN browser decodes every UDP reply in ServersManager::getLANRefreshRequest() on its request worker. A reply that ends before all advertised fields are present makes BareNetworkString throw std::out_of_range, which can terminate the discovery request.

Ignore replies that run out of data while they are decoded. Valid server replies follow the existing path unchanged, while malformed LAN packets no longer stop discovery.

LAN discovery decodes each UDP reply directly in its request worker. A
short reply could make BareNetworkString throw std::out_of_range and
terminate that worker.

Ignore replies that end while their fields are being decoded, leaving
valid replies unchanged and allowing discovery to continue.
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

Successfully merging this pull request may close these issues.

1 participant