Description
In the Linux kernel, the following vulnerability has been resolved:

scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies

bsg-lib allocates a 96-byte (SCSI_SENSE_BUFFERSIZE) reply buffer per
job, but struct ufs_rpmb_reply is 104 bytes: a 40-byte struct
ufs_bsg_reply followed by a 64-byte EHS. When an Advanced RPMB command
returns an EHS, ufshcd_advanced_rpmb_req_handler() copies it right after
the 40-byte header and writes 8 bytes past the end of the buffer.

Let each BSG transport pass its reply buffer size to bsg_setup_queue()
and have ufs_bsg request sizeof(struct ufs_rpmb_reply), so the full
reply reaches user space. Other transports keep SCSI_SENSE_BUFFERSIZE.
Published: 2026-10-28
Score: n/a
EPSS: n/a
KEV: No
Impact: Local Buffer Overflow
Action: Immediate Patch
AI Analysis

Impact

The Linux kernel's SCSI subsystem contains an out‑of‑bounds write when processing Advanced RPMB replies. The bsg library allocates a 96‑byte buffer, but the actual reply occupies 104 bytes, causing 8 bytes beyond the buffer to be overwritten. This overflow can corrupt kernel memory and enable local privilege escalation if an attacker can send a crafted RPMB command.

Affected Systems

All Linux kernel releases that use the bsg‑lib before the patch commits 2effbe746452c108188f85a6951f2b0b65653840, 7a755f6d47b811d3abd93c1642ce5e63894540b8, and ec6b083915e8146e147314a5f4f1285d07b57bfc. The vulnerability affects the SCSI BSG transport used by UFS devices and can impact any system that employs that transport without the patch.

Risk and Exploitability

The CVSS base score is not provided and EPSS is unavailable, so the exploitation probability cannot be quantified. The vulnerability is not listed in CISA's KEV catalog. The attack requires local access to the UFS device and the ability to issue a malformed rpm‑b command. Because the overflow occurs in kernel mode, an exploit could lead to privilege escalation to root if successfully triggered.

Generated by OpenCVE AI on October 28, 2026 at 12:38 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the Linux kernel patch where the bsg reply buffer size is correctly set to match struct ufs_rpmb_reply. These patches are available in the Git commit set linked above.
  • Rebuild or reload any modules that use the bsg transport after updating the kernel to ensure the new buffer size takes effect.
  • If updating the kernel immediately is not possible, restrict access to UFS RPMB commands by removing read/write permissions from the device node or disabling the rpmb interface for untrusted users until the patch can be applied.

Generated by OpenCVE AI on October 28, 2026 at 12:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 28 Oct 2026 10:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies bsg-lib allocates a 96-byte (SCSI_SENSE_BUFFERSIZE) reply buffer per job, but struct ufs_rpmb_reply is 104 bytes: a 40-byte struct ufs_bsg_reply followed by a 64-byte EHS. When an Advanced RPMB command returns an EHS, ufshcd_advanced_rpmb_req_handler() copies it right after the 40-byte header and writes 8 bytes past the end of the buffer. Let each BSG transport pass its reply buffer size to bsg_setup_queue() and have ufs_bsg request sizeof(struct ufs_rpmb_reply), so the full reply reaches user space. Other transports keep SCSI_SENSE_BUFFERSIZE.
Title scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-28T10:35:11.192Z

Reserved: 2026-09-25T10:25:14.397Z

Link: CVE-2026-99157

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-28T11:17:35.933

Modified: 2026-10-28T11:17:35.933

Link: CVE-2026-99157

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-28T12:45:16Z

Weaknesses

No weakness.