🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21160

Re: [PATCH iwl-net] idpf: free the RDMA auxiliary device ID after deleting the device

#21160
From: Simon Horman
Date: Mon, 23 Nov 2026 16:30
20 lines
8851 bytes
On Wed, Nov 18, 2026 at 12:16:11AM -0500, Changyul Lee wrote:
> idpf_unplug_aux_dev() returns the ID to idpf_idc_ida before
> auxiliary_device_delete() removes the device. If another idpf device
> plugs an RDMA auxiliary device in between, it can get the same ID, and
> its auxiliary_device_add() fails with -EEXIST because the old
> "idpf.<vendor>.rdma.core.<id>" or "idpf.<vendor>.rdma.vdev.<id>" device
> is still registered. RDMA is then not set up on that device.
> 
> Free the ID after auxiliary_device_delete(). It still has to be freed
> before auxiliary_device_uninit(), whose release callback frees adev.
> 
> Fixes: 65637c3a1811 ("idpf: fix UAF in RDMA core aux dev deinitialization")
> Signed-off-by: Changyul Lee <lcy8047@gmail.com>
> ---
> Found with a static analysis tool we are developing.
> 
> Compile-tested only, with x86_64_defconfig plus IDPF and W=1.

Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID: <20261123163058.GG31322@horms.kernel.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-369581-linux-kernel-netdev=dewy.ru
References: <20261118051611.3892489-1-lcy8047@gmail.com>

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-369581-linux-kernel-netdev=dewy.ru
From: horms@kernel.org (Simon Horman)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH iwl-net] idpf: free the RDMA auxiliary device ID after
 deleting the device
Date: Mon, 23 Nov 2026 16:30:58 +0000
Organization: Usenet Network
Message-ID: <20261123163058.GG31322@horms.kernel.org>
References: <20261118051611.3892489-1-lcy8047@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3928342"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:YIdArB4Hv6V1wkCo35sbyT0xFQY= sha256:MVrbG8qWO4wnxJ6M1Qg/2as7ZT1vU4MiXAuoNjwaxV0=
	sha1:HOVssHhRh7lfoU/gEIOFX0sH9wA= sha256:DNSWJqXYTzu117yM/W/y0rS/Z4v6GAiq7Pt0UAoV4fg=
Content-Disposition: inline
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 5BF04125DC0; Mon, 23 Nov 2026 19:31:33 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, 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 biy15EQKjkOs;
	Mon, 23 Nov 2026 19:31:27 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-369581-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 85009125DB9; Mon, 23 Nov 2026 19:31:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id C828A6038B5; Mon, 23 Nov 2026 16:31:09 +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=1795451469;
	b=BAiUecy46cm+FXtlxp6JjxMBPdPfsZdbv0hMNkSZx9Fc870nOsw3Hvo6aJaba48o2VLb
	 85DIZYiO8ELT/DDF0HJIAsCJbGHuPeeuEwbygpkrWtu9UsgkA3SO3Tpbo3Hiiu1Sb8/H/
	 ehrmhG5/ARi+XBbB61WtXwlmPq5nPXTz2PtDNSLp9radmV7zrAtXUEOGoW/HgytdMPf4y
	 W2b/0ofgY6aGAqipixoNQlQCg5sFLEQAVudiGyFGqIvoFAYYjYe0UU0XsHZjeP+2nbT1P
	 wknYyB3TJWgDE/pMLx7JJr8WDvplMS6I6P1Wcdiw/5XTpQ1rUtn/CbnYWzOCeplPbCA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795451469;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=jMtoEqXohvqbclVtS9Z+5YKaFu68bPrDQCuZaxatwVg=;
	b=KK0T2L7x1aVidKbKs1/h/5IabENSyOndZWVaI+jvrCYzxbTRbgj1tUH/0BtGbG41u2C1
	 a4DXko0cFD/p8kKjcXsP5Zjl6HGcrEaHyzipESNI8Jkd1hq96rK0kupZQuH1X/IuYM9So
	 Lue3YCt1YracQxxuDmyXX9+Mdk6BNbTBvKxuDt/VCMlrA02Z5pDtiZ/1mZURX1C17paCz
	 GPIXejFBmyWlClrqcH9lU+93TSAMO2lxEuiHUOdhS8j7agi4L1HUFkD4pyBT+areh+Say
	 5T5nZELuubexbeudP0Y/lG8zPnB4D/sCxEd3Tlo/b3O/gTsHXr/tyYTD48vqPHNthRA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LcojK46x;
	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 6CF80606A31F;
	Mon, 23 Nov 2026 16:31:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LcojK46x
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795451463;
	b=4KSNTa/VRvkBHWYKnDMDTrsTgcvwhBihC2ZyE/vPc/nnbdwoz75PgFppWGXbpTJzOHuo
	 JigaraY/+SSOgdNWPhIyD3UUbmkzOHVnSfFNpNRT7DCz5+2dBoD7Qzz4+w4jvEhJ7Zqna
	 C3XWXnkByc8KCvtmbPCuyuoJ2S0tbcoNgnbXlO1JXHXhdTsI3mCRHXUN0YoL3vNJxdek7
	 Tq0R1mDtLyHAalIcznSm43eL2Hc1T/vWiNmzZ5O5wpOvbLpq5mGgreA3MhT76nTwrgr51
	 ArpzBKNcZqs9onAxo4PqlgDbChXKoRwHv9Ia/Z/Pm0Z2wfNdoqgCrwC0RMgIEd2UBXw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795451463;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=jMtoEqXohvqbclVtS9Z+5YKaFu68bPrDQCuZaxatwVg=;
	b=LZcl+mmKmvleHjqs7jyNsGoppgB62143xyCW+tyGt5e0zGx1Ehj7f10ILfl8i1VA+Hfq
	 +Ukf/2uCDadicddkKyx1+F5FA79pEKQ/iGfSV+LuGOoosmMUWyv9clxcVEAVmFhBEVDr6
	 uF7rYO0GVcVODuzD1l7BvdbMtlfLmd5Vb8LKvjsD9qHWvMTvZ9taKALKsusg7Z9E4NZA+
	 rTDRXd5d+d+FN9xxw6Im5Tmm3OseQ2wW74EkaownwIoTrd56pzLOjYy0RKdavsdyBqCln
	 pm2HUEKhwUhAScwA5bjXzO2MSdmmC4YWN9435taALFrMcqWmWv6lwHjFrwXjIwpHHNA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LcojK46x;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(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 87A40606A31A;
	Mon, 23 Nov 2026 16:31:03 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 899C91F000C0;
	Mon, 23 Nov 2026 16:31:00 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795451463;
	bh=jMtoEqXohvqbclVtS9Z+5YKaFu68bPrDQCuZaxatwVg=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=LcojK46x3wYV53qVzLH5hJDKmV2TAvMH7bVELtrYyr0zL68uIMU/dx8DQLFhpPmbw
	 GFZ1/oB6yTH7t6lOUTaBn4mxsqpRjt+Qni3iNgsw3YJer5jZIXnEc2s+7VcgGJCAEE
	 KY1AO9vM2uf0fwtvebGqLjQlOCHCC8xDLT7OTVzc36HYEVcLNRfGDIkbWM3kD/8blN
	 7cFdV9ao45SOmJnViwYRJOZv5Q+1XMzsFAJ4+3OwxxjEUgfT3XApZEDeITTK1fdNOs
	 jz55NsEp6RJCihCcgmwI3OETWc05nnH1MGRDEo7T+KKWn4w2CUoRLhc5EdrwAkaIJr
	 WnBNENAPWSbUQ==
X-Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Joshua Hay <joshua.a.hay@intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
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
X-In-Reply-To: <20261118051611.3892489-1-lcy8047@gmail.com>