From: Paolo Abeni <pabeni@redhat.com>
To: Aamir Ahmed <elb12345@hotmail.co.uk>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, edumazet@google.com,
enachman@marvell.com
Subject: Re: [PATCH] net: prestera: validate num_counters in counter response
Date: Mon, 7 Sep 2026 11:03:19 +0200 [thread overview]
Message-ID: <f52b173f-79f6-407a-b7a3-f3b94f34003a@redhat.com> (raw)
In-Reply-To: <AS8P251MB0001CC8A4737B0CC46F41DDFC8B22@AS8P251MB0001.EURP251.PROD.OUTLOOK.COM>
On 9/7/26 5:22 AM, Aamir Ahmed wrote:
> prestera_hw_counters_get() iterates over resp->num_counters
> entries from the firmware response without verifying it does
> not exceed the number of entries requested. A firmware response
> claiming more counters than requested causes out-of-bounds reads
> from the response buffer and out-of-bounds writes to the caller
> stats array.
>
> Validate that num_counters does not exceed the requested count
> before iterating.
>
> Fixes: 6e36c7bcb461 ("net: prestera: add counter HW API")
> Signed-off-by: Aamir Ahmed <elb12345@hotmail.co.uk>
Patchwork shows more than 20 patches from you in flight. Please read
Documentation/process/maintainer-netdev.rst
carefully, especially the section about the 15 patches limit.
Stop sending new patches until are the pending ones are processed.
Processing for the pending ones will be likely significantly delayed.
/P
next prev parent reply other threads:[~2026-09-07 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 3:22 [PATCH] net: prestera: validate num_counters in counter response Aamir Ahmed
2026-09-07 9:03 ` Paolo Abeni [this message]
2026-09-07 22:39 ` Aamir Ahmed
-- strict thread matches above, loose matches on Subject: below --
2026-09-09 21:24 netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f52b173f-79f6-407a-b7a3-f3b94f34003a@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=elb12345@hotmail.co.uk \
--cc=enachman@marvell.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox