On Tue, 21 Jul 2026 13:09:31 -0600
Mohammad Shuab Siddique <[email protected]> wrote:

> From: Artin Davari <[email protected]>
> 
> 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: [email protected]
> 
> Signed-off-by: Artin Davari <[email protected]>
> ---

Applied to next-net

Reply via email to