Article View: linux.kernel.netdev
Article #24316Re: [PATCH net 03/14] net: phy: as21xxx: Fix LED index bounds check
From: Andrew Lunn
Date: Mon, 30 Nov 2026 02:37
Date: Mon, 30 Nov 2026 02:37
25 lines
9326 bytes
9326 bytes
On Mon, Nov 30, 2026 at 02:55:10AM +0200, Cristian Ciocaltea wrote:
> The LED indexes are zero-based, so valid indexes are strictly less than
> the number of LEDs, AEON_MAX_LEDS. However, the LED ops only reject
> indexes greater than AEON_MAX_LEDS, which wrongly accepts an index equal
> to AEON_MAX_LEDS, one past the last valid LED.
>
> Such an index makes VEND1_LED_REG() compute an address outside the LED
> register block. A bogus LED node in the device tree can then cause
> reads and writes of an unrelated vendor register.
>
> Reject indexes greater than or equal to AEON_MAX_LEDS so that only valid
> LED indexes are accepted.
>
> Fixes: 830877d89edc ("net: phy: Add support for Aeonsemi AS21xxx PHYs")
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
I'm not sure a Fixes tag is justified. Does this actually bother
anybody? It requires a broken DT blob. Does mainline have one?
I suggest this goes via net-next.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
Technical Details
Message-ID:
<e9d19a03-0a81-4063-b3a2-e5f739bb024f@lunn.ch>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-373777-linux-kernel-netdev=dewy.ruReferences:
<20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-3-1bd2eae6ccbc@collabora.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-373777-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 03/14] net: phy: as21xxx: Fix LED index bounds check Date: Mon, 30 Nov 2026 03:37:16 +0100 Organization: Usenet Network Message-ID: <e9d19a03-0a81-4063-b3a2-e5f739bb024f@lunn.ch> References: <20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-3-1bd2eae6ccbc@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1312466"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:8DxwqZehq2TXl6Llev3wjaL3Mak= sha256:mFhEtdeesGiaoXEAdrEjSbJgijevO4MiBbcx34wKMqw= sha1:GjnOrrVCELkniZexW48p9EIsyHc= sha256:p57wtKezG5P4Kr4hLFka2qXr9we0LL7Z3uc9zxptOVU= 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 3790C125FB8; Mon, 30 Nov 2026 05:37:51 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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.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-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 eszT_H1MrYw8; Mon, 30 Nov 2026 05:37:47 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373777-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 1109E125F08; Mon, 30 Nov 2026 05:37:38 +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 4530E27E1D; Mon, 30 Nov 2026 02:37:36 +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=1796006255; b=XugkRj790bB30grPo974RwdfNMe0KD/0iSVdr5l9n3935QUwzUc6iL6jn/qtj53kdR6Q bVZ3B9/mm6gW3FCxN4sopRQmWBaqMP7WjJ/iXCq3cpoydiMe8uD+uTIHgccwozATOHDYM GwzbIu8U29JEY8YczBWGZlaW6l4/S4OvsiBLLViu17OwYInbD0n9ah45XqXIRiCs7yddU mvzoh9qllovowK7TpZ7lfg+5ZeivRNqhFzO/UscIMnJs9POW1oarwgdLLf1Z8V1a7pN6p mFlpTJyh67uYZJdx2+a0iVQbv/AgkMOYgYcPuOYJirvImCL203KixmXkxq7oz2AT/3w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796006255; 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:In-Reply-To; bh=6bhCQNhL3R1YJnA/9xwZzOojV5QZj1eGNjPz+24TASU=; b=UQoGKTn07QXTffKGQYHRLs06bDLaDk3QbEKrUh+jKPCLP90qaO3rU98t7fJruylxFLSy QnVoWHvAoQZG5liTXVa14Wdz4BsK5cb9Lf2IVxU79KqhEA/23Lc9CJTIHWAFlkJFL5whr +LKvfHeaE/W1Iqva/wOn8yjE9UugJNvv5X8gg99JX417Gxawsqej6liX33uNbfoBR74ER YHpkYqzENJ73OuGKgw1fFlELocdt+MbY0v8nQ3CAOynbPx+2/lig3qE+py5Vje1PSUf2k Uk7H6JnACtbcg6F3Ylf57zhsdl+G/N5xmaz+lceqL4oQGjraDyVfJLhqHSAIiCZnUuw== 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=IUs0kavj; 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 A870E606A32C; Mon, 30 Nov 2026 02:37:35 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=IUs0kavj 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=1796006254; b=TL8tnSAOngcSbPtJqaXmiKDq9IJmMLN6oQPI292mXRl/lZvmQAuhx83WMzCytoqbV7rv nJ0kXD/VaELGk/OvPlXnW5NDDHENnQVjqIbLbDSce/B+/0Yx/cFM9DrYAGJ013poSUxPL djXEgl3OQqnctkr2gh97BNVdHMWKaXFakHtFhv7uCbdgYI3y/umrg0+LJN0W+vuaqh15m Yn7XYY+cxwktP9xcWxbm2r0rjJc7EqwKzluBsRO/eXFQl/dVtIKLMdVQj9GW5uQgRL1dN GOOL7hyM40gCbVMQXTdR+NGSmL+8cDszb6mc09CXkTwCTDdz5wlowjnGs1As2qmGJ9A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796006254; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=6bhCQNhL3R1YJnA/9xwZzOojV5QZj1eGNjPz+24TASU=; b=H2aVrNHjOEZEyOjt6sYsD1pv4thpccRcnA+rMEkHWyQRQ3VQtvQzLldI2yVzxNv7tf1r nW9Ymr9PB+Nw01GkWH4obCc4EOfX96RMgH3zs4f8JfIWxes1J3MuLdiZBTw1S6KMAfvna pGy/WPGSI9fB9m57Rk44xTW74934aKwf/PvwOx9pDIMS+gFRuLxaUbXEKklex9FOwgDTJ vdIc4GLlEfaOMr4vAAF/TJZPELl8FE9UqsmRGE1Ba95x9HGYPO/ytrI5BpjP3e/eAaJuo gYVxDa8b3xjJKL0yefbVgK45eDU7DbITz8/Ltpvj1IQ+1eKckJoQA0uYOc5AwVqLJ8A== 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=IUs0kavj; 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 68904606A31C for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 02:37:34 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 68904606A31C 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-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=6bhCQNhL3R1YJnA/9xwZzOojV5QZj1eGNjPz+24TASU=; b=IUs0kavj0UyBB+A7gUbgWN4Wjs LPicSC1ziVrFdXhOcoqJAWfyO1NoMgDe7S0txs0a3anqQssS3XyBc8FebqfiswHbwkReZH1rI/hMe 9FNjh4TitKnDW+Tasjnfp9207yGvNyuw80kx1G33Kbq6rXyTz7G8QqCKGTkAcgI97VH0=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xXrGW-002G65-PL; Mon, 30 Nov 2026 03:37:16 +0100 X-Cc: Christian Marangi <ansuelsmth@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, kernel@collabora.com, netdev@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: <20261130-as21xxx-fixes-v1-3-1bd2eae6ccbc@collabora.com>