CVE-2024-57926
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
19/01/2025
Last modified:
11/02/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
drm/mediatek: Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind returns err<br />
<br />
The pointer need to be set to NULL, otherwise KASAN complains about<br />
use-after-free. Because in mtk_drm_bind, all private&#39;s drm are set<br />
as follows.<br />
<br />
private->all_drm_private[i]->drm = drm;<br />
<br />
And drm will be released by drm_dev_put in case mtk_drm_kms_init returns<br />
failure. However, the shutdown path still accesses the previous allocated<br />
memory in drm_atomic_helper_shutdown.<br />
<br />
[ 84.874820] watchdog: watchdog0: watchdog did not stop!<br />
[ 86.512054] ==================================================================<br />
[ 86.513162] BUG: KASAN: use-after-free in drm_atomic_helper_shutdown+0x33c/0x378<br />
[ 86.514258] Read of size 8 at addr ffff0000d46fc068 by task shutdown/1<br />
[ 86.515213]<br />
[ 86.515455] CPU: 1 UID: 0 PID: 1 Comm: shutdown Not tainted 6.13.0-rc1-mtk+gfa1a78e5d24b-dirty #55<br />
[ 86.516752] Hardware name: Unknown Product/Unknown Product, BIOS 2022.10 10/01/2022<br />
[ 86.517960] Call trace:<br />
[ 86.518333] show_stack+0x20/0x38 (C)<br />
[ 86.518891] dump_stack_lvl+0x90/0xd0<br />
[ 86.519443] print_report+0xf8/0x5b0<br />
[ 86.519985] kasan_report+0xb4/0x100<br />
[ 86.520526] __asan_report_load8_noabort+0x20/0x30<br />
[ 86.521240] drm_atomic_helper_shutdown+0x33c/0x378<br />
[ 86.521966] mtk_drm_shutdown+0x54/0x80<br />
[ 86.522546] platform_shutdown+0x64/0x90<br />
[ 86.523137] device_shutdown+0x260/0x5b8<br />
[ 86.523728] kernel_restart+0x78/0xf0<br />
[ 86.524282] __do_sys_reboot+0x258/0x2f0<br />
[ 86.524871] __arm64_sys_reboot+0x90/0xd8<br />
[ 86.525473] invoke_syscall+0x74/0x268<br />
[ 86.526041] el0_svc_common.constprop.0+0xb0/0x240<br />
[ 86.526751] do_el0_svc+0x4c/0x70<br />
[ 86.527251] el0_svc+0x4c/0xc0<br />
[ 86.527719] el0t_64_sync_handler+0x144/0x168<br />
[ 86.528367] el0t_64_sync+0x198/0x1a0<br />
[ 86.528920]<br />
[ 86.529157] The buggy address belongs to the physical page:<br />
[ 86.529972] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000d46fd4d0 pfn:0x1146fc<br />
[ 86.531319] flags: 0xbfffc0000000000(node=0|zone=2|lastcpupid=0xffff)<br />
[ 86.532267] raw: 0bfffc0000000000 0000000000000000 dead000000000122 0000000000000000<br />
[ 86.533390] raw: ffff0000d46fd4d0 0000000000000000 00000000ffffffff 0000000000000000<br />
[ 86.534511] page dumped because: kasan: bad access detected<br />
[ 86.535323]<br />
[ 86.535559] Memory state around the buggy address:<br />
[ 86.536265] ffff0000d46fbf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
[ 86.537314] ffff0000d46fbf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
[ 86.538363] >ffff0000d46fc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
[ 86.544733] ^<br />
[ 86.551057] ffff0000d46fc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
[ 86.557510] ffff0000d46fc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
[ 86.563928] ==================================================================<br />
[ 86.571093] Disabling lock debugging due to kernel taint<br />
[ 86.577642] Unable to handle kernel paging request at virtual address e0e9c0920000000b<br />
[ 86.581834] KASAN: maybe wild-memory-access in range [0x0752049000000058-0x075204900000005f]<br />
...
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.4 (including) | 6.6.72 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



