
Cloud Vulnerability DB
A community-led vulnerabilities database
In the Linux kernel, a use-after-free vulnerability was discovered in the powerpc/pseries subsystem, specifically in the remove_phb_dynamic() function (CVE-2022-49196). The vulnerability occurs when the function uses &phb->io_resource after calling device_unregister(&host_bridge->dev), which may have already freed the phb pointer since pcibios_free_controller_deferred() is the release function for the host_bridge (Kernel Git).
The issue manifests when there are no outstanding references when device_unregister() is called, causing the phb to be freed while it's still being accessed. While this issue has generally gone unnoticed, it becomes apparent when running with slub_debug and page_poison enabled, leading to a system crash. The vulnerability was introduced through commit 2dd9c11b9d4d which implemented the use of pci_host_bridge.release_fn() to kfree(phb) (Kernel Git).
When triggered, this vulnerability can lead to a system crash due to accessing freed memory. This is particularly evident in environments with memory debugging features enabled, such as slub_debug and page_poison, where the system will crash with a bad page fault exception (Kernel Git).
The vulnerability requires specific conditions to be triggered, particularly in systems using the PowerPC architecture with the pseries platform. It becomes manifest during dynamic PCI host bridge removal operations, specifically when using the drmgr command (Kernel Git).
The issue has been fixed by maintaining a reference to the host_bridge->dev until all operations with phb are completed. This is implemented by adding get_device() before using the phb pointer and corresponding put_device() after the operations are complete. The fix is available in the kernel patch that adds proper reference counting to prevent the use-after-free condition (Kernel Git).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."