In the Linux kernel, the following vulnerability has been resolved:
mailbox: zynq-ipi: fix error handling while device_register() fails
If deviceregister() fails, it has two issues: 1. The name allocated by devsetname() is leaked. 2. The parent of device is not NULL, deviceunregister() is called in zynqmpipifree_mboxes(), it will lead a kernel crash because of removing not added device.
Call putdevice() to give up the reference, so the name is freed in kobjectcleanup(). Add device registered check in zynqmpipifree_mboxes() to avoid null-ptr-deref.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50672.json",
"cna_assigner": "Linux"
}