DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Zhang Tengfei <zhtfdev@gmail.com>
Cc: Jiawen Wu <jiawenwu@trustnetic.com>,
	Zaiyu Wang <zaiyuwang@trustnetic.com>,
	dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] net/txgbe: fix use-after-free in flow destroy
Date: Thu, 10 Sep 2026 08:53:34 -0700	[thread overview]
Message-ID: <20260910085334.5dc6872a@phoenix.local> (raw)
In-Reply-To: <20260910133941.77565-1-zhtfdev@gmail.com>

On Thu, 10 Sep 2026 21:39:41 +0800
Zhang Tengfei <zhtfdev@gmail.com> wrote:

> TAILQ_FOREACH advances via the current node's next pointer. Removing
> and freeing that node inside the loop reads freed memory on the next
> iteration.
> 
> Find the matching entry first, then remove it after the loop.
> 
> Fixes: e342da2d438f ("net/txgbe: support destroying consistent filter")
> Cc: stable@dpdk.org
> 

OK, another option would be to use TAILQ_FOREACH_SAFE which several other
drivers do. I have a patch series to cleanup the queue macros but waiting.

  reply	other threads:[~2026-09-10 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 13:39 [PATCH] net/txgbe: fix use-after-free in flow destroy Zhang Tengfei
2026-09-10 15:53 ` Stephen Hemminger [this message]
2026-09-10 16:15   ` dev zhang

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=20260910085334.5dc6872a@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=jiawenwu@trustnetic.com \
    --cc=stable@dpdk.org \
    --cc=zaiyuwang@trustnetic.com \
    --cc=zhtfdev@gmail.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