In the Linux kernel, the following vulnerability has been resolved:
media: mediatek: vcodec: fix resource leaks in vdecmsgqueue_init()
If we encounter any error in the vdecmsgqueueinit() then we need to set "msgqueue->wdmaaddr.size = 0;". Normally, this is done inside the vdecmsgqueuedeinit() function. However, if the first call to allocate &msgqueue->wdmaaddr fails, then the vdecmsgqueue_deinit() function is a no-op. For that situation, just set the size to zero explicitly and return.
There were two other error paths which did not clean up before returning. Change those error paths to goto memallocerr.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54143.json"
}