net: clear IP defragmentation state after returning a complete packet
Get series with b4
b4 am [email protected] change-id 20260530-ip_defrag-130c345dd9dbVersions newest first
- v2 Latest2 patches 4 repliesIn review
- v11 patch 4 repliesSuperseded
Changes in v2 from the cover letter
- correct spelling in commit msg "mistakingly" -> "mistakenly"
- net.c: fix block comment formatting
- add regression test (net_defrag.c)
- Link to v1: https://lore.kernel.org/all/[email protected]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net: clear IP defragmentation state after returning a complete packetnet/ | +9 | 0 replies | |
| 2/2 | test: net: add IP defragmentation duplicate-fragment regression testtest/ test/ | +83 | 3 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass | Alessandro Rubini |
|---|---|---|
| 1/2 | R-b | A-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] net: clear IP defragmentation state after returning a complete packet
This series fixes incomplete clearing of the IP reassembly state (CONFIG_IP_DEFRAG): the static counters and hole list are not reset after a reassembled datagram is handed back to the caller. A duplicated final fragment is then processed against stale state, mis-parsing the delivered payload as the hole list, which can lead to re-delivery or out-of-bounds accesses.
Patch 1 contains the fix and the full rationale; patch 2 adds a unit test (run via "ut dm") that reproduces the duplicate-final-fragment case and guards against regressions.
---
Changes in v2:
- correct spelling in commit msg "mistakingly" -> "mistakenly"
- net.c: fix block comment formatting
- add regression test (net_defrag.c)
- Link to v1: https://lore.kernel.org/all/[email protected]
To: Ben Warren <[email protected]>
To: Alessandro Rubini <[email protected]>
To: [email protected]
Cc: Jerome Forissier <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Andrew Goodbody <[email protected]>
Cc: Max Merchel <[email protected]>
Cc: Yuya Hamamachi <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Mateusz Furdyna <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Alessandro Rubini <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Dinesh Maniyam <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Svyatoslav Ryhel <[email protected]>
Cc: Heiko Schocher <[email protected]>
Cc: "Lucien.Jheng" <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
---
Mateusz Furdyna (2):
net: clear IP defragmentation state after returning a complete packet
test: net: add IP defragmentation duplicate-fragment regression test
net/net.c | 9 ++++++ test/dm/Makefile | 1 + test/dm/net_defrag.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+)
---
base-commit: 30b77f6aa146c96b831cb4ece038130b655b6a41
change-id: 20260530-ip_defrag-130c345dd9db
Best regards,
Signature · 1 line
Mateusz Furdyna <[email protected]>