Netdev List
 help / color / mirror / Atom feed
From: Lin Jiapeng <ljp1205831794@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: jiri@resnulli.us, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	netdev@vger.kernel.org, corvus@tencent.com, henrymei@tencent.com,
	stable@vger.kernel.org
Subject: Re: [PATCH net] net/sched: cls_api: fix tp_created race losing existing tcf_proto
Date: Fri, 7 Aug 2026 11:37:20 +0800	[thread overview]
Message-ID: <c8c6f8ea-3aba-4dbb-ab16-4f696441033c@gmail.com> (raw)
In-Reply-To: <CAM0EoMmM-7cphQGmfZa+H3p5HjQ71gJ=8J6-HhhRwzAv--74AA@mail.gmail.com>



在 2026/8/7 02:38, Jamal Hadi Salim 写道:
> Thanks. Please respond to that patch and add a tested-by tag
> 
>> BTW, "TencentOS Corvus AI" found this bug; and the patch was mannualy
> 
> Also add a reported-by tag to the patch response
> 
>> written and validated, so no `assisted-by` tag here. Noted for future
>> submissions.
> 
> It does look like there was some human touch to it (other than the
> verbose comment) - and is a reasonable patch except you missed one
> spot.
> I am wondering how you tested it. We had to craft printks to see the issue.
> 
> I was kind of suprised how quickly you found the issue. Victor had
> something already based on what Sashiko said but i said to wait until
> the first patch made it in.
> Does Corvus AI watch what Sashiko comments on?
> 
> cheers,
> jamal
Thanks for the review! Glad to share our testing approach.

For this bug we placed kprobes on tcf_chain_tp_delete_empty, 
tcf_proto_destroy and the classifiers' change() callbacks, capturing the 
tp pointer arguments ($argN) and return values. Matching tp pointers 
across the traced PIDs shows the losing thread calling delete_empty on a 
tp owned by the other racing thread — right after destroying its own 
tp_new, which is exactly the signature of tp_created not being reset. On 
an unpatched kernel we observed 927 such wrongful deletions in 3000 
rounds; with this patch applied, zero, and normal filter 
creation/deletion is unaffected.

As for how we found it so quickly: Corvus AI continuously explores bugs 
and security issues in the Linux kernel and generates reports. Each 
report ships with a PoC and a QEMU-based reproduction procedure, 
covering both static audit and dynamic verification; a human then 
reviews the report and reproduces the result before we post and patch 
the bugs.

cheers,
Aohan Mei

      reply	other threads:[~2026-08-07  3:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05  9:29 [PATCH net] net/sched: cls_api: fix tp_created race losing existing tcf_proto Aohan Mei
2026-08-05 17:52 ` Jamal Hadi Salim
2026-08-06  3:28   ` Aohan Mei
2026-08-06 18:38     ` Jamal Hadi Salim
2026-08-07  3:37       ` Lin Jiapeng [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=c8c6f8ea-3aba-4dbb-ab16-4f696441033c@gmail.com \
    --to=ljp1205831794@gmail.com \
    --cc=corvus@tencent.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=henrymei@tencent.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /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