From: Tung Quang Nguyen <tung.quang.nguyen@est.tech>
To: "netdev-bot+sashiko@kernel.org" <netdev-bot+sashiko@kernel.org>,
"18983559317@163.com" <18983559317@163.com>
Cc: "jmaloy@redhat.com" <jmaloy@redhat.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"horms@kernel.org" <horms@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"tipc-discussion@lists.sourceforge.net"
<tipc-discussion@lists.sourceforge.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH net v1] tipc: fix use-after-free of broadcast reception link at node release
Date: Mon, 19 Oct 2026 08:51:33 +0000 [thread overview]
Message-ID: <AM7P189MB113773C71C4C14959CB38E5AC6982@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <179238333253.3135.7191451921379768629@kernel.org>
>Subject: Re: [PATCH net v1] tipc: fix use-after-free of broadcast reception link at
>node release
>
>Thank you for your contribution! Sashiko AI review found 2 potential
>issue(s) to consider.
>
>Critical: 0 · High: 0 · Medium: 1 · Low: 1
>
>If you believe none of the issues are legitimate, please reply to each issue of
>Medium severity or higher and explain why the AI is wrong.
>If any of them are legitimate and you plan to respin, please let patchwork
>know by including "pw-bot: cr" as a separate line at the end of your reply (one
>such reply per series is enough).
>
>- [Medium] The commit message contradicts itself about runtime evidence.
>- [Low] The commit message says the issue was found with a Coccinelle
> rule and 'LLM-assisted (GLM-5.3) code inspection', but the trailer…
>
>--
>
>tipc: fix use-after-free of broadcast reception link at node release
>
>This patch moves the kfree() of n->bc_entry.link out of
>tipc_node_kref_release() and into the tipc_node_free() RCU callback. As a
>result, the broadcast reception link is freed together with the enclosing
>tipc_node, after a grace period. Netlink walkers holding rcu_read_lock() can
>then no longer reach freed link memory.
>
>> Reproduced in a QEMU/KVM guest running v7.3.0 with KASAN and
>> PREEMPT(full): 10 TIPC peer namespaces on veth bearers, bearer removal
>> staggered so the 300 s node cleanup timers expire while other tasks
>> loop link dumps with the broadcast filter and reset-link-stats lookups.
>> KASAN hit within two cleanup cycles:
>>
>> BUG: KASAN: slab-use-after-free in strlen+0x85/0xa0
>
>[ ... ]
>
>> with the freed object being the kmalloc-1k tipc_link allocated by
>> tipc_link_bc_create() during peer discovery. The same defect fires in
>> strcmp() called from tipc_nl_node_reset_link_stats().
>
>[ ... ]
>
>> Found during a static-analysis-assisted audit: candidate sites were
>> surfaced by a Coccinelle rule, and the reader/writer paths were
>> confirmed by LLM-assisted (GLM-5.3) code inspection. The issue was
>> not observed at runtime; it is identified by code inspection only.
>
>[Severity: Medium]
>These two paragraphs seem to contradict each other. Which one is accurate?
>
>The earlier paragraph describes a QEMU/KVM reproduction. It includes a
>KASAN slab-use-after-free splat from:
>
> tipc_nl_node_dump_link()
> __tipc_nl_add_node_links()
> tipc_nl_add_bc_link()
> strlen()
>
>with the object freed from tipc_node_timeout() in timer softirq context. It also
>says the same defect fires in strcmp() called from
>tipc_nl_node_reset_link_stats().
>
>The closing paragraph says the issue was not observed at runtime and was
>found by code inspection only.
>
>If the reproduction and the KASAN log were really captured, could the "not
>observed at runtime" sentence be dropped? If the issue was found by
>inspection only, could the reproduction paragraph and the splat be removed?
>
Agree. I think your fix is correct but the changelog needs to be rewritten.
>> Fixes: d25a01257e42 ("tipc: fix crash during node removal")
>> Signed-off-by: Binbin Deng <18983559317@163.com>
>
>[Severity: Low]
>This isn't a bug, but the message says a Coccinelle rule and GLM-5.3 were
>used, and there is no Assisted-by: trailer.
>
>Documentation/process/coding-assistants.rst asks for one in this format:
>
> Assisted-by: LLM [TOOL1] [TOOL2]
>
>The "Using Assisted-by:" section of
>Documentation/process/submitting-patches.rst says:
>
> If you used any sort of advanced coding tool in the creation of your
> patch, you need to acknowledge that use by adding an Assisted-by tag.
> Failure to do so may impede the acceptance of your work.
>
>Could a trailer such as "Assisted-by: GLM-5.3 coccinelle" be added?
>
Agree. Please add above tag.
--
pw-bot: cr
prev parent reply other threads:[~2026-10-19 8:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 4:14 Binbin Deng
2026-10-19 4:15 ` netdev-bot+sashiko
2026-10-19 8:51 ` Tung Quang Nguyen [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=AM7P189MB113773C71C4C14959CB38E5AC6982@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM \
--to=tung.quang.nguyen@est.tech \
--cc=18983559317@163.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jmaloy@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tipc-discussion@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®