🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5031

Re: [PATCH net v3 3/3] net: fealnx: bound card_idx to prevent out-of-bounds access

#5031
From: Andrew Lunn
Date: Mon, 19 Oct 2026 15:47
30 lines
9975 bytes
On Mon, Oct 19, 2026 at 01:43:03PM +0000, Жамбакиев Радий Рикардинович wrote:
> From: Radiy Zhambakiev <r.zhambakiev@prosoftsystems.ru>
> 
> card_idx is a static counter that is incremented on every
> probe. It can overflow and wrap to a negative value, which
> then indexes options[] and full_duplex[] out of bounds.
> Large values also no longer fit in the 12-byte boardname[]
> buffer.
> 
> Bound card_idx to 99999, the largest value that still fits
> into boardname, and fail the probe for any card beyond that.
> 
> fealnx is an old driver that cannot be tested properly on
> real hardware, so a minimal best-effort guard was chosen
> over a larger rework.
> 
> Found by Linux Verification Center (linuxtesting.org)
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Radiy Zhambakiev <r.zhambakiev@prosoftsystems.ru>

Please drop the Fixes: when you repost to net-next. This is one of
those theoretical fixes which never happens and nobody cares about, so
there is no need to backport it to stable.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Technical Details
Message-ID: <c6925855-4309-448b-8e03-165df8ad4bac@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348683-linux-kernel-netdev=dewy.ru
References: <20261019134136.104932-1-r.zhambakiev@prosoftsystems.ru> <20261019134136.104932-4-r.zhambakiev@prosoftsystems.ru>

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-348683-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 3/3] net: fealnx: bound card_idx to prevent
 out-of-bounds access
Date: Mon, 19 Oct 2026 17:47:49 +0200
Organization: Usenet Network
Message-ID: <c6925855-4309-448b-8e03-165df8ad4bac@lunn.ch>
References: <20261019134136.104932-1-r.zhambakiev@prosoftsystems.ru>
 <20261019134136.104932-4-r.zhambakiev@prosoftsystems.ru>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3667712"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:F+jFzqkTmrLucSPm+VH3odJ6qy0= sha256:7zSvpmhoF9V5wGBPeIIu4JMRORwqiYyNdJgLGaKLUwc=
	sha1:uWzRfAdARQtlG3PZiwpScG+TiAA= sha256:Sqms871LibNThmtBECGg4rS2+OnlyD7Duvj/y++Bta0=
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 51BAC110A89; Mon, 19 Oct 2026 20:38:47 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	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 (1024-bit key)
	header.d=lunn.ch
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 bCgLuNW7Unkv;
	Mon, 19 Oct 2026 20:38:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-348683-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 80995110A3D; Mon, 19 Oct 2026 20:38:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (aws-us-west-2-korg-listserv-alma10-1.taild15c8.ts.net [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 0969B1A42CD; Mon, 19 Oct 2026 16:02:08 +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=1792424896;
	b=vSM6FRX5QX9xdqHABvbsbEOzADztjayQZbmL22V/xUGwfnSPuxCYpWq3Uqe2st42KXVo
	 UbA2RnM9dYr0wpEUDBv+mNyTEW53CZNYn5RPTTl0dHVh8sX/9FSj0gzLaUh+LqLpw4lJz
	 giEW4Blxcejwr4uha3GeCo5DHlZYBXR5g3cu/qQ41xU0ENgbCnXlxks8IRrzGOEhKQDeJ
	 zXP4vrdlPGyrq+GTUfSsSH4p4Lo4PXAnn/PLnU/ss7EEa1vsWoQmnFQN7ZiPVSwSapcNO
	 jHXPz5r7BCSMDf+boJ3ILqGezaSLk68RX1g+yRzUnUxar8GY0NOjJGi3KI5Iu0T4tag==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792424896;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received: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:
	 Content-Transfer-Encoding:In-Reply-To;
	bh=Cm+fBf1IRChCh1IsPLW0+0K746awLXczpRLim5f3EBk=;
	b=YbAwxfUCO3m3n9rglhSXj63dxkeDty8oOoQii1DX4paDLE8Fx6jx52cLY6QswG3rX6uT
	 wYFxkztxYszknaRYFsCil2Yj8C3RCx7fRuPj1Vu+bsmn3LeFOm4UEkTzRsQA3tOeahORU
	 caGbh/yZYDdD9JZaBu3D8n+rtK44LH8YQCiVOOwHMFuRkhhsz01Q75OHnyxW7GbI2IZvl
	 zvIznPAK0hIuh1UmsWZ6ydIYZKL/mASMtlQcWSt48ysp7//cG327tAhte6u5f6dxQP0h+
	 ECjBWjvv0zPtCnbX6oJdTvpESgWk7mPwOGy+NS3J5GBLyLLu8QVycqWNkux0c0oAm5w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=ykNNjMPx;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	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 CD45060874BE;
	Mon, 19 Oct 2026 15:48:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=ykNNjMPx
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792424896;
	b=nC6AlB/Noz+c23WAIkqHgYholwE8jnhAwPaucSi6HNINr7DFclTvMKkUv2zmrLlr6Nuw
	 TiLEKCY5/9yK56YZALanXdehRHIjXZOzW/QepWhERTj+XMUI6lfDKEv3giRu9uu1z89tR
	 1JCJT4UDXRY38Ipl+i+9ujMhl8o63o2OyDq5WNNAiA074mp8hsQfXk7sVy6oREckNnYa9
	 W/NZXNTZMo5+9yRq230GdR1zGX9Da42A9koLxTMlk9OrLNZ4Wjf/UBE3SYvg9dB1LTt+D
	 2Aj+LVmZxuaBkCDHs5rGKzyhROzBOVK1X/FmXhMj6VULGMjbt5r+Uc74qDLIFTdXYwA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792424896;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 Content-Transfer-Encoding:In-Reply-To;
	bh=Cm+fBf1IRChCh1IsPLW0+0K746awLXczpRLim5f3EBk=;
	b=tj0sNk1/9Vh1o5UutyGzfXMHkkYIJA9Kz4p0jZXKh1q5CvYEfaY697WcHlkNObhjpIzb
	 LFjKj+rVV6+3RKfhBnaM5NbF8YEZhKBvMmDwxi+1xQzwzqFj6tPuskr9RO+tVGqNyTgFp
	 XYHLkxGWzNafSJpYqUiGNBYHGfTo7UmmKi423jtb6D0meNoHIDmRqEJ6s/BWrs0qgcDVL
	 W+r2yLotb4HRCQB3ik7tGY6tNm+9n04NlHBCM/P7QjrwI+MCJGJjTZrLKgTj+KwEpuBiX
	 TtEduYV81uCzr8oPL1nqCKI0nWSvcaeePs/Dnfwe9sfDH0+i+NrONAJk65vGGc4vXEQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=ykNNjMPx;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8208C60874B9;
	Mon, 19 Oct 2026 15:48:15 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8208C60874B9
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition:
	Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From:
	Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:
	Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition:
	In-Reply-To:References; bh=Cm+fBf1IRChCh1IsPLW0+0K746awLXczpRLim5f3EBk=; b=yk
	NNjMPx4Zmvgamm9xATgCbSUri9eVqZWrEbnukIkhUCRki04Gvf4Bk2cuoHOOWv972G52yyOBjmv4K
	nhvbRkBzQAvPZ7uD9B5H5WnuRGursLTxK2SsigV7gSCvEgMJmmH4rl2Frrx+Bv2aYJC4hkTG71o75
	73zYmZuFI2f7PbY=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xIpaX-00BfHG-Rg; Mon, 19 Oct 2026 17:47:49 +0200
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Michael Grzeschik <mgr@kernel.org>,
	Jijie Shao <shaojijie@huawei.com>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Denis Benato <benato.denis96@gmail.com>,
	Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>,
	"stable@vger.kernel.org" <stable@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: <20261019134136.104932-4-r.zhambakiev@prosoftsystems.ru>