Skip to main content

CVE-2024-57926: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-57926cvecve-2024-57926
Published: Sun Jan 19 2025 (01/19/2025, 11:52:43 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/mediatek: Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind returns err The pointer need to be set to NULL, otherwise KASAN complains about use-after-free. Because in mtk_drm_bind, all private's drm are set as follows. private->all_drm_private[i]->drm = drm; And drm will be released by drm_dev_put in case mtk_drm_kms_init returns failure. However, the shutdown path still accesses the previous allocated memory in drm_atomic_helper_shutdown. [ 84.874820] watchdog: watchdog0: watchdog did not stop! [ 86.512054] ================================================================== [ 86.513162] BUG: KASAN: use-after-free in drm_atomic_helper_shutdown+0x33c/0x378 [ 86.514258] Read of size 8 at addr ffff0000d46fc068 by task shutdown/1 [ 86.515213] [ 86.515455] CPU: 1 UID: 0 PID: 1 Comm: shutdown Not tainted 6.13.0-rc1-mtk+gfa1a78e5d24b-dirty #55 [ 86.516752] Hardware name: Unknown Product/Unknown Product, BIOS 2022.10 10/01/2022 [ 86.517960] Call trace: [ 86.518333] show_stack+0x20/0x38 (C) [ 86.518891] dump_stack_lvl+0x90/0xd0 [ 86.519443] print_report+0xf8/0x5b0 [ 86.519985] kasan_report+0xb4/0x100 [ 86.520526] __asan_report_load8_noabort+0x20/0x30 [ 86.521240] drm_atomic_helper_shutdown+0x33c/0x378 [ 86.521966] mtk_drm_shutdown+0x54/0x80 [ 86.522546] platform_shutdown+0x64/0x90 [ 86.523137] device_shutdown+0x260/0x5b8 [ 86.523728] kernel_restart+0x78/0xf0 [ 86.524282] __do_sys_reboot+0x258/0x2f0 [ 86.524871] __arm64_sys_reboot+0x90/0xd8 [ 86.525473] invoke_syscall+0x74/0x268 [ 86.526041] el0_svc_common.constprop.0+0xb0/0x240 [ 86.526751] do_el0_svc+0x4c/0x70 [ 86.527251] el0_svc+0x4c/0xc0 [ 86.527719] el0t_64_sync_handler+0x144/0x168 [ 86.528367] el0t_64_sync+0x198/0x1a0 [ 86.528920] [ 86.529157] The buggy address belongs to the physical page: [ 86.529972] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000d46fd4d0 pfn:0x1146fc [ 86.531319] flags: 0xbfffc0000000000(node=0|zone=2|lastcpupid=0xffff) [ 86.532267] raw: 0bfffc0000000000 0000000000000000 dead000000000122 0000000000000000 [ 86.533390] raw: ffff0000d46fd4d0 0000000000000000 00000000ffffffff 0000000000000000 [ 86.534511] page dumped because: kasan: bad access detected [ 86.535323] [ 86.535559] Memory state around the buggy address: [ 86.536265] ffff0000d46fbf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 86.537314] ffff0000d46fbf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 86.538363] >ffff0000d46fc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 86.544733] ^ [ 86.551057] ffff0000d46fc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 86.557510] ffff0000d46fc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 86.563928] ================================================================== [ 86.571093] Disabling lock debugging due to kernel taint [ 86.577642] Unable to handle kernel paging request at virtual address e0e9c0920000000b [ 86.581834] KASAN: maybe wild-memory-access in range [0x0752049000000058-0x075204900000005f] ...

AI-Powered Analysis

AILast updated: 07/02/2025, 22:39:37 UTC

Technical Analysis

CVE-2024-57926 is a high-severity vulnerability identified in the Linux kernel, specifically within the Direct Rendering Manager (DRM) subsystem for MediaTek hardware (drm/mediatek). The root cause is a use-after-free (UAF) condition triggered during the shutdown sequence of the DRM driver. The vulnerability arises because the pointer private->all_drm_private[i]->drm is not set to NULL when the function mtk_drm_bind returns an error. In the normal flow, drm pointers are assigned in mtk_drm_bind, and if mtk_drm_kms_init fails, the drm object is released via drm_dev_put. However, the shutdown path (drm_atomic_helper_shutdown) still accesses this freed memory, leading to a use-after-free scenario detected by Kernel Address Sanitizer (KASAN). This can cause kernel crashes, memory corruption, or potentially arbitrary code execution within kernel space. The vulnerability is tracked as CWE-416 (Use After Free) and has a CVSS v3.1 score of 7.8, indicating high severity. Exploitation requires local access with low privileges (PR:L), no user interaction (UI:N), and has impacts on confidentiality, integrity, and availability (all high). The vulnerability affects Linux kernel versions containing the MediaTek DRM driver with the specified commit hashes. No known exploits are currently reported in the wild, but the nature of the flaw and its kernel-level impact make it a critical concern for affected systems. The detailed kernel logs show the crash occurring during system shutdown or reboot, which could be leveraged for denial of service or privilege escalation attacks if exploited by a local attacker.

Potential Impact

For European organizations, the impact of CVE-2024-57926 is significant, particularly for those relying on Linux systems running on MediaTek hardware platforms. This includes embedded devices, IoT equipment, and potentially some servers or workstations using MediaTek components. The vulnerability can lead to system instability, unexpected reboots, or kernel panics, affecting availability of critical services. In environments where Linux is used for infrastructure or industrial control systems, this could disrupt operations. Furthermore, the high confidentiality and integrity impact means that a successful exploit could allow attackers to execute arbitrary code with kernel privileges, potentially leading to full system compromise. This risk is heightened in sectors such as telecommunications, manufacturing, and public services where MediaTek-based Linux devices might be deployed. Although exploitation requires local access, insider threats or attackers gaining initial footholds could leverage this vulnerability to escalate privileges or maintain persistence. The absence of known exploits in the wild currently reduces immediate risk but does not eliminate the threat, especially as patches are not yet widely applied.

Mitigation Recommendations

Mitigation should focus on applying the official Linux kernel patches that address this use-after-free condition by ensuring the drm pointers are properly nullified upon error returns in mtk_drm_bind. Organizations should: 1) Identify all Linux systems using MediaTek DRM drivers, especially those running kernel versions prior to the fix. 2) Prioritize patching or upgrading kernels to versions where this vulnerability is resolved. 3) Implement strict access controls to limit local user privileges and prevent unauthorized local access, reducing the risk of exploitation. 4) Monitor system logs for unusual kernel errors or crashes related to drm_atomic_helper_shutdown or MediaTek DRM components. 5) For embedded or IoT devices where kernel upgrades are challenging, consider network segmentation and additional host-based protections to limit attack surface. 6) Engage with hardware and OS vendors to obtain timely updates and guidance. 7) Conduct security audits to detect any signs of exploitation attempts or anomalous behavior related to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-01-19T11:50:08.376Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdea91

Added to database: 5/21/2025, 9:08:51 AM

Last enriched: 7/2/2025, 10:39:37 PM

Last updated: 8/17/2025, 5:40:19 AM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats