Bug 2301499 (CVE-2024-42134)

Summary: CVE-2024-42134 kernel: virtio-pci: Check if is_avq is NULL
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 6.9.9, kernel 6.10 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in the Linux kernel's virtio-pci driver in the vp_del_vqs() function where a lack of proper checks with the function pointer vp_dev->is_avq could lead to a NULL pointer dereference. This can lead to memory corruption or crashes when managing virtual devices.
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: 2301992    
Bug Blocks:    

Description OSIDB Bzimport 2024-07-30 08:36:19 UTC
In the Linux kernel, the following vulnerability has been resolved:

virtio-pci: Check if is_avq is NULL

[bug]
In the virtio_pci_common.c function vp_del_vqs, vp_dev->is_avq is involved
to determine whether it is admin virtqueue, but this function vp_dev->is_avq
 may be empty. For installations, virtio_pci_legacy does not assign a value
 to vp_dev->is_avq.

[fix]
Check whether it is vp_dev->is_avq before use.

[test]
Test with virsh Attach device
Before this patch, the following command would crash the guest system

After applying the patch, everything seems to be working fine.

Comment 1 Mauro Matteo Cascella 2024-07-31 09:55:37 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024073028-CVE-2024-42134-99d7@gregkh/T

Comment 2 Mauro Matteo Cascella 2024-07-31 09:55:58 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301992]