CVE-2026-90008
largeHeap buffer overflow in Linux kernel megaraid_sas driver NVMe PRP list handling
The Linux kernel's megaraid_sas driver builds NVMe PRP lists for I/O commands in a fixed-size DMA pool buffer (cmd->sg_frame) without checking its bounds, so the list can overrun the frame when the request is large. Since the block layer raised its default maximum request size to 4 MiB (commit 9b8b84879d4a), transfers to NVMe drives whose firmware reports a large MDTS require more PRP entries than fit in the chain frame, running a page past its end. An attacker with local low-privileged access who can issue I/O to such a drive can crash the kernel with a page fault, or, if the adjacent page is mapped, silently corrupt another in-flight command's PRP list, leading to denial of service, data corruption, and potentially privilege escalation. Affected are Linux systems with MegaRAID SAS controllers managing NVMe drives on kernels carrying the raised block-layer default. No public proof-of-concept or in-the-wild exploitation is known, and the flaw is not in CISA's KEV catalog.
What to do: Update to a kernel containing the megaraid_sas fix that caps max_hw_sectors to what the PRP chain frame can describe. As an interim mitigation, cap the request size for NVMe drives behind MegaRAID SAS controllers (e.g., write a value no larger than ~1280 KiB to /sys/block/<sdX>/queue/max_sectors_kb). Audit servers using megaraid_sas for NVMe passthrough/JBOD drives and check logs for page-fault traces in megasas_build_and_issue_cmd_fusion.
| Linux kernel megaraid_sas driver (scsi/megaraid_sas) | Kernels that include commit 9b8b84879d4a ('block: Increase BLK_DEF_MAX_SECTORS_CAP') up to the kernel release containing the fix commit (fix derives the limit f |
| Broadcom/LSI MegaRAID SAS controllers with NVMe drives attached (trigger condition: drive firmware reports a large MDTS) | Any, when used with an affected kernel |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: scsi: megaraid_sas: Limit NVMe request size to the PRP chain frame megasas_make_prp_nvme() builds a command's PRP list in cmd->sg_frame, a DMA pool buffer of instance->max_chain_frame_sz bytes, spending one entry per NVMe page of the transfer plus one per page of the buffer for the chain pointer. The loop runs until the transfer is described and never checks the buffer bound. max_hw_sectors comes straight from the MDTS the firmware reports for the drive. On drives with a large MDTS the only thing keeping the list inside the buffer was the block layer default of 1280 KiB, which needs 320 entries, which fit into a 4 KiB frame as that holds 512. But since commit 9b8b84879d4a ("block: Increase BLK_DEF_MAX_SECTORS_CAP") that default is 4 MiB, and such a transfer needs 1025 entries, so the list runs a full page past the end of the frame: sd 1:0:1:0: [sdb] tag#630 page boundary ptr_sgl: 0x00000000ba62d13f BUG: unable to handle page fault for address: ff663bcb81e7c000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page RIP: 0010:megasas_build_and_issue_cmd_fusion+0xeaa/0x1870 [megaraid_sas] If the page after the frame happens to be mapped, the overrun does not fault but silently corrupts the neighbouring pool entry, which is another in-flight command's PRP list. Cap max_hw_sectors at what the chain frame can describe, less one page for transfers that do not start on a page boundary and so need one entry more. This is the megaraid_sas counterpart of commit 04631f55afc5 ("scsi: mpt3sas: Limit NVMe request size to 2 MiB"), but derives the limit from max_chain_frame_sz rather than hardcoding it.
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.