CVE-2024-41096
Description
In the Linux kernel, the following vulnerability has been resolved: PCI/MSI: Fix UAF in msi_capability_init KFENCE reports the following UAF: BUG: KFENCE: use-after-free read in __pci_enable_msi_range+0x2c0/0x488 Use-after-free read at 0x0000000024629571 (in kfence-#12): __pci_enable_msi_range+0x2c0/0x488 pci_alloc_irq_vectors_affinity+0xec/0x14c pci_alloc_irq_vectors+0x18/0x28 kfence-#12: 0x0000000008614900-0x00000000e06c228d, size=104, cache=kmalloc-128 allocated by task 81 on cpu 7 at 10.808142s: __kmem_cache_alloc_node+0x1f0/0x2bc kmalloc_trace+0x44/0x138 msi_alloc_desc+0x3c/0x9c msi_domain_insert_msi_desc+0x30/0x78 msi_setup_msi_desc+0x13c/0x184 __pci_enable_msi_range+0x258/0x488 pci_alloc_irq_vectors_affinity+0xec/0x14c pci_alloc_irq_vectors+0x18/0x28 freed by task 81 on cpu 7 at 10.811436s: msi_domain_free_descs+0xd4/0x10c msi_domain_free_locked.part.0+0xc0/0x1d8 msi_domain_alloc_irqs_all_locked+0xb4/0xbc pci_msi_setup_msi_irqs+0x30/0x4c __pci_enable_msi_range+0x2a8/0x488 pci_alloc_irq_vectors_affinity+0xec/0x14c pci_alloc_irq_vectors+0x18/0x28 Descriptor allocation done in: __pci_enable_msi_range msi_capability_init msi_setup_msi_desc msi_insert_msi_desc msi_domain_insert_msi_desc msi_alloc_desc ... Freed in case of failure in __msi_domain_alloc_locked() __pci_enable_msi_range msi_capability_init pci_msi_setup_msi_irqs msi_domain_alloc_irqs_all_locked msi_domain_alloc_locked __msi_domain_alloc_locked => fails msi_domain_free_locked ... That failure propagates back to pci_msi_setup_msi_irqs() in msi_capability_init() which accesses the descriptor for unmasking in the error exit path. Cure it by copying the descriptor and using the copy for the error exit path unmask operation. [ tglx: Massaged change log ]
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
OS impact
| OS | Version | Status | Fixed in |
|---|---|---|---|
| rhel | 9 | fixed | |
| sles | affected | | |
| rocky | 9 | fixed | |
| debian | bookworm | fixed | 6.1.112-1 |
| debian | bullseye | fixed | 0 |
| debian | forky | fixed | 6.9.8-1 |
| debian | sid | fixed | 6.9.8-1 |
| debian | trixie | fixed | 6.9.8-1 |
| almalinux | 9 | fixed | kernel-doc-5.14.0-427.35.1.el9_4.noarch.rpm |
References
- https://access.redhat.com/errata/RHSA-2024:6567
- https://www.suse.com/security/cve/CVE-2024-41096.html
- https://errata.rockylinux.org/RXSA-2024:6567
- https://errata.rockylinux.org/RLSA-2024:6567
- https://security-tracker.debian.org/tracker/CVE-2024-41096
- https://bugzilla.redhat.com/2265797
- https://bugzilla.redhat.com/2269434
- https://bugzilla.redhat.com/2269436
- https://bugzilla.redhat.com/2273141
- https://bugzilla.redhat.com/2275678
- https://bugzilla.redhat.com/2278206
- https://bugzilla.redhat.com/2281052
- https://bugzilla.redhat.com/2281151
- https://bugzilla.redhat.com/2281727
- https://bugzilla.redhat.com/2281968
- https://bugzilla.redhat.com/2282709
- https://bugzilla.redhat.com/2284271
- https://bugzilla.redhat.com/2284402
- https://bugzilla.redhat.com/2293273
- https://bugzilla.redhat.com/2293276
- https://bugzilla.redhat.com/2293440
- https://bugzilla.redhat.com/2297511
- https://bugzilla.redhat.com/2297520
- https://bugzilla.redhat.com/2300409
- https://bugzilla.redhat.com/2300414
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.