CVE-2024-35921

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-35921
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-35921.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-35921
Downstream
Related
Published
2024-05-19T10:10:33Z
Modified
2025-10-09T08:53:07.102792Z
Summary
media: mediatek: vcodec: Fix oops when HEVC init fails
Details

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)

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2674486aac7d9c95ceb77daf7c30f862d4295c1c
Fixed
ec25fc3c2c1e8958a51abcfed614f81446d918c4
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2674486aac7d9c95ceb77daf7c30f862d4295c1c
Fixed
521ce0ea7418298d754494fe53263c23c4c78a8e
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2674486aac7d9c95ceb77daf7c30f862d4295c1c
Fixed
97c75ee5de060d271d80109b0c47cb6008439e5b

Affected versions

v6.*

v6.4
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.3
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.8.1
v6.8.2
v6.8.3
v6.8.4
v6.8.5
v6.9-rc1

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.5.0
Fixed
6.6.27
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.8.6