Article View: linux.kernel.netdev
Article #24556Re: [PATCH net 03/14] net: phy: as21xxx: Fix LED index bounds check
From: Cristian Ciocaltea
Date: Mon, 30 Nov 2026 10:35
Date: Mon, 30 Nov 2026 10:35
33 lines
9993 bytes
9993 bytes
Hi Andrew,
On 11/30/26 4:37 AM, Andrew Lunn wrote:
> 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.
Ack, I'll make this part of the follow-up series adding Gen2 support.
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks for your quick review.
Regards,
Cristian
Technical Details
Message-ID:
<3a4be17a-3738-4c75-9c30-92f6bebc32c3@collabora.com>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-374108-linux-kernel-netdev=dewy.ruReferences:
<20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-3-1bd2eae6ccbc@collabora.com> <e9d19a03-0a81-4063-b3a2-e5f739bb024f@lunn.ch>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-374108-linux-kernel-netdev=dewy.ru From: cristian.ciocaltea@collabora.com (Cristian Ciocaltea) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 03/14] net: phy: as21xxx: Fix LED index bounds check Date: Mon, 30 Nov 2026 12:35:32 +0200 Organization: Usenet Network Message-ID: <3a4be17a-3738-4c75-9c30-92f6bebc32c3@collabora.com> References: <20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-3-1bd2eae6ccbc@collabora.com> <e9d19a03-0a81-4063-b3a2-e5f739bb024f@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1404280"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:nOM+/LffHmuxEZiwO5UkjpUfbEc= sha256:bwsgrc7DffuryPDWdtfxKc5uQFCz24kQzPohbjSI2RY= sha1:hp2KgnxlJ8ZXIHJx1MS35RkPX2g= sha256:726fFztZzkSeeLArhtZdQ5H9WAhFf2zMe+YfhJAXxz0= Content-Language: en-US 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 07AE6125FDC; Mon, 30 Nov 2026 13:35:50 +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 (2048-bit key) header.d=collabora.com 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 ye-HA3qBVw52; Mon, 30 Nov 2026 13:35: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-374108-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=collabora.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id C00E3125FD9; Mon, 30 Nov 2026 13:35:37 +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 6C8352E708; Mon, 30 Nov 2026 10:35: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=1796034936; b=ECg/r6W5eJvzQJD3MpgoR2Qp7fU0XC4vpTg7oqnX4wkJ3cMtPA6BVMsEcwWII0aTw0i/ krXby1LmmJCunrRx2gqpmIwdgdIsUjmOI4HH+9tUWi4k2H00fElJ7A145EzECWiQYzCdt xSjDq/dFmv7q39sRIIqUfTNHD16FXJiH8wuvbLF4D0XXQX0uDh9aC1MQWSezPyzrITXqW xd49eVzebnhZPINduO/zyrNWERELEWmnAdZaSeH4qzrodOILYs7RDLMsAOW2CfG4Ot/lH 8f9z2z2u1w7XDv163b4PK+uGb3LwWjBC5FKupctN3sibIG/u4lS7HoxyYJm2pUne0hQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796034936; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received: Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=7XpqeMRrKSGw29EN4pVZ/7xTEaxRc/nRuRJeNhUJYRY=; b=IkgOtpPlJEFERGGI9pVT6eFoCI6W4E1Q2T0bvtHvp5LHdVtb4TeHU+UPBsMCVJGlpQG8 vTC7qVmURqZxGBRXWhNjiv5CJDHojt4WocRwGnQRLKbrcDc9/ZyeXL26kaGviZzh4M+an ugPTz52JtEXADCpefJmtWDOev/XvfDjT7iJkMbG43N8WNcC0m4wpJUQsLMdwpOTFKIzuR yZEEkUn+cpCcw75QaYf59Ht0LzOcwZEhTYmzEO5amyvbAH2539J0xLApZQVMnURJCoJ0e GtrqMhkHEAAFaQWkWGXqnUiLTxx5Y3Gac3hGG68Gr79F8EUR4WFSNJQiiLPLvm8+1mw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=GgNBNxcM; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; 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 44D3F606A333; Mon, 30 Nov 2026 10:35:36 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=GgNBNxcM X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.251.105.195 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796034935; b=aSLFcuE7fe2bhg+L0zJA3YWf/J9WtxBeseaWJ1vAzlkyMNdvRe2HfJNO3xq61VW5sRfs oWIQ4FgATYav85U3QiMgOS6+FBx2pnrIqmx/m2Rbjg7VdvtEWHQzWDoLWeWAc2JY6x2K7 StfUwJSJkT82sLhzT167hBbmzhJ441d/MksoRfFF8QMlrAYJQDo1LxYm9vhUqPmZyI8Na AdGK6APNFWVtY+ES1R8r2BRGNLPyCXLjpvFn2TLSuKr4oxbMlBWoeKJV3jgoGxkwd6X/S gWEDQSSNqep0XGY+K631RtYFK4aJ/FSXId4Ev1PXXbZ+EmqIUfllfR9TmXFUpWo3KjQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796034935; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=7XpqeMRrKSGw29EN4pVZ/7xTEaxRc/nRuRJeNhUJYRY=; b=QIKAtIFCPVzfBPBaCNh6X4/QztuCxZEqyUt3uDlovA4kR8Y8Gu0f53fPBSdjrLtA4p/5 IrUFDDGezYAe+7gxpvFeHptWV1eYFhCN4WBpIEGFLt1YYGH/RQaBeSXah3TZFcwLzhIPV mj2D0SIklzbIIYKSxI0RdTILQeJ8IsE0HVOkH3ow98rHE6DIOQIUnGCbiYX0rOtZxM4ei UYyGCNXFBGx29wysXk4ObyQqAEpu+GbXCs1EmnSmlCbyXMOhHZHzxuCiRzVYCnQEmXw0r 6F/ErZavV3ab/uGks1kT00K+jrkyWkIoxzL8K4eI8X1utME05z5NoOkZ9nySpWMURwQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=GgNBNxcM; arc=none smtp.remote-ip=148.251.105.195 X-Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CADD7606A325 for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 10:35:34 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CADD7606A325 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1796034933; bh=wipHR6SsWjQq5TbFHngI4TWtafTsBL14z75y9Hn1Cls=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=GgNBNxcM1R+wmzmxfSATsx8jq9TY2PGHVnFccjE+DdtAz6rI50X8Jsl2HdycV4SWs rGrQ78qFtsGsNi4YVeFuJa5obh2/YPkaElMKJSh1y8lhGoto4bjdsMNn95vxs9rn0S wROgFzIa6Hyf51h7wpv7H2gAP2wHtIOO9kYKTT7RnBXGm7qPfh2Yh3xPxpAS6kk2Wd gywq2l+UqeRyjSHpEWIsEtVYs7T6vT5nZzQWdlZqYhgQ68r69f4fISfJvrF3OSWmN7 xm7PEw27SJS92cMmIi5D6dztF0b/oYucYVt7UGA1/AskogHX5ZhpW1TWNLtZAk/iu1 Ys0SAwbNntpjQ== X-Received: from [100.64.0.241] (unknown [100.64.0.241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id ADCAE17E0390; Mon, 30 Nov 2026 11:35:32 +0100 (CET) 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-User-Agent: Mozilla Thunderbird 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-In-Reply-To: <e9d19a03-0a81-4063-b3a2-e5f739bb024f@lunn.ch>