Repository navigation
Conversation
acts-1631
force-pushed
the
fix/naomi-link-packet-validation
branch
from
November 9, 2026 15:38
69fb647 to
2c36812
Compare
acts-1631
force-pushed
the
fix/naomi-link-packet-validation
branch
from
November 26, 2026 15:04
2c36812 to
4d6850c
Compare
A link peer can advertise an excessive node count that later expands a communication RAM copy beyond its fixed buffer. Enforce the configured game topology, reject premature data packets, and validate send and receive layouts before accessing communication RAM.
acts-1631
force-pushed
the
fix/naomi-link-packet-validation
branch
from
December 4, 2026 19:46
4d6850c to
ab2096f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Naomi link peer can advertise an excessive node count in a UDP Start packet:
NaomiM3Comm::receiveNetworklater combines that count with the game’s communication slot size and copies the result into a fixed 128 KiB buffer:The node count and destination range are not validated. With link networking enabled, a malicious peer can follow the forged Start packet with a Data packet and cause the copy to overwrite memory beyond
comm_ram, crashing or corrupting Flycast.Enforce each supported game’s configured node limit, validate SyncReply and Start topology data, and ignore Data packets received before the network starts. Also validate inbound and outbound communication-RAM layouts against the protocol’s packet limit and the fixed buffer capacity before accessing memory.