DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Maayan Kashani <mkashani@nvidia.com>, dev@dpdk.org
Cc: stable@dpdk.org, Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Gregory Etelson <getelson@nvidia.com>
Subject: Re: [PATCH] net/mlx5: fix ASan issue in RSS flow creation
Date: Mon, 18 Aug 2025 09:34:01 +0300	[thread overview]
Message-ID: <12005597-ea5d-4d73-9b63-748894f64f6e@nvidia.com> (raw)
In-Reply-To: <20250805132058.50966-1-mkashani@nvidia.com>

Hi,


On 05/08/2025 4:20 PM, Maayan Kashani wrote:
> This patch addresses AddressSanitizer (ASan) stack-use-after-scope
> issues occurring during RSS flow creation in the MLX5 driver.
> The root cause stemmed from the use of compound literals to
> initialize flow action configurations, which could result in
> pointers to temporary stack memory being retained in flow structures.
> When these pointers were later accessed during flow conversion,
> the underlying stack memory was no longer valid,
> leading to ASAN-detected errors.
> 
> Modifications:
> In mlx5_hw_rss_ptype_create_base_flow(),
> the struct rte_flow_action_jump is now constructed
> at the start of the function, rather than within the do statement.
> This ensures a persistent stack allocation for the structure,
> preventing use-after-scope situations.
> 
> This change eliminates the following ASan errors:
> stack-use-after-scope reported in rte_flow_conv_copy
> 
> Fixes: ae67e3c43dd5 ("net/mlx5: support RSS expansion in non-template HWS setup")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh


      reply	other threads:[~2025-08-18  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 13:20 Maayan Kashani
2025-08-18  6:34 ` Raslan Darawsheh [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=12005597-ea5d-4d73-9b63-748894f64f6e@nvidia.com \
    --to=rasland@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=getelson@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=mkashani@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /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;
as well as URLs for NNTP newsgroup(s).