Bug 2264844 (CVE-2024-26327)

Summary: CVE-2024-26327 QEMU: SR-IOV: improper validation of NumVFs leads to buffer overflow
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
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: qemu-kvm 9.0.0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the SR/IOV emulation support of QEMU. The register_vfs() function in hw/pci/pcie_sriov.c mishandled the situation where a guest writes NumVFs greater than TotalVFs, leading to a buffer overflow in VF (Virtual Function) implementations. 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: 2264845    
Bug Blocks: 2264850    

Description Mauro Matteo Cascella 2024-02-19 09:26:28 UTC
An issue was discovered in QEMU 7.1.0 through 8.2.1. The register_vfs() function in hw/pci/pcie_sriov.c mishandles the situation where a guest writes NumVFs greater than TotalVFs, leading to a buffer overflow in VF implementations.

Reference:
https://lore.kernel.org/all/20240214-reuse-v4-5-89ad093a07f4@daynix.com/

Comment 1 Mauro Matteo Cascella 2024-02-19 09:37:11 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 2264845]

Comment 3 Mauro Matteo Cascella 2024-05-31 11:14:10 UTC
Upstream commit:
https://gitlab.com/qemu-project/qemu/-/commit/6081b4243cd64dff1b2cf5b0c215c71e9d7e753b

Comment 4 errata-xmlrpc 2024-11-12 08:56:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:9136 https://access.redhat.com/errata/RHSA-2024:9136