CVE-2023-54143 in Linux
Summary
by MITRE • 12/24/2025
In the Linux kernel, the following vulnerability has been resolved:
media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init()
If we encounter any error in the vdec_msg_queue_init() then we need to set "msg_queue->wdma_addr.size = 0;". Normally, this is done inside the vdec_msg_queue_deinit() function. However, if the first call to allocate &msg_queue->wdma_addr fails, then the vdec_msg_queue_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 mem_alloc_err.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 01/03/2026
The vulnerability identified as CVE-2023-54143 resides within the Linux kernel's media subsystem, specifically affecting the Mediatek video codec driver component. This issue represents a resource leak condition that occurs during the initialization phase of the video decoder message queue functionality. The flaw manifests when the vdec_msg_queue_init() function encounters allocation failures during memory management operations, particularly concerning the wdma_addr structure within the message queue context. The vulnerability is classified under CWE-404, which addresses improper resource management and memory leaks in software systems, making it a critical concern for embedded systems and mobile device platforms that rely heavily on the Mediatek video codec hardware acceleration capabilities.
The technical implementation flaw stems from inadequate error handling within the vdec_msg_queue_init() function where proper cleanup mechanisms are not consistently executed upon allocation failures. When the initial memory allocation for msg_queue->wdma_addr fails, the vdec_msg_queue_deinit() function becomes ineffective as a cleanup mechanism since it serves as a no-op in this specific error scenario. The kernel developer identified that the size field of the wdma_addr structure needs to be explicitly set to zero in such failure cases, but this explicit cleanup was missing from certain error paths within the initialization routine. Additionally, two other error conditions were discovered that did not properly transition to the designated error handling path, instead returning prematurely without adequate resource cleanup operations.
The operational impact of this vulnerability extends significantly within embedded systems and mobile platforms utilizing Mediatek SoCs that employ hardware-accelerated video decoding capabilities. Attackers could potentially exploit this resource leak to consume system memory resources over time, leading to system instability, performance degradation, or even complete system crashes in severe cases. The vulnerability particularly affects devices running Linux kernels with the Mediatek video codec driver, including smartphones, tablets, and embedded multimedia systems where continuous video processing operations are common. This issue aligns with ATT&CK technique T1499.004, which involves resource exhaustion through memory leaks, potentially enabling denial of service conditions that compromise system availability.
Mitigation strategies for CVE-2023-54143 involve applying the official kernel patch that implements proper error handling and resource cleanup procedures within the vdec_msg_queue_init() function. The fix ensures that all error paths properly transition to the designated error handling routine using goto statements, thereby guaranteeing that memory allocation failures result in appropriate cleanup operations. System administrators and device manufacturers should prioritize updating their kernel versions to include this patch, particularly in production environments where continuous video processing occurs. The patch addresses the specific resource leak by ensuring that when memory allocation fails, the wdma_addr size field is explicitly set to zero and error handling paths properly manage resource cleanup before returning control to the calling function. Regular kernel updates and security monitoring practices should be maintained to prevent similar resource management issues from occurring in other kernel subsystems and driver components.