CVE-2024-35921: media: mediatek: vcodec: Fix oops when HEVC init fails

Published May 19, 2024
·
Updated

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 : vcodecvpusendmsg+0x4c/0x190 [mtkvcodecdec] lr : vcodecsendapipi+0x78/0x170 [mtkvcodecdec] 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: vcodecvpusendmsg+0x4c/0x190 [mtkvcodecdec] vcodecsendapipi+0x78/0x170 [mtkvcodecdec] vpudecdeinit+0x1c/0x30 [mtkvcodecdec] vdechevcslicedeinit+0x30/0x98 [mtkvcodecdec] vdecifdeinit+0x38/0x68 [mtkvcodecdec] mtkvcodecdecrelease+0x20/0x40 [mtkvcodecdec] fopsvcodecrelease+0x64/0x118 [mtkvcodecdec] v4l2release+0x7c/0x100 fput+0x80/0x2d8 fputsync+0x58/0x70 arm64sysclose+0x40/0x90 invokesyscall+0x50/0x128 el0svccommon.constprop.0+0x48/0xf0 doel0svc+0x24/0x38 el0svc+0x38/0xd8 el0t64synchandler+0xc0/0xc8 el0t64sync+0x1a8/0x1b0 Code: d503201f f9401660 b900127f b900227f (f9400400)

Affected Software

6 affected componentsFixes available
Linux Linux kernel>=6.5<6.6.27
Linux Linux kernel>=6.7<6.8.6
Linux Linux kernel=6.9-rc1
Linux Linux kernel=6.9-rc2
Linux Linux kernel=6.9-rc3
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1

Event History

May 19, 2024
CVE Published
via MITRE·10:10 AM
Data Sourced
via MITRE·10:10 AM
DescriptionSeverity
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 11, 2024
Data Sourced
via Launchpad·07:47 PM
Description
Jan 3, 2025
Data Sourced
via Ubuntu·08:25 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-35921?

CVE-2024-35921 has been classified as a medium severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-35921?

To fix CVE-2024-35921, update your Linux kernel to the latest stable version or the specified remedial packages.

3

What versions of the Linux kernel are affected by CVE-2024-35921?

CVE-2024-35921 affects Linux kernel versions from 6.5 to 6.6.27 and versions in 6.7 up to 6.8.6, as well as specific release candidates 6.9-rc1, 6.9-rc2, and 6.9-rc3.

4

Is CVE-2024-35921 a remote exploit?

CVE-2024-35921 is not classified as a remote exploit and would require local access to trigger the vulnerability.

5

What components of the Linux kernel does CVE-2024-35921 impact?

CVE-2024-35921 impacts the MediaTek vcodec component of the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203