From: Ian Rogers <irogers@google.com>
To: netdev-bot+sashiko@kernel.org
Cc: sgoutham@marvell.com, rkannoth@marvell.com, gakula@marvell.com,
sbhatta@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, elkin@google.com,
Ian Rogers <irogers@google.com>
Subject: Re: [PATCH net] octeontx2-af: Fix uninitialized variables and bounds in MCS alloc handlers
Date: Tue, 24 Nov 2026 16:40:29 -0800 [thread overview]
Message-ID: <20261125004029.1004901-1-irogers@google.com> (raw)
In-Reply-To: <179545553181.3135.4354699424439095142@kernel.org>
On Mon, Nov 23, 2026 at 9:38 AM <netdev-bot+sashiko@kernel.org> wrote:
>
> [Severity: Low]
> Can the response array overflow described here actually happen today?
[...]
> [Severity: Medium]
> Does the requester actually see these rejections as errors?
>
> This default case and the new rsrc_cnt > ARRAY_SIZE() checks both jump to
> the exit label, which always returns 0:
Good catch on both counts - 'exit:' in rvu_mbox_handler_mcs_alloc_resources()
returns 0 (leaving hdr.rc == 0), and rvu_alloc_rsrc() already bounds
allocated IDs to rsrc->max <= 128 before writing into rsp->*_ids[].
I'll send a v2 that unlocks rvu->rsrc_lock and returns -EINVAL directly
for unrecognized rsrc_type (and rule_type) and drops the unnecessary
ARRAY_SIZE() checks so partial allocations are unchanged.
Thanks,
Ian
pw-bot: cr
prev parent reply other threads:[~2026-11-25 0:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 17:05 Ian Rogers
2026-11-23 17:38 ` netdev-bot+sashiko
2026-11-25 0:40 ` Ian Rogers [this message]
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=20261125004029.1004901-1-irogers@google.com \
--to=irogers@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=elkin@google.com \
--cc=gakula@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/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
all inboxes | Powered by JetHome®