patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Robin Jarry <rjarry@redhat.com>
Cc: stable@dpdk.org, dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Zhirun Yan <yanzhirun_163@163.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>,
	stable@dpdk.org, Jerin Jacob <jerinjacobk@gmail.com>
Subject: Re: [PATCH dpdk] graph: fix use-after-free when updating edges with active graphs
Date: Tue, 11 Nov 2025 15:19:04 +0100	[thread overview]
Message-ID: <8104155.kIvqiD65kZ@thomas> (raw)
In-Reply-To: <CALBAE1Mhz+R=g7WyyNdx5vHugjL7ZFdYMbtrzzYnNXGA7SkigQ@mail.gmail.com>

10/11/2025 09:50, Jerin Jacob:
> On Sat, Nov 1, 2025 at 3:43 AM Robin Jarry <rjarry@redhat.com> wrote:
> >
> > After creating at least one graph and calling rte_node_edge_update to
> > add a new edge on a node which is in use in the graph, the node memory
> > is reallocated but the active graph still has a pointer to the freed
> > memory.
> >
> > When destroying the graph, it causes a use-after-free error detected by
> > libasan:
> >
> > ERROR: AddressSanitizer: heap-use-after-free
> > READ of size 8 at 0x7c4baa5e4da8 thread T0
> >     #0 0x0000005ad224 in graph_node_fini lib/graph/graph.c:256
> >     #1 0x0000005ae657 in rte_graph_destroy lib/graph/graph.c:504
> >     ...
> >
> > freed by thread T0 here:
> >     #0 0x7f1bac4e5e4b in realloc.part.0 (/lib64/libasan.so.8+0xe5e4b)
> >     #1 0x0000005ab6d7 in edge_update lib/graph/node.c:271
> >     #2 0x0000005abb1b in rte_node_edge_update lib/graph/node.c:339
> >     ...
> >
> > previously allocated by thread T0 here:
> >     #0 0x7f1bac4e5e4b in realloc.part.0 (/lib64/libasan.so.8+0xe5e4b)
> >     #1 0x0000005ab6d7 in edge_update lib/graph/node.c:271
> >     #2 0x0000005abb1b in rte_node_edge_update lib/graph/node.c:339
> >     ...
> >
> > Use malloc+memcpy and add an internal function to replace all references
> > to the old node memory before freeing it.
> >
> > Cc: stable@dpdk.org
> > Fixes: c59dac2ca14a ("graph: implement node operations")
> >
> > Signed-off-by: Robin Jarry <rjarry@redhat.com>
> 
> Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied, thanks.



      reply	other threads:[~2025-11-11 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31 22:13 Robin Jarry
2025-11-10  8:50 ` Jerin Jacob
2025-11-11 14:19   ` Thomas Monjalon [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=8104155.kIvqiD65kZ@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jerinjacobk@gmail.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=rjarry@redhat.com \
    --cc=stable@dpdk.org \
    --cc=yanzhirun_163@163.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).