🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22996

Re: [PATCH net v3] mac802154: validate pinned interface before beacon transmission

#22996
From: Stefan Schmidt
Date: Thu, 26 Nov 2026 09:24
24 lines
8348 bytes
Hello Yifan Zhang.

On Wed, 04 Nov 2026 17:56:53 +0800, Yifan Zhang wrote:
> mac802154_beacon_worker() selects a beacon request under RCU and pins
> the corresponding netdev before dropping the read lock.  The transmit
> helper used to read the request again, so a concurrent interface switch
> could make it dereference an unpinned netdev.
> 
> Use the pinned wpan_dev throughout transmission.  Under RTNL, verify that
> the request still belongs to that interface and that the interface is
> running.  Build the beacon from the protected template while still
> holding RTNL, then hand it to the locked MLME transmit helper.  Free the
> skb only on errors before that handoff.
> 
> [...]

Applied to wpan/wpan.git, thanks!

[1/1] mac802154: validate pinned interface before beacon transmission
      https://git.kernel.org/wpan/wpan/c/95f866334454

regards,
Stefan Schmidt
Technical Details
Message-ID: <179568504196.1941682.10640221246377134318.b4-ty@datenfreihafen.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371995-linux-kernel-netdev=dewy.ru
References: <179337523079.51423.6573078122047317758@stu.pku.edu.cn> <179378621331.55520.8126896786309171541@stu.pku.edu.cn>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371995-linux-kernel-netdev=dewy.ru
From: stefan@datenfreihafen.org (Stefan Schmidt)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3] mac802154: validate pinned interface before beacon transmission
Date: Thu, 26 Nov 2026 10:24:06 +0100
Organization: Usenet Network
Message-ID: <179568504196.1941682.10640221246377134318.b4-ty@datenfreihafen.org>
References: <179337523079.51423.6573078122047317758@stu.pku.edu.cn> <179378621331.55520.8126896786309171541@stu.pku.edu.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="426946"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ZjkNbv3hYL7qNP+qaFpnm8pRTpc= sha256:if8CDgCgNRXbrShOJme5uPvsc2a7+COszOFBaWFexwY=
	sha1:X/oqJqGK1QRCGvMaSzqoPc7kSGg= sha256:jrs3pWVTwtiZcTatTxEIeDACpmjB0C4KPnfKpYrAKeo=
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 D83D5125EBC; Thu, 26 Nov 2026 12:24:23 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	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-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 SsGOogQKj9eK;
	Thu, 26 Nov 2026 12:24:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-371995-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=datenfreihafen.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id D53D9125EB7; Thu, 26 Nov 2026 12:24:16 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 45DD536108; Thu, 26 Nov 2026 09:24:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795685054;
	b=jXrdSS/9CcJv1RME4U4rgZbKxpSDxWilou8bhm3tmPagVAg6sltuY1dRtbwi0tFMjMPs
	 Cp/aXBgM0RVkBf2HocXkHO1YcmF3imyWq6xsO3DnmYjwT+YhUQEfzuaFWRHuhEOqOH8ln
	 ZniF9fEVqctFdoUf6zskIUCeimJ7H0k5zcT/Ektj1HsKcgk3exEWIMHYR+nuaaiX03dNT
	 27gmRKk/B7BBwdZy+8YgFsX5lSOQmSYD4NoVblUajobPGTTHJDMKZzZyBfvvYKKvyD31S
	 4wP6wtEZXPGNLZWIHoqSyJNHG657ZvcMy4vmr9hmA2qD4YJWOMERTGLmfvXXg3c71zw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795685054;
	h=X-Original-To:Received:DMARC-Filter:Received:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=98AuoaBy6scAqdpD1bFpY8R263vuCvhHxS6e/zP2npM=;
	b=w831QVs7QKHk7Y87Ju+k74zAyogLcbgn/yo95UvrHlvfeFQntgnD+pAsFS38E72fT47D
	 PYDtRwn9luHvpjlYO/8nexLbIhxVBDtkxXV4e4BtpG/AlJtk1ONHHNDVivwYzWQ/dM+/C
	 gUhk3f41aUL6IStXnFyo4ws0e1919eC41e9sXIXVafag8sVrJi4Hbt7zSdopnj2QLC+6w
	 zL+E2XzWY7TCkXcO4US7DpjDDJ+9kWssin9zWllQEGd41zK35arTRWhv0ssUg118pdLXc
	 BoEkuYc3gxIqwnNARtXFlFby1qlCBbu4Uept+zpQiGZRk2OFF45u35pjEAY4ME7FEdA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=datenfreihafen.org;
	spf=pass smtp.mailfrom=datenfreihafen.org;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 872F2606A330;
	Thu, 26 Nov 2026 09:24:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=78.47.171.185
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795685053;
	b=wlC2vGmV02zopNbMKWXlibcccwYRCtolpocYcd7Xhqmky1uqNnUmLpfPwXwnoMS6aEbF
	 WtXbHutP9Dj1vTv5ZDY1ewreOW1DABoaH/RkvLXI3d/oytFCLoivkhI//D2itB9ZZQ3qy
	 PhDuIGJHZ/TTc2NGw3lxiz9bgsaDMQm3NE/4DSv3Bz3vMbErXfz216n1fX4tuBxIR0O8/
	 CSxIudo4H/pJ/rAXWG4Ur1tONfv6DWyibS3vKB4jaK5L/4d1aqHQhBGwP0Rvv25P28ZXr
	 e6ZwkPVxGbjjcif/0CyEaAkAv4NsyjDRjbfl6NCPK4f5YGBNkRjSWjrpQIXmHZdqDPQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795685053;
	h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 In-Reply-To:References:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=98AuoaBy6scAqdpD1bFpY8R263vuCvhHxS6e/zP2npM=;
	b=xTjQE0IKrkNipZUqajEbNVGXKP/+I3WVFmuxo5srmxHk2SGTtiD8SHcWTku+RI2soIl2
	 Vq00QRLz20xbtE9OL2Wy2sWNrjRjmWzoEQCxo57MZAP6eT2uV3y9pFisD5oeYxg0rlYQn
	 6RrSKhinijEiJ62ZTMI9Gk09odJ7u9Okvz+NAAZFokAoL5uZdYT9emlDeeb2Wt1oajbh4
	 0FgD02eYMpw9uI59oGtwD4MXSkVRGmpw2Uemqs+TNUF1WySBNy85fN0lZ1+r+I89uAV7f
	 XGx94FkRLouYmp97QfHe3g8DHSbRyDKIk4LYCKIwqH7vS087zF2cuRV23DP9BUsQj1w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=datenfreihafen.org;
	spf=pass smtp.mailfrom=datenfreihafen.org;
	arc=none smtp.remote-ip=78.47.171.185
X-Received: from proxima.lasnet.de (proxima.lasnet.de [78.47.171.185])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76BEA606A31C;
	Thu, 26 Nov 2026 09:24:13 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 76BEA606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=datenfreihafen.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=datenfreihafen.org
X-Received: from work.datenfreihafen.local (unknown [46.253.254.165])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	(Authenticated sender: stefan@sostec.de)
	by proxima.lasnet.de (Postfix) with ESMTPSA id EFA8AC02DA;
	Thu, 26 Nov 2026 10:24:10 +0100 (CET)
X-Cc: Stefan Schmidt <stefan@datenfreihafen.org>,
	alex.aring@gmail.com,
	miquel.raynal@bootlin.com,
	davem@davemloft.net,
	edumazet@kernel.org,
	kuba@kernel.org,
	pabeni@redhat.com,
	horms@kernel.org,
	zihanx@nebusec.ai,
	stable@vger.kernel.org,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.56.1
X-In-Reply-To: <179378621331.55520.8126896786309171541@stu.pku.edu.cn>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list