netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Xiang Mei <xmei5@asu.edu>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	security@kernel.org, netdev@vger.kernel.org, jhs@mojatatu.com,
	jiri@resnulli.us
Subject: Re: [PATCH net] net/sched: sch_qfq: Fix NULL deref when deactivating
Date: Thu, 11 Dec 2025 18:23:03 +0900	[thread overview]
Message-ID: <20251211182303.5251e1e2@kernel.org> (raw)
In-Reply-To: <CAPpSM+T51DDkcSehkc-3r3FbcYQzXkTq4LGx8RRfD2fACwM8pg@mail.gmail.com>

On Mon, 8 Dec 2025 15:17:57 -0700 Xiang Mei wrote:
> Sorry for not explaining that. This PoC could be complex to use TC to
> trigger. I was thinking about the same thing: transforming this C
> program to `tc` commands so we can have a tc-tests case, but this bug
> is related to a race condition.
> 
> We have to use racing to create the state mentioned in the commit
> message: "Two qfq_class objects may point to the same
> leaf_qdisc"(Racing between tc_new_tfilter and qdisc_delete). I failed
> to find a clean way to use `tc` to trigger this race after several
> hours of trial, so I gave up on that. For non-race condition bugs,
> I'll try to provide self-tests.

Speaking under correction here, but you can submit the test as C code
to the tools/testing/selftests/net directory. It doesn't have to use
existing bash tooling. It needs to follow kernel coding style as Cong
alluded to, however. Ideally if you could rewrite the reproducer to use
YNL C that'd be save a lot of netlink boilerplate.. I think QFQ is
supported by YNL tho not sure if that support is sufficient.

Two more asks/questions
 - could you please add the crash info to the commit message
 - there is a similar code construct in qfq_deact_rm_from_agg()
   does it also need to be fixed?

And a reminder to not top post on the kernel mailing lists, please.
-- 
pw-bot: cr

  reply	other threads:[~2025-12-11  9:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05  1:48 [PATCH net] net/sched: sch_qfq: Fix NULL deref when deactivating Xiang Mei
2025-12-05  2:11 ` Xiang Mei
2025-12-07 22:45   ` Cong Wang
2025-12-08 22:17     ` Xiang Mei
2025-12-11  9:23       ` Jakub Kicinski [this message]
2025-12-15  0:23         ` Xiang Mei

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=20251211182303.5251e1e2@kernel.org \
    --to=kuba@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=security@kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    --cc=xmei5@asu.edu \
    /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).