mailbox: zynq-ipi: fix error handling while device_register() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4981b82ba2ff87df6a711fcd7a233c615df5fc79 · < a6792a0cdef0b1c2d77920246283a72537e60e94| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s zynq-ipi mailbox driver mishandles a failed device_register() call, leaking an allocated name and potentially crashing the kernel during cleanup. The input does not establish whether an attacker can trigger this failure or specify network access, authentication, or user-interaction requirements.
Engineers running the Linux kernel with the zynq-ipi mailbox driver should check their deployments; affected versions are not specified.