DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ethdev: fix out-of-bounds writes in rte_flow_conv()
@ 2026-05-26 18:11 James Raphael Tiovalen
  2026-05-26 18:11 ` [PATCH 1/2] ethdev: fix out-of-bounds write in GENEVE option conversion James Raphael Tiovalen
  2026-05-26 18:11 ` [PATCH 2/2] ethdev: fix out-of-bounds write in flex item conversion James Raphael Tiovalen
  0 siblings, 2 replies; 4+ messages in thread
From: James Raphael Tiovalen @ 2026-05-26 18:11 UTC (permalink / raw)
  To: orika, thomas, andrew.rybchenko; +Cc: dev, stable, James Raphael Tiovalen

rte_flow_conv() is documented to truncate output to the caller-supplied
buffer size, but two paths handling variable-length trailing data
ignored that contract and copied the full payload whenever the
destination pointer was non-NULL. A caller passing a buffer just large
enough for the fixed-size header had adjacent memory clobbered:

- GENEVE_OPT: up to option_len * 4 bytes
- FLEX: up to 4 GiB, since src->length is a uint32_t and the API places
  no bounds on it

Patch 1 aligns the GENEVE_OPT guard with the sibling RAW branch, which
already gates its copy on the remaining buffer size.

Patch 2 plumbs the remaining buffer size into the flex-item desc_fn
callback (which previously took no size argument at all) and gates the
inner rte_memcpy() on it.

James Raphael Tiovalen (2):
  ethdev: fix out-of-bounds write in GENEVE option conversion
  ethdev: fix out-of-bounds write in flex item conversion

 lib/ethdev/rte_flow.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-27 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 18:11 [PATCH 0/2] ethdev: fix out-of-bounds writes in rte_flow_conv() James Raphael Tiovalen
2026-05-26 18:11 ` [PATCH 1/2] ethdev: fix out-of-bounds write in GENEVE option conversion James Raphael Tiovalen
2026-05-27 15:38   ` Stephen Hemminger
2026-05-26 18:11 ` [PATCH 2/2] ethdev: fix out-of-bounds write in flex item conversion James Raphael Tiovalen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox