From: Muhammad Bilal <meatuni001@gmail.com>
To: robh@kernel.org
Cc: tomeu@tomeuvizoso.net, ogabbay@kernel.org, tzimmermann@suse.de,
Frank.Li@nxp.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Muhammad Bilal <meatuni001@gmail.com>
Subject: [PATCH 0/2] accel/ethosu: fix two command stream parser bugs
Date: Sat, 23 May 2026 21:07:51 +0000 [thread overview]
Message-ID: <20260523210840.92039-1-meatuni001@gmail.com> (raw)
While investigating the IFM region index out-of-bounds fix already sent
[1], two additional bugs were found in the same command stream parser
function ethosu_gem_cmdstream_copy_and_validate():
Patch 1: NPU_OP_RESIZE unconditionally triggers WARN_ON(1), allowing
any unprivileged user with DRM device access to spam the kernel log or
panic the kernel if panic_on_warn is set.
Patch 2: NPU_SET_SCALE1_LENGTH on U85 hardware assigns the user-supplied
length to weight[1] instead of weight[2], mismatching its BASE handler
and corrupting the software bounds-check state for both weight buffers.
Both fixes apply cleanly on top of the IFM patch and target the same
Fixes: tag since all three bugs originate in the same commit.
[1] <20260523195159.55801-1-meatuni001@gmail.com>
Muhammad Bilal (2):
accel/ethosu: reject NPU_OP_RESIZE commands from userspace
accel/ethosu: fix wrong weight index in NPU_SET_SCALE1_LENGTH on U85
drivers/accel/ethosu/ethosu_gem.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
2.53.0
next reply other threads:[~2026-05-25 6:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 21:07 Muhammad Bilal [this message]
2026-05-23 21:07 ` [PATCH 1/2] accel/ethosu: reject NPU_OP_RESIZE commands from userspace Muhammad Bilal
2026-05-25 7:19 ` Claude review: " Claude Code Review Bot
2026-05-23 21:07 ` [PATCH 2/2] accel/ethosu: fix wrong weight index in NPU_SET_SCALE1_LENGTH on U85 Muhammad Bilal
2026-05-25 7:19 ` Claude review: " Claude Code Review Bot
2026-05-25 7:19 ` Claude review: accel/ethosu: fix two command stream parser bugs Claude Code Review Bot
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=20260523210840.92039-1-meatuni001@gmail.com \
--to=meatuni001@gmail.com \
--cc=Frank.Li@nxp.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ogabbay@kernel.org \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tomeu@tomeuvizoso.net \
--cc=tzimmermann@suse.de \
/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