CVE-2022-50672
Description
In the Linux kernel, the following vulnerability has been resolved:
mailbox: zynq-ipi: fix error handling while device_register() fails
If device_register() fails, it has two issues: 1. The name allocated by dev_set_name() is leaked. 2. The parent of device is not NULL, device_unregister() is called in zynqmp_ipi_free_mboxes(), it will lead a kernel crash because of removing not added device.
Call put_device() to give up the reference, so the name is freed in kobject_cleanup(). Add device registered check in zynqmp_ipi_free_mboxes() to avoid null-ptr-deref.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A use-after-free and memory leak in the Linux kernel's Zynq-IPI mailbox driver due to improper error handling when device_register() fails.
Vulnerability
Analysis
The vulnerability resides in the zynq-ipi mailbox driver within the Linux kernel. When device_register() fails, the driver does not properly release the name allocated by dev_set_name(), leading to a memory leak. Additionally, the parent device pointer is not cleared, causing device_unregister() to be called on a device that was never successfully registered, which results in a kernel crash due to a null-pointer dereference [1].
Exploitation
An attacker would need to trigger a failure in device_register() for the Zynq-IPI mailbox device. This could occur under specific system conditions, such as memory pressure or resource exhaustion, that cause the registration to fail. No special privileges are required beyond the ability to influence device registration, which may be possible from user space in some configurations.
Impact
Successful exploitation leads to a denial of service disruption (kernel crash) and potential memory exhaustion due to the leaked name allocation. The crash can be used as a denial-of-service vector. There is no evidence of privilege escalation or data corruption.
Mitigation
The fix was applied in Linux kernel stable releases. The commit referenced in [1] and [2] adds a put_device() call to free the name and introduces a check in zynqmp_ipi_free_mboxes() to avoid calling device_unregister() on a device that was not successfully registered. Users should update to a kernel version containing this fix.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
6b3a5c76f61e2a39b4de0804f4f05d8e2fb3af2d63cefc0123fcf079958c0a6792a0cdef0Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- git.kernel.org/stable/c/3fcf079958c00d83c51e4f250abf2c77fe9cc1b9nvd
- git.kernel.org/stable/c/4f05d8e2fb3ab702c2633a74571e1b31cb579985nvd
- git.kernel.org/stable/c/a39b4de0804f9fe0ae911b359ffd4afe7d9d933bnvd
- git.kernel.org/stable/c/a6792a0cdef0b1c2d77920246283a72537e60e94nvd
- git.kernel.org/stable/c/b3a5c76f61e2b380e29dfc6705854ca1ee85501dnvd
- git.kernel.org/stable/c/f2d63cefc012cafe1b7651bbf3302f8bcd8bea4anvd
News mentions
0No linked articles in our index yet.