mirror of
https://github.com/torvalds/linux.git
synced 2026-07-26 17:20:32 +02:00
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:
|
||
|---|---|---|
| .. | ||
| .kunitconfig | ||
| core-card.c | ||
| core-cdev.c | ||
| core-device.c | ||
| core-iso.c | ||
| core-topology.c | ||
| core-trace.c | ||
| core-transaction.c | ||
| core.h | ||
| device-attribute-test.c | ||
| init_ohci1394_dma.c | ||
| Kconfig | ||
| Makefile | ||
| net.c | ||
| nosy-user.h | ||
| nosy.c | ||
| nosy.h | ||
| ohci-serdes-test.c | ||
| ohci.c | ||
| ohci.h | ||
| packet-header-definitions.h | ||
| packet-serdes-test.c | ||
| phy-packet-definitions.h | ||
| sbp2.c | ||
| self-id-sequence-helper-test.c | ||
| uapi-test.c | ||