|SUCCESS| [v2, 5/5] test/fib6: reproduce table overwrite on address wraparound
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Oct 27 16:28:45 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172180
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-27
# DPDK Patch Review
## PATCH 1/5: rib: fix undefined behavior in bit test
### Errors
None.
### Warnings
None.
### Info
None.
---
## PATCH 2/5: fib: fix full table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## PATCH 3/5: fib6: fix full table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## PATCH 4/5: test/fib: reproduce table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## PATCH 5/5: test/fib6: reproduce table overwrite on address wraparound
### Errors
None.
### Warnings
None.
### Info
None.
---
## Summary
This patch series fixes undefined behavior and correctness bugs in the RIB/FIB libraries:
**Patch 1** fixes undefined behavior in `rte_rib.c` where `1 << 31` (left shift of a signed int by 31 places) is undefined behavior in C. The fix correctly uses `1U << 31` to ensure the shift operates on an unsigned type. This is a clean fix for the UBSan-reported issue.
**Patches 2 and 3** fix serious correctness bugs where address wraparound at the top of the IPv4/IPv6 address space could cause `modify_fib()`/`modify_dp()` to overwrite the entire FIB table. The bugs occur when the last more-specific route ends exactly at the address space boundary (255.255.255.255 or ffff:...:ffff), causing the edge variables to wrap to 0/:: and continue processing. The fixes add the missing wraparound checks that were already present in the other code branch.
**Patches 4 and 5** add comprehensive test cases that reproduce both bugs without the fixes and verify correct behavior with the fixes.
All patches:
- Have correct `Fixes:` tags referencing the commits that introduced the bugs
- Include `Cc: stable at dpdk.org` for backporting
- Follow DPDK C coding style
- Add appropriate test coverage
- Use correct comparison style (explicit comparisons against 0/NULL)
- Have clear commit messages explaining the problem and solution
The code changes are minimal, surgical, and directly address the identified issues. The test additions properly use the `TEST_ASSERT` macros and integrate with the existing test infrastructure.
Review-Result: CLEAN
More information about the test-report
mailing list