summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/pipe/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRuoyu Wang <ruoyuw560@gmail.com>2026-07-07 23:04:54 +0800
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2026-07-13 20:19:06 +0900
commitd52a13adbb8ccbab99cd3bad36804e87d8b5c052 (patch)
tree6791c52e30f3c3a0919d4fb7b17a95db6e2b7f61 /tools/testing/selftests/pipe/git@git.tavy.me:linux.git
parenta13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff)
firewire: net: Fix fragmented datagram reassembly
fwnet_frag_new() keeps a sorted list of received fragments for a partial datagram. When a new fragment is adjacent to an existing fragment, the code checks whether the new fragment also closes the gap to the next or previous list entry. Those neighbor lookups currently assume that the current fragment always has a real next or previous fragment. At a list edge, the next or previous entry is the list head, not a struct fwnet_fragment_info. The gap checks also compare against the old edge of the current fragment instead of the edge after adding the new fragment. As a result, a fragment that bridges two existing ranges may leave two adjacent ranges unmerged, so fwnet_pd_is_complete() can miss a complete datagram. Check for the list head before looking up the neighboring fragment, and compare the neighbor against the new fragment's far edge when deciding whether to merge all three ranges. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: c76acec6d551 ("firewire: add IPv4 support") Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com> Link: https://lore.kernel.org/r/20260707150454.2265951-1-ruoyuw560@gmail.com Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'tools/testing/selftests/pipe/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions