From: BeaCox <0xbeac@gmail.com>
To: Ketan Mukadam <ketan.mukadam@broadcom.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <mkp@kernel.org>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: [RFC PATCH 0/2] scsi: be2iscsi: validate vendor command buffers
Date: Sun, 1 Nov 2026 14:37:52 +0800 [thread overview]
Message-ID: <20261101063754.89598-1-0xbeac@gmail.com> (raw)
These patches validate the vendor request and DMA payload before they
are accessed, then bound the WRITE_FLASH copy by the remaining buffer
space. The first patch also keeps the allocation size valid for the
caller's error cleanup. The second preserves the existing u16 offset
interpretation and scatterlist copy limit.
The series is based on mainline cbbddb6b08cc9900a87cccaa9b22bbe06aa4f50a.
Both the first patch and the complete series were object-built on
x86_64 with gcc 13.3 and W=1. An ASan/UBSan userspace harness extracting
the actual function detects out-of-bounds accesses in the original
code and passes 2593 boundary cases after both patches.
There is no kernel/BSG reproducer or HBA/firmware test here. The BSG
entry point requires CAP_SYS_RAWIO; no unprivileged exploit is claimed.
The local harness can be shared privately on request. Feedback and
hardware testing are welcome, especially on valid vendor commands.
The analysis, patches and validation were assisted by OpenAI Codex.
BeaCox (2):
scsi: be2iscsi: validate vendor request and payload lengths
scsi: be2iscsi: bound the WRITE_FLASH copy to the DMA buffer
drivers/scsi/be2iscsi/be_mgmt.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
base-commit: cbbddb6b08cc9900a87cccaa9b22bbe06aa4f50a
--
2.43.0
next reply other threads:[~2026-11-01 6:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 6:37 BeaCox [this message]
2026-11-01 6:37 ` [RFC PATCH 1/2] scsi: be2iscsi: validate vendor request and payload lengths BeaCox
2026-11-01 6:37 ` [RFC PATCH 2/2] scsi: be2iscsi: bound the WRITE_FLASH copy to the DMA buffer BeaCox
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=20261101063754.89598-1-0xbeac@gmail.com \
--to=0xbeac@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ketan.mukadam@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=stable@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
all inboxes | Powered by JetHome®