From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 892B6EE0217 for ; Wed, 11 Sep 2024 08:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HAvtRwNSym7YcqtN7COsBx/k8Y/hmcmUW0t8Ap+rW4A=; b=hszxtAPhBqEiBI6yfF5ddOIgaT 3x0LpL2V+YLXTeQNfx6Si5prePPjyhjs8tZs5aGwcX6D5VSjJmgPFLqAlk4bOn0w33upUNpS9cUcn li0c5fLT7nfTE20uS/IS+cyNyrniGA2c2c0xqgF0uNHXd524qfX1kODF+Y/xqNuBhVSbsWUq6ZSpq eERwl2cnKPsnqQzYCntgY1bAVNedtZODKXIPHLSWh4319QZG4sXkK4sT3bX5DxXAUHNSiOaWsgb6W MoYSdSdWdAhKEOhBggvBzTrNhk+B/6KWNrpBIEud09i7qFzg3xAwK2OMTGhJC51TitIpdIKB+vDRU iOKuDldg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soIrr-00000008hOy-2Ond; Wed, 11 Sep 2024 08:38:27 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soIn2-00000008fU6-2RMq for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 08:33:31 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id B8E58240003; Wed, 11 Sep 2024 08:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1726043606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HAvtRwNSym7YcqtN7COsBx/k8Y/hmcmUW0t8Ap+rW4A=; b=iBv2c+VQeYPe/RKKmQvC8lrPJt351ifes7zPKwbQpMI2A1RKbCyLWF8zs9IJmrMVMojoG1 tXmi06amZ91yHevyGoWtjK0rj/ZFBtcTtS4t6fbZ8zb8agghIxtFKhyvC8iDEluxdRaHoM w80PHPLilDRPWrDlzebTqMklc/YulXkVXpWnYzZXVykmkM71totldfribq5v0fbjrxoZ93 ib4gFyY336XgEddQKg6e8HupM4L1iMsa9lrX820YnIQJZ+umSs9kF9hQaXqqmNbisC52mh jntPmUYoPdPBhP5tFxm0CkGeToS7//Z37DIPox4LClwzhaMMaKSNlhKHfJyr1g== Date: Wed, 11 Sep 2024 10:33:22 +0200 From: Maxime Chevallier To: Eric Dumazet Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , Simon Horman , mwojtas@chromium.org, Nathan Chancellor , Antoine Tenart , Marc Kleine-Budde , Dan Carpenter , Romain Gantois Subject: Re: [PATCH net-next] net: ethtool: phy: Check the req_info.pdn field for GET commands Message-ID: <20240911103322.20b7ff57@fedora.home> In-Reply-To: References: <20240910174636.857352-1-maxime.chevallier@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_013329_421138_57B6B567 X-CRM114-Status: GOOD ( 16.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Eric, On Wed, 11 Sep 2024 09:26:23 +0200 Eric Dumazet wrote: > On Tue, Sep 10, 2024 at 7:46=E2=80=AFPM Maxime Chevallier > wrote: > > > > When processing the netlink GET requests to get PHY info, the req_info.= pdn > > pointer is NULL when no PHY matches the requested parameters, such as w= hen > > the phy_index is invalid, or there's simply no PHY attached to the > > interface. > > > > Therefore, check the req_info.pdn pointer for NULL instead of > > dereferencing it. > > > > Suggested-by: Eric Dumazet > > Reported-by: Eric Dumazet > > Closes: https://lore.kernel.org/netdev/CANn89iKRW0WpGAh1tKqY345D8WkYCPm= 3Y9ym--Si42JZrQAu1g@mail.gmail.com/T/#mfced87d607d18ea32b3b4934dfa18d7b3666= 9285 > > Fixes: 17194be4c8e1 ("net: ethtool: Introduce a command to list PHYs on= an interface") > > Signed-off-by: Maxime Chevallier > > --- =20 >=20 > Thanks, there is another issue found by syzbot BTW (one imbalanced netdev= _put()) Sorry for asking that, but I missed the report from this current patch, as well as the one you're referring to. I've looked-up the netdev archive and the syzbot web interface [1] and found no reports for both issues. I am clearly not looking at the right place, and/or I probably need to open my eyes a bit more. Can you point me to the report in question ? [1] : https://syzkaller.appspot.com/upstream/s/net >=20 > Reviewed-by: Eric Dumazet Thanks for the review, Maxime