Article View: linux.kernel.netdev
Article #18525Re: [PATCH net v2 3/5] eth: fbnic: skip freed Tx rings in fbnic_get_ts_stats()
From: Björn Töpel
Date: Wed, 18 Nov 2026 13:26
Date: Wed, 18 Nov 2026 13:26
25 lines
9328 bytes
9328 bytes
Dimitri Daskalakis <dimitri.daskalakis1@gmail.com> writes:
> From: Dimitri Daskalakis <daskald@meta.com>
>
> fbnic_stop() frees the NAPI vectors, which clears fbn->tx[] while
> num_tx_queues is left unchanged. fbnic_get_ts_stats() walks fbn->tx[]
> without checking for NULL, so asking for timestamping statistics while
> the interface is down dereferences a NULL ring.
>
> This was found by AI and reproduced on HW.
>
> # ip link set dev eth0 down; ethtool -I -T eth0
> BUG: kernel NULL pointer dereference, address: 0000000000000050
> RIP: 0010:fbnic_get_ts_stats+0x38/0x60
> Call Trace:
> tsinfo_prepare_data+0x82/0xb0
> ethnl_default_doit+0x213/0x470
> genl_family_rcv_msg_doit+0xdd/0x110
> ...
>
> Fixes: 96f358f75d1a ("eth: fbnic: add ethtool timestamping statistics")
> Signed-off-by: Dimitri Daskalakis <daskald@meta.com>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Technical Details
Message-ID:
<87v75u6zj1.fsf@all.your.base.are.belong.to.us>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366139-linux-kernel-netdev=dewy.ruReferences:
<20261117215416.1901246-1-dimitri.daskalakis1@gmail.com> <20261117215416.1901246-4-dimitri.daskalakis1@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366139-linux-kernel-netdev=dewy.ru From: bjorn@kernel.org (Björn Töpel) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2 3/5] eth: fbnic: skip freed Tx rings in fbnic_get_ts_stats() Date: Wed, 18 Nov 2026 14:26:58 +0100 Organization: Usenet Network Message-ID: <87v75u6zj1.fsf@all.your.base.are.belong.to.us> References: <20261117215416.1901246-1-dimitri.daskalakis1@gmail.com> <20261117215416.1901246-4-dimitri.daskalakis1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="2604329"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:DlvPzajYH3OQNwI43D42JSqi3TY= sha256:Cc5oEH6yrNMaDRNvoD0Jhl2932SeGGNEquFpTim8yQM= sha1:afb2zN7PUqoTi7dipqcHjGS6vmQ= sha256:/Q+h47gQ8XaHsYyL0yXqIzId8TD+P+cyHzDnKNi8SGM= 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 4C2731152AB; Wed, 18 Nov 2026 16:27:25 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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 DBnkdrOtfbqk; Wed, 18 Nov 2026 16:27:17 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-366139-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 66832115224; Wed, 18 Nov 2026 16:27:06 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 1443B3835C; Wed, 18 Nov 2026 13:27:05 +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=1795008422; b=TOylfy3EuorWME9bF8ws0PEIbvBmL2eTe0yc2LA21zP2jrEzB2MTHx4P9iffsnVuOPPC BFJTaQnY9fNik5CoiXAgyxlgmz7QCj7PvpoUNScyDfvliuiY49WX5wS3Q5o2NTWOuJiVb D/XT9zA8M/fKD2yuxva48gaLL6c5BFpVEdh/MqdQa16/80BvngZo6TDgbxt5avA0P8eBS Ac+UeWZFn2TmEYCG+jjFlFj12vX/iAMLllwd6vPwX8TkeDrRk7RShLtIVNLDdpzemWw6Q 3tkealR3+9rEinVu5MPoHaJdxWZS0pHFDZucXScZaLNwLkJ0+c05yxU/fwSzwdoQkXg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795008422; h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject: In-Reply-To:References:Date:Message-ID:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=2VBlVvZ8PJS2AcIDnu15PCGckXM5TWMvp453XtyGgig=; b=3m7QHK0Cxo70VFNt7SS3k5qbGPF43hoBH+9NiC4Mf3RnnjOzvmC4Gt3IsVzonMEieqIK qDoqd9UYQjg2jLS7nIViYZM+MxvygFBY4M9LE4iX1zFe9ArdgujWimjfrxt3O8Pkondhi 6bZWa2ZUkdPIByDVc1nv//Py/CNIhaSuRfRuRshO4Fq80UryWYnNbNtqSPtLuC+tM5gVP 9JSbMHZT/klxvu9OJj67C9943D6nCyEuJjRsJnRBNH1albs/DRKN3RXM4T4xea9CZxeqN lfUXpVkLDr22uei/R5w2EfdQdHXnnravJ6ih7Ko9JkIbdBG1WyWlqwH5ZjJzMIQMgYw== 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="jW/exEZ/"; 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 755F7606A331; Wed, 18 Nov 2026 13:27:02 +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=jW/exEZ/ 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=1795008421; b=qz/Za5m1qp31E024KT1ll3tKgfwg/wwJeWSrORH15P37DQc4/oLq56/sbMjEeCHAgJgJ KUvGDrth5480poBQI0XLsaj5NP1OY0aW+sSgkLWJjGXPEde5cwedpx8i4dh4dFw7FKbFq XpIq/5htBKMYbcqAJqc1Bo/NPR8VkYpNj1IZq4CYBmsHdqLvRlVPoTtrAjwbYC0YrlZ7B 4rq4MzyKCid8b+x+4hDuiY7S08lyWrm+UncI63cTDahjAYK/e8Bax7+VapzfW42bhvcf2 dux6329x0tIHrToEbtK5PwUt+B+W3Qtx9iKzYsTM36qbIMgcVNqzFoHnz+iEW3wZL8A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795008421; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=2VBlVvZ8PJS2AcIDnu15PCGckXM5TWMvp453XtyGgig=; b=3v5alRUNH2YrM1TVOW08Ug/QEG//G94dUMzBPyehC1DmUGgwOslnM3YurinAyG+KkecR Jj7T0pesyjtLHJT+wjfIfNqdEzmvsyAg8WA4b1y+Vukj6eWC33z8ArdeE1L1iEQQumhuR LotS5RmxsN96lkueDExdVAO2BCxb7wT9y0D3mPCEDQ8Otbk725kqdEQ9xdIw6qTXKDL5m fvqFg52ncmOpUKFz5MswbrvMIQa+4pSJfT4AuguEMroXjIw5hRtSdN14ja/KiE9lTIfkQ pFdptNu2tRo0WW7c4T9orzOKL656bbVs8xWtvkLHxIn5u6lMbl2UXfBgSeUPyqmSXXQ== 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="jW/exEZ/"; 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 90D85606A31C; Wed, 18 Nov 2026 13:27:01 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2FCC1F000C4; Wed, 18 Nov 2026 13:27:00 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795008421; bh=2VBlVvZ8PJS2AcIDnu15PCGckXM5TWMvp453XtyGgig=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=jW/exEZ/yJJPzaPAQboCh/XCwWhnURdmFDJ6l8n2wt3JJy5PiE+3vivSHVoGyLJgf r21WwgtcrMFqcTc8LFT2vRITCYUN44Y0RpcUuRUbu/GwnwvVH+kYH0L5OFxQqaxb2h Z5gyIKbU89/GxloQlNDnERqMTKcsnh9w/CvngFbDmGgxabX8jqE/3LQD4FYj++DFll nA8802q9IRV7JTehTlFbnjPcXAt6iMI0v3couV1qwwS3U7BYQgZvytMd3AWaqJ/gcc vekuSmpMHQlEAimxwDsCFmY7Z9NgzyG3ENIVCs74RV0augeX2nIhz+h6KMswf5MAt6 S4RHS8Cpp6aeg== X-Cc: Alexander Duyck <alexanderduyck@fb.com>, Jakub Kicinski <kuba@kernel.org>, kernel-team@meta.com, Andrew Lunn <andrew+netdev@lunn.ch>, Eric Dumazet <edumazet@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Mohsin Bashir <hmohsin@meta.com>, "Mike Marciniszyn (Meta)" <mike.marciniszyn@gmail.com>, Stanislav Fomichev <sdf@fomichev.me>, Bobby Eshleman <bobbyeshleman@meta.com>, Breno Leitao <leitao@debian.org>, Simon Horman <horms@kernel.org>, Mina Almasry <almasrymina@google.com>, Vadim Fedorenko <vadim.fedorenko@linux.dev>, Dimitri Daskalakis <daskald@meta.com>, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, Dimitri Daskalakis <dimitri.daskalakis1@gmail.com> X-In-Reply-To: <20261117215416.1901246-4-dimitri.daskalakis1@gmail.com> 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