From: Stephen Hemminger <stephen@networkplumber.org>
To: James Raphael Tiovalen <jamestiotio@gmail.com>
Cc: dev@dpdk.org, orika@nvidia.com, thomas@monjalon.net,
andrew.rybchenko@oktetlabs.ru, stable@dpdk.org
Subject: Re: [PATCH v2 0/2] ethdev: fix out-of-bounds writes in rte_flow_conv()
Date: Thu, 11 Jun 2026 11:15:47 -0700 [thread overview]
Message-ID: <20260611111547.0d2aadbe@phoenix.local> (raw)
In-Reply-To: <20260610113334.277895-1-jamestiotio@gmail.com>
On Wed, 10 Jun 2026 19:33:32 +0800
James Raphael Tiovalen <jamestiotio@gmail.com> wrote:
> 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.
>
> v2 fixes the merge conflict between patch 1 and the main branch.
>
> 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(-)
>
Applied to next-net, and added you to .mailmap
prev parent reply other threads:[~2026-06-11 18:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 11:33 [PATCH v2 0/2] ethdev: fix out-of-bounds writes in rte_flow_conv() James Raphael Tiovalen
2026-06-10 11:33 ` [PATCH v2 1/2] ethdev: fix out-of-bounds write in GENEVE option conversion James Raphael Tiovalen
2026-06-10 11:33 ` [PATCH v2 2/2] ethdev: fix out-of-bounds write in flex item conversion James Raphael Tiovalen
2026-06-11 18:15 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260611111547.0d2aadbe@phoenix.local \
--to=stephen@networkplumber.org \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=jamestiotio@gmail.com \
--cc=orika@nvidia.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.