🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4742

Re: [PATCH net v1] tipc: fix use-after-free of broadcast reception link at node release

#4742
From: netdev-bot+sashiko
Date: Mon, 19 Oct 2026 04:15
91 lines
9099 bytes
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?

> 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?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261015041435.33561-1-18983559317%40163.com
Technical Details
Message-ID: <179238333253.3135.7191451921379768629@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348286-linux-kernel-netdev=dewy.ru
References: <20261015041435.33561-1-18983559317@163.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348286-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v1] tipc: fix use-after-free of broadcast reception
 link at node release
Date: Mon, 19 Oct 2026 04:15:32 +0000
Organization: Usenet Network
Message-ID: <179238333253.3135.7191451921379768629@kernel.org>
References: <20261015041435.33561-1-18983559317@163.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3504109"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:RkK7/SHsOKvnVIXZgtEFAqqOncM= sha256:P2a98rQDN+k23eGfom7eSzlRekVjgmpToRyPvO18kUU=
	sha1:ikBcdQ6bO5oeDilETwQ1SC3zK8E= sha256:Zp7s0dezyFguVrEdLNx6Wv2De/EPEv87aqPba9/4XoU=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 97C0B110910; Mon, 19 Oct 2026 07:15:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.74
X-Spam-Status: No, score=-3.74 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.34, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id efVrLgMH_LvO;
	Mon, 19 Oct 2026 07:15:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-348286-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id EE97A1108E6; Mon, 19 Oct 2026 07:15:44 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id A7A2B2EA53; Mon, 19 Oct 2026 04:15:35 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 6542D37E5F7;
	Mon, 19 Oct 2026 04:15:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lg+P1ugP"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C26E36495F;
	Mon, 19 Oct 2026 04:15:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792383335; cv=none; b=g7q4R1Ax2MJdkc0mbPE/6hqqOX+Fe078SmvfnFjgJ6HVFBeMA3Y8KLWqzZZeNgEOe8nNFUb5OOm6nQIKNDMkfqVJq/M9+489Do3f0N884eHU3lC/IsfJlPogP/U4EXqAGiI/H0qYGk1n+MtTkcj/KwrJFLkQ1ki//5R7xgrGTeo=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792383335; c=relaxed/simple;
	bh=lbQApwyFsK1AN/jDGCjX+azc0pqRBIVecj48Wl+oCJk=;
	h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=kYVSSHmBOgndVq32T57j6VBBg2dVZdfb2kQoH89um2MRP/B5puaXlD1iIo5WK9c9NpC7Twmg1lKE0PW9VZGk9SgQFUCww54GyesD+v3k/oM7qr/BwrpBC/IaPcrK65DfXfTgDTccSM4xCej4yJn2jzOHNy3fnOumqXQBdneaEV0=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Lg+P1ugP; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 075EE1F000C4;
	Mon, 19 Oct 2026 04:15:32 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792383333;
	bh=eEDFB4c3y2TMX52j0LxtXZBSRR4PLSmQsxKLZd62VBI=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=Lg+P1ugPy3ykckHtO6I2Hbve64h2/VkZY22JjujCJ2cboiAaBmCg1+3pQigcNHloh
	 9I1rGEJbq/XnLquDJXLR/1DAlZwSS2VJCoNNONP57pEG5UWX7SeyRJG0UyTxolnMnv
	 ugMbxups6MCkghF9+NjxvZ6VQsJlsLGciD5NfI+ZLxPkSPtIDmJcn9eLOvE10j0uLV
	 gx3dsdRguc8a31xD8CDOe9EuZ9Xbdr8E5WzXVl1ZHm2c3Wan1O0/Lj07+llRxhL3j8
	 fD+uO32AGn42iUD5lPSc3uEJjJ3eAFarXAYFgyQJ+1sUKJlLVhfYh+VNrvjy1yQMDC
	 bQRY41v+PJcAw==
X-Cc: jmaloy@redhat.com, tung.quang.nguyen@est.tech, davem@davemloft.net,
 edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net,
 linux-kernel@vger.kernel.org
X-In-Reply-To: <20261015041435.33561-1-18983559317@163.com>
X-sashiko-severity: Medium
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>