Article View: linux.kernel.netdev
Article #20190Re: [PATCH net] net: bcmgenet: reject undersized RX classification rule buffers
From: Artemii Mashanov
Date: Sat, 21 Nov 2026 18:58
Date: Sat, 21 Nov 2026 18:58
50 lines
14103 bytes
14103 bytes
Hi, A scripted source audit of `ETHTOOL_GRXCLSRLALL` handlers flagged this path. Reviewing `bcmgenet_get_rxnfc()` showed that it stops copying rule locations when the caller's buffer fills, then returns success with a partial list. The original behavior was identified by source inspection. The ASan/UBSan tests exercised the patched handler in a standalone userspace harness. They verified that an undersized buffer returns `-EMSGSIZE` and that a successful call reports the actual number of locations copied. An earlier revision built as `genet.ko` against Linux 7.4-rc2. I did not reproduce the issue through the ioctl on a running kernel or test the patch on GENET hardware. Thanks, Artemii сб, 21 нояб. 2026 г. в 03:17, <netdev-bot+sinfo@kernel.org>: > > Hi! > > This is an automated message. This series looks like a fix, but its > commit messages seem to be missing some information: > > - How the issue was discovered, e.g. hit in production, hit during > development, syzbot report, manual code inspection, LLM or static > analysis tool scan. > > - Whether the issue was actually triggered, or is only theoretical > (e.g. found by LLM and not proven at runtime). If it was triggered > please include the symptoms, like the stack trace or kernel messages. > > - What hardware the change was tested on. For driver fixes please > mention the device (and if relevant firmware version) used for > testing, or say that the change was not tested on real hardware. > > Please do not repost the series just to address the above. Instead, > reply to this email with the missing information, so that reviewers > can take it into account. > > *IMPORTANT*: If you do repost (for other reasons) - please include > the relevant info in the cover letter or commit messages. > -- > The evaluation is done by an LLM so it may be wrong, if you think > that is the case please reply and explain.
Technical Details
Message-ID:
<CAGHp__ZAQwoaA+1m-YTDVnvHyfZMPpKOvbbge_gY06C8QT_zPw@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368408-linux-kernel-netdev=dewy.ruReferences:
<20261121001550.732679-1-ralerrdirsardx@gmail.com> <179522024822.3294.17329682912331634453@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368408-linux-kernel-netdev=dewy.ru
From: ralerrdirsardx@gmail.com (Artemii Mashanov)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: bcmgenet: reject undersized RX classification
rule buffers
Date: Sat, 21 Nov 2026 21:58:50 +0300
Organization: Usenet Network
Message-ID: <CAGHp__ZAQwoaA+1m-YTDVnvHyfZMPpKOvbbge_gY06C8QT_zPw@mail.gmail.com>
References: <20261121001550.732679-1-ralerrdirsardx@gmail.com> <179522024822.3294.17329682912331634453@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="3470137"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:TPyWTdYKYUcI0pkEmQHMX5maTxQ= sha256:jl3mvlgTycagO6eEAUzXQkyirLc3wivFfKqS1xsyv38=
sha1:nYS2zNVBBa5gW8X6WiEILRa/K08= sha256:yt+xaXR+Ngd7ACDSAU1uMkXZFZ1tfCmdwKUXs9iem+8=
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 D01DC115BBA; Sat, 21 Nov 2026 21:59:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, 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=gmail.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 XeK0SF5ve273;
Sat, 21 Nov 2026 21:59:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368408-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id EDF38115BB5; Sat, 21 Nov 2026 21:59:06 +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 B67F53BCBC; Sat, 21 Nov 2026 18:59:04 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795287544;
b=10lvw+NsH6sW16ACY7UMTH9+useugBDty+zDKlj67S7bZSNM2PZ4ofhSLi+glxjOOMUv
Rcc9Dir9jbYHsRntOj2hvmejCnHXyJyN6dHA9eGZ+qf9wC77DXcNguHHymX6eqpyDt/E+
OcUCcYVpc5qxOei/f3NvS1xAEePmbL3f1/55XQ4VVakAE3GyiM+EEPbvSRGW3VqFJUF/l
WaxaNEfglKBTuKf31aa6DEP8NAHrl03VMJP2a2hodvg9+86ZWxgB49Sq69biMrG059ZaL
yXYtpMhzkvOPIua3rTHU7ZzUjSHUZFFrtjanpVriyKvdRVt2IfOOSHtugevMUuHENOQ==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795287544;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=S0mqANGQUFt1PhmFOnKITkgyRYJ8z4qi9DT1+JIbPnc=;
b=ME8JZDoDQkVsLVaf+jXMaqIh75Rh8H6Jxw/dgZkswA5tLSgBUGYg1VleMSvVbvIqeAuR
18Igydu5SUpveGU2P41bdodQ7rdh4Jy2sV/xgVTnx477SGz+17u4qzxClOOAE5CNh6wd4
R5kdGfwOoucFOXELQuC/ZXt8aoP8hjORuxmW77npI178fVQJ3qsd/l1Hs8mOo5CqsG8vr
hsM/cu3BXR2EtzgdgM8muHtDnUKSP/5j9/67r/jvR72nRs28yl/dO+frt7TmCCYHJNild
uZH2947Y42lgIUW9qEubc5YsFQIaUp3rfObSOwN5gEy0mRqs5SvQSUxnitIURdSTFHw==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=x8WLUf+n;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.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 873F1606A333;
Sat, 21 Nov 2026 18:59:04 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=x8WLUf+n
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.224.46
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795287543;
b=jIn/8MVwF458BZZehbJo0TAODknCs7RWucPmh/iIzN3HOTMsRkZptAN6PkSH0mnZM9uM
OQKhh7W/d7AlDFiAgoHh0++Kjn0/jfcJ6L/bk1U8c1GS49uT95hYopAcXYzMxanq3Mx/9
RfjUNK1431ndypHtwRqK2xOTr+aatPdFCaNPCq2hvA2Jytg+9HbMnyLKlKnZoPXdTFO4B
dOby7LDuv7DK1Dds55Cz3Kj2IsAVUIYjxTaUhIh1fn4OipKLZkc+InoyxYXknxAtEJd/H
LW9PTqDqNjevWaygls/plyeT//ZwXGwXYEf089P+EvNhxz5hRhd8qPcBr91v418edXQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795287543;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=S0mqANGQUFt1PhmFOnKITkgyRYJ8z4qi9DT1+JIbPnc=;
b=tZJa2LqSUD0+ytkxZhbIaq8WwObweFfzZ6HzUs4evNg3kezYD1aPy893E34U2lE8I68z
1cT4SVmjQlSHKXzFOtHMdQ/VjgAryBzebj4ZCmWH7y9wOpP6RUXgBm2a1SzGjNVKUoV1o
PyWzlsnY3pKzoW0HuSkpR6SZiTCZ2oYKBD8bNAbxpqCfWCT9PJf3E7Hc+flB6Uc4Ddom/
ncicaZ5wzzf2F2nIHFSVjAukCmNlZ4EvsIyjpjimoMtIyVvOSRQxk3IBjRn3Qczv0dDc/
awPdq90z+wkl1FryTbGKBSVy6d/bGHqUkfdG0ZKJtxfygie1v0VJcPhJ6qDGTUw+LOQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=x8WLUf+n;
arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.224.46
X-Received: from mail-yx1-f46.google.com (mail-yx1-f46.google.com [74.125.224.46])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 512DB606A320
for <netdev@vger.kernel.org>; Sat, 21 Nov 2026 18:59:02 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 512DB606A320
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yx1-f46.google.com with SMTP id 956f58d0204a3-67583c777abso2027984d50.1
for <netdev@vger.kernel.org>; Sat, 21 Nov 2026 10:59:02 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1795287542; cv=none;
d=google.com; s=arc-20260327;
b=CMQt31Bm6Bhz2ko0bIJ7gtB1uceiBqqFoEnXfbz4CU+u0VCqIqURqZEC3baQfcB7tI
wif7zvf2h0rBmytwfu3bw8rECRqjreVFEUD8TO3xs1xGtvRUZYmvp/45zyJ8TE8L73r4
YHiGATipe4CGhnEgTGraD+4of/P/VFlKNA4N3ObKSZRvetB4hEINt7to4Oyi+ZOS+oas
VpcfmVVcE/KarjlIralnrH3etI9fOsMJNqo793wAoTJkVPXpLp57CdIclb9qrCKv96Xs
RHM/VdHRI+7L9iVmATRTEIpFgoWqvPPYIl3LN9pQ9S5W2GXzKrd1btee7elWH4GcnURL
utEw==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=S0mqANGQUFt1PhmFOnKITkgyRYJ8z4qi9DT1+JIbPnc=;
fh=AQ/DgPqzHvkpo6Zop9jIvMiB/ueiz42xa+8FiTvHjnw=;
b=FJlFbdcooA33OkjByXIJZqFg05EKURDaEOEju/RyKOzudWYkkdIXwynJUZG+ygz/25
qM19jV0uaIDri/tEg8XYjsGFdICTV/4iTNokf8YGcVnWQAwcmdWGPaSCrGEkUyExrYF0
wFwj5fVkKXNt9t0AYT5t9tavadg8KK21XEn7s8yNcOjBPCmo4ujbzr0csCceDbk8gOBM
SwlAosAB05/iQiQRRdjDeH4EVRuhEecSPXcHwfRfhba5M4w60UcJ2N2AsDchI3cGUKj0
c+Z8KEzAZ28Y7mBJdcEvELTG6SjXebh0YV0jBK/YT5A09QtEpMkDT6rv8uVzIZ/okwGg
1Jxg==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1795287542; x=1795892342; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=S0mqANGQUFt1PhmFOnKITkgyRYJ8z4qi9DT1+JIbPnc=;
b=x8WLUf+nMMv9D2wcLvQXB+6pI07weakKB4GqPNb8aWPg33o0CHvXKLQyp2x2NMZpV8
4xiwnWUKnFGPPPx6hMYk69uwqviYal7F0h6CknGdHIEQEKpr8d9KAcRWZ26+nZmGUxLL
Usv7v+NSLUvqFykC4EwR5xdpxYtddUeqtVF2tXbRXt+jMsDQbR0TTMPLOT0SnYq2Abfy
SmduXFxE/LPRyFE2BOyde6qlQL7DLINGH0o84lmF6m2eZKmI8FO5TYtNq90lLE1tf2IO
vD10I9hG40B8BmV17rhGeyQdAzYosODj7CniNfCL67LE4+2t8635sqiBgk4MLHlX+lfK
1HQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795287542; x=1795892342;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=S0mqANGQUFt1PhmFOnKITkgyRYJ8z4qi9DT1+JIbPnc=;
b=hE5X9px5v0WTe5CCUm6oG7guypGtCJOmVMj1y8WFdPdWQ8NjfV9jPQj30AuAAWMDyb
MwGcCBCkvd6G9H9byonlJfcIrwbAbBGzCE5789PwvYBVZxj+k3rBBcsjrYSiTkwDjyvP
1gZRgFrBGzgIKMcrnsRcVMyOP9ljD16e2NbmzSHtFyl787KyF1K4YuONtdfaFfDvp1HK
bVKwhW2ygQf5MgctXo/I+TZIC4x627h+Q9YdH9dDDSRa2zI9ihbh8Ua/NdLvtmVzC8mP
LxcH00zSwDXs0iufW/TUeI78P/pnQxEUV8Th6OkqJMLEmRgG3tQ1gKYfPp67RtNcIDe1
DO5w==
X-Gm-Message-State: APuU4Z8tVWUch3wglItTlG2sGxiitWWi7Aa70Iu/K0Oxsg/PGrWEmxLJ
XaQpe/VOhk3dBTDZ/uYH9u603iRwLSbqQs2wA5pedV+S0bnZbbedViJqn7L2AQTo2thcWeO0rry
gQxcLb37yfC5XCkcYMHPoV2nfx+ssMNE=
X-Gm-Gg: AZFdTZfH5EtgRZ7JOokzYHfDPcnXb0hiH0grhiFRrtKV1st0zv87R1V9hDUHtJ64B6c
qflq/IsXkCK6qP5B36qBQ13hn2bojC2y0unacTY94CAJeOOC2+nmePsfYGZS6+xw8v3t1DtzaHf
vIdqywjBRzNlGT31Wdb3XBe5n1ehpnGXnSTjR9oLuqyb+0W61tnjUtuQwiLY/ogXU7pRJViOZAI
/OywUvmZ9yOAXcvNKrhh5BZNZv7jY4Q905zyCKMlqoqADYV22jeNRBIwMj4vVDgNgUIAt+9usO/
yxmz0+RBt+EEo/EciAR1DP+fPxXGm9f/n7d6s6DdZeHh7xvy1xNXxvF6F/MOVYxZ43IAjFA+wju
KcaAIkhsJ3+lqDvUvHv7LxMYymWtJvO8NqIoDf8sW6hEj9IVH8w7/Zav62nY376dJzRTihySZtZ
xx6whND5wBIBvgto3K5xM8n26/ekQv
X-Received: by 2002:a05:690e:43cf:b0:67c:2ae8:dc65 with SMTP id
956f58d0204a3-67df44e4e20mr1607796d50.46.1795287541934; Sat, 21 Nov 2026
10:59:01 -0800 (PST)
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: <179522024822.3294.17329682912331634453@kernel.org>
X-Gm-Features: Aa3M54rHJ66VyKfE32a-FeaNuXqo7nqps2L47RZ7BtP6YaBp4jMQbNn_NZfmEeA
X-Cc: netdev@vger.kernel.org, Doug Berger <opendmb@gmail.com>,
Florian Fainelli <florian.fainelli@broadcom.com>, Nicolai Buchwitz <nb@tipi-net.de>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>