CVE-2024-35921·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: media: mediatek: vcodec: Fix oops when HEVC init fails The stateless HEVC decoder saves the instance pointer in the context regardless if the initialization worked or not. This caused a use after free, when the pointer is freed in case of a failure in the deinit function. Only store the instance pointer when the initialization was successful, to solve this issue. Hardware name: Acer Tomato (rev3 - 4) board (DT) pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : vcodec_vpu_send_msg+0x4c/0x190 [mtk_vcodec_dec] lr : vcodec_send_ap_ipi+0x78/0x170 [mtk_vcodec_dec] sp : ffff80008750bc20 x29: ffff80008750bc20 x28: ffff1299f6d70000 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 x23: ffff80008750bc98 x22: 000000000000a003 x21: ffffd45c4cfae000 x20: 0000000000000010 x19: ffff1299fd668310 x18: 000000000000001a x17: 000000040044ffff x16: ffffd45cb15dc648 x15: 0000000000000000 x14: ffff1299c08da1c0 x13: ffffd45cb1f87a10 x12: ffffd45cb2f5fe80 x11: 0000000000000001 x10: 0000000000001b30 x9 : ffffd45c4d12b488 x8 : 1fffe25339380d81 x7 : 0000000000000001 x6 : ffff1299c9c06c00 x5 : 0000000000000132 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000010 x1 : ffff80008750bc98 x0 : 0000000000000000 Call trace: vcodec_vpu_send_msg+0x4c/0x190 [mtk_vcodec_dec] vcodec_send_ap_ipi+0x78/0x170 [mtk_vcodec_dec] vpu_dec_deinit+0x1c/0x30 [mtk_vcodec_dec] vdec_hevc_slice_deinit+0x30/0x98 [mtk_vcodec_dec] vdec_if_deinit+0x38/0x68 [mtk_vcodec_dec] mtk_vcodec_dec_release+0x20/0x40 [mtk_vcodec_dec] fops_vcodec_release+0x64/0x118 [mtk_vcodec_dec] v4l2_release+0x7c/0x100 __fput+0x80/0x2d8 __fput_sync+0x58/0x70 __arm64_sys_close+0x40/0x90 invoke_syscall+0x50/0x128 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x38/0xd8 el0t_64_sync_handler+0xc0/0xc8 el0t_64_sync+0x1a8/0x1b0 Code: d503201f f9401660 b900127f b900227f (f9400400)
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.8.6
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 5% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2024-35921 scores 7.8 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.7
Until: 6.8.6
Fixed in: 6.8.6
How to fix this CVE
Update your Linux kernel to version 6.8.6 or later to patch this use-after-free vulnerability in the MediaTek HEVC video decoder. The vulnerability occurs when HEVC decoder initialization fails but the instance pointer is still stored, leading to a kernel crash during cleanup. Systems running kernel versions 6.7 through 6.8.5 on MediaTek platforms should prioritize this update immediately.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your installed kernel version with `uname -r` and compare against the affected range (6.7.x to 6.8.5)
- Step 2: Verify if MediaTek video codec drivers are loaded: `lsmod | grep mtk_vcodec`
- Step 3: Search system logs for HEVC decoder initialization failures: `grep -i 'hevc\|vcodec\|mtk_vcodec' /var/log/kern.log /var/log/messages | grep -i 'fail\|error'`
- Step 4: Confirm the patch is applied by verifying kernel version is 6.8.6 or later: `uname -r` should show 6.8.6+ or newer stable release
FAQ
What is CVE-2024-35921?
CVE-2024-35921 is a use-after-free vulnerability in the Linux kernel's MediaTek HEVC video decoder. When hardware-accelerated HEVC video decoding fails during initialization on ARM-based MediaTek platforms, the kernel attempts to access memory that has already been freed, causing a kernel panic.
Is CVE-2024-35921 being actively exploited?
No, CVE-2024-35921 is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available. However, the vulnerability can be triggered by any user with local access to video decoding resources.
What versions of Kernel are affected by CVE-2024-35921?
Linux kernel versions 6.7 through 6.8.5 are vulnerable. The fix is included in kernel 6.8.6 and later stable releases.
How do I check if my server is vulnerable to CVE-2024-35921?
Run `uname -r` to check your kernel version. If it shows 6.7.x or 6.8.0 through 6.8.5, your system is vulnerable. Then verify if MediaTek codecs are present with `lsmod | grep mtk_vcodec`.
Does Defensia detect CVE-2024-35921?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-35921 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/521ce0ea7418298d754494fe53263c23c4c78a8e
- https://git.kernel.org/stable/c/97c75ee5de060d271d80109b0c47cb6008439e5b
- https://git.kernel.org/stable/c/ec25fc3c2c1e8958a51abcfed614f81446d918c4
- https://git.kernel.org/stable/c/521ce0ea7418298d754494fe53263c23c4c78a8e
- https://git.kernel.org/stable/c/97c75ee5de060d271d80109b0c47cb6008439e5b
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-35921. Free for 1 server.
Get started free