Bug 2264896 (CVE-2024-26328)

Summary: CVE-2024-26328 QEMU: NVMe: out-of-bounds memory access in nvme_sriov_pre_write_ctrl()
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: ailan, ddepaula, jen, jferlan, jmaloy, kkiwi, knoel, mrezanin, mst, nilal, pbonzini, ymankad
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the NVMe emulation support of QEMU. The register_vfs() function in hw/pci/pcie_sriov.c does not set NumVFs to PCI_SRIOV_TOTAL_VF, causing the interaction with hw/nvme/ctrl.c to be mishandled. This issue could lead to out-of-bounds memory access in hw/nvme. This flaw allows a malicious guest to crash QEMU and cause a denial of service condition.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2264898    
Bug Blocks: 2264850    

Description Mauro Matteo Cascella 2024-02-19 15:24:47 UTC
An issue was discovered in QEMU 7.1.0 through 8.2.1. The register_vfs() function in hw/pci/pcie_sriov.c does not set NumVFs to PCI_SRIOV_TOTAL_VF, and thus interaction with hw/nvme/ctrl.c is mishandled.

References:
https://lore.kernel.org/all/20240213055345-mutt-send-email-mst%40kernel.org/
https://lore.kernel.org/all/20240218-reuse-v5-1-e4fc1c19b5a9@daynix.com/

Comment 1 Mauro Matteo Cascella 2024-02-19 15:30:08 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 2264898]