From: Stephen Hemminger <stephen@networkplumber.org>
To: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
Cc: dev@dpdk.org, kishore.padmanabha@broadcom.com, stable@dpdk.org,
Artin Davari <artin.davari@broadcom.com>
Subject: Re: [PATCH v2] app/testpmd: fix segfault in flow rule parser
Date: Sun, 26 Jul 2026 09:40:55 -0700 [thread overview]
Message-ID: <20260726094055.08f4d0bc@phoenix.local> (raw)
In-Reply-To: <20260721190931.1321010-1-Mohammad-Shuab.Siddique@broadcom.com>
On Tue, 21 Jul 2026 13:09:31 -0600
Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com> wrote:
> From: Artin Davari <artin.davari@broadcom.com>
>
> Replace temporary stack arrays in the flow rule parser with static
> arrays in three parse functions - prefix spec, RSS type, and RSS
> queue handling - to prevent invalid pointer access during parsing
> of complex flow rules.
>
> NEXT_ENTRY() expands to a compound literal, which has automatic
> storage duration when used inside a function body. The parser stores
> the resulting pointer in ctx->next[], which is dereferenced after the
> function returns, so the stack storage backing it is no longer valid
> by the time it is accessed. Declaring the arrays 'static const' gives
> them a lifetime that outlives the call, fixing the dangling pointer.
>
> Fixes: c439a84f1a78 ("app/testpmd: fix build with MSVC on non-constant initializer")
> Cc: stable@dpdk.org
>
> Signed-off-by: Artin Davari <artin.davari@broadcom.com>
> ---
Applied to next-net
prev parent reply other threads:[~2026-07-26 17:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 17:44 [PATCH] app/testpmd: fix segfault in flow rule parser Mohammad Shuab Siddique
2026-07-21 19:09 ` [PATCH v2] " Mohammad Shuab Siddique
2026-07-26 16:40 ` 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=20260726094055.08f4d0bc@phoenix.local \
--to=stephen@networkplumber.org \
--cc=artin.davari@broadcom.com \
--cc=dev@dpdk.org \
--cc=kishore.padmanabha@broadcom.com \
--cc=mohammad-shuab.siddique@broadcom.com \
--cc=stable@dpdk.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox