|WARNING| [v2] app/testpmd: fix VXLAN-GPE and GENEVE custom port parsing
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Nov 10 23:05:28 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/172792
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-10
**Error: inner-header bounds check omits the outer L4 and tunnel header lengths**
In `can_process_inner_headers()`:
```c
headers_len = hdr_lens->l2_len + hdr_lens->l3_len +
hdr_lens->inner_l2_len + hdr_lens->inner_l3_len +
hdr_lens->inner_l4_len;
```
The caller locates the inner Ethernet header at outer L2 + L3 + L4 + tunnel header:
```c
eth_hdr = (struct rte_ether_hdr *)((char *)l3_hdr +
hdr_lens.l3_len + hdr_lens.l4_len +
hdr_lens.tunnel_len);
```
`headers_len` therefore undercounts the real end of the inner headers by `hdr_lens->l4_len + hdr_lens->tunnel_len`. For VXLAN-GPE or GENEVE that is at least 16 bytes: 8 for the UDP header plus 8 for the tunnel header, more if GENEVE options are present.
A packet whose first segment ends inside the inner L3/L4 headers still passes this check. `get_ethertype_by_ptype()`, `parse_l4_proto()` and the later inner checksum code then read past `data_len`. This is exactly the truncated or non-contiguous case the commit message says this patch prevents.
Suggested fix:
```c
headers_len = hdr_lens->l2_len + hdr_lens->l3_len +
hdr_lens->l4_len + hdr_lens->tunnel_len +
hdr_lens->inner_l2_len + hdr_lens->inner_l3_len +
hdr_lens->inner_l4_len;
```
Review-Result: ERROR
More information about the test-report
mailing list