CVE-2023-52491
published high CVSS 3.1 · 7.8media: mtk-jpeg: Fix use after free bug due to error path handling in mtk_jpeg_dec_device_run
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxb2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 43872f44eee6c6781fea1348b38885d8e78face9 · b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 1b1036c60a37a30caf6759a90fe5ecd06ec35590 · b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 9fec4db7fff54d9b0306a332bab31eac47eeb5f6 · b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 8254d54d00eb6cdb8367399c7f912eb8d354ecd7 · b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 6e2f37022f0fc0893da4d85a0500c9d547fffd4c · b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 206c857dd17d4d026de85866f1b5f0969f2a109e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux4.12 (affected) · 0 to < 4.12 (unaffected · semver) · 5.10.210 through 5.10.* (unaffected · semver) · 5.15.149 through 5.15.* (unaffected · semver) · 6.1.76 through 6.1.* (unaffected · semver) · 6.6.15 through 6.6.* (unaffected · semver) · 6.7.3 through 6.7.* (unaffected · semver) · 6.8 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Debian | bullseye | linux | Advisory build | 5.10.216-1 | DSA-5681-1 |
| Ubuntu | focal | linux-aws-5.15 | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Debian | buster | linux-5.10 | Advisory build | 5.10.216-1~deb10u1 | DLA-3842-1 |
| Ubuntu | focal | linux-aws-5.15-cloud-tools-5.15.0-1061 | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Ubuntu | focal | linux-aws-5.15-headers-5.15.0-1061 | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Ubuntu | focal | linux-aws-5.15-tools-5.15.0-1061 | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Ubuntu | focal | linux-azure-5.15 | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-azure-5.15-cloud-tools-5.15.0-1063 | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-azure-5.15-headers-5.15.0-1063 | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-azure-5.15-tools-5.15.0-1063 | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-azure-fde-5.15 | Advisory build | 5.15.0-1063.72~20.04.1.1 | USN-6766-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1044-gkeop | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1054-ibm | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1058-intel-iotg | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1059-gcp | Advisory build | 5.15.0-1059.67~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1059-oracle | Advisory build | 5.15.0-1059.65~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-106-generic | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-buildinfo-5.15.0-106-generic-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-buildinfo-5.15.0-106-generic-lpae | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-buildinfo-5.15.0-106-lowlatency | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-106-lowlatency-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1061-aws | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1063-azure | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1044-gkeop | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1058-intel-iotg | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-106-generic | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-106-lowlatency | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1061-aws | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1063-azure | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-gcp-5.15 | Advisory build | 5.15.0-1059.67~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-gcp-5.15-headers-5.15.0-1059 | Advisory build | 5.15.0-1059.67~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-gcp-5.15-tools-5.15.0-1059 | Advisory build | 5.15.0-1059.67~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-gkeop-5.15 | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-gkeop-5.15-cloud-tools-5.15.0-1044 | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-gkeop-5.15-headers-5.15.0-1044 | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-gkeop-5.15-tools-5.15.0-1044 | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-headers-5.15.0-1044-gkeop | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-headers-5.15.0-1054-ibm | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-headers-5.15.0-1058-intel-iotg | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-headers-5.15.0-1059-gcp | Advisory build | 5.15.0-1059.67~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-headers-5.15.0-1059-oracle | Advisory build | 5.15.0-1059.65~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-headers-5.15.0-106-generic | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-headers-5.15.0-106-generic-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-headers-5.15.0-106-generic-lpae | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-headers-5.15.0-106-lowlatency | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-headers-5.15.0-106-lowlatency-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-headers-5.15.0-1061-aws | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Ubuntu | focal | linux-headers-5.15.0-1063-azure | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-hwe-5.15 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-hwe-5.15-cloud-tools-5.15.0-106 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-hwe-5.15-cloud-tools-common | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-hwe-5.15-headers-5.15.0-106 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-hwe-5.15-source-5.15.0 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-hwe-5.15-tools-5.15.0-106 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-hwe-5.15-tools-common | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-hwe-5.15-tools-host | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-ibm-5.15 | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-ibm-5.15-headers-5.15.0-1054 | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-ibm-5.15-source-5.15.0 | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-ibm-5.15-tools-5.15.0-1054 | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-5.15.0-106-generic | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-image-5.15.0-106-generic-lpae | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1044-gkeop | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1054-ibm | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1058-intel-iotg | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1059-gcp | Advisory build | 5.15.0-1059.67~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1059-oracle | Advisory build | 5.15.0-1059.65~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-106-generic | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-106-generic-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-106-lowlatency | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-106-lowlatency-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1061-aws | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1063-azure | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1063-azure-fde | Advisory build | 5.15.0-1063.72~20.04.1.1 | USN-6766-1 |
| Ubuntu | focal | linux-intel-iotg-5.15 | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-cloud-tools-5.15.0-1058 | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-cloud-tools-common | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-headers-5.15.0-1058 | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-tools-5.15.0-1058 | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-tools-common | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-tools-host | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-cloud-tools-5.15.0-106 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-cloud-tools-common | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-headers-5.15.0-106 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-tools-5.15.0-106 | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-tools-common | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-tools-host | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-modules-5.15.0-1044-gkeop | Advisory build | 5.15.0-1044.51~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-modules-5.15.0-1054-ibm | Advisory build | 5.15.0-1054.57~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-modules-5.15.0-1058-intel-iotg | Advisory build | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu | focal | linux-modules-5.15.0-1059-gcp | Advisory build | 5.15.0-1059.67~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-modules-5.15.0-1059-oracle | Advisory build | 5.15.0-1059.65~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-modules-5.15.0-106-generic | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-modules-5.15.0-106-generic-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-modules-5.15.0-106-generic-lpae | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-2 |
| Ubuntu | focal | linux-modules-5.15.0-106-lowlatency | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-modules-5.15.0-106-lowlatency-64k | Advisory build | 5.15.0-106.116~20.04.1 | USN-6766-1 |
| Ubuntu | focal | linux-modules-5.15.0-1061-aws | Advisory build | 5.15.0-1061.67~20.04.1 | USN-6766-3 |
| Ubuntu | focal | linux-modules-5.15.0-1063-azure | Advisory build | 5.15.0-1063.72~20.04.1 | USN-6766-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: media: mtk-jpeg: Fix use after free bug due to error path handling in mtk_jpeg_dec_device_run In mtk_jpeg_probe, &jpeg->job_timeout_work is bound with mtk_jpeg_job_timeout_work. In mtk_jpeg_dec_device_run, if error happens in mtk_jpeg_set_dec_dst, it will finally start the worker while mark the job as finished by invoking v4l2_m2m_job_finish. There are two methods to trigger the bug. If we remove the module, it which will call mtk_jpeg_remove to make cleanup. The possible sequence is as follows, which will cause a use-after-free bug. CPU0 CPU1 mtk_jpeg_dec_... | start worker | |mtk_jpeg_job_timeout_work mtk_jpeg_remove | v4l2_m2m_release | kfree(m2m_dev); | | | v4l2_m2m_get_curr_priv | m2m_dev->curr_ctx //use If we close the file descriptor, which will call mtk_jpeg_release, it will have a similar sequence. Fix this bug by starting timeout worker only if started jpegdec worker successfully. Then v4l2_m2m_job_finish will only be called in either mtk_jpeg_job_timeout_work or mtk_jpeg_dec_device_run.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The bug is reached via the Mediatek JPEG V4L2 m2m device node (/dev/videoN) through ordinary open/ioctl/STREAMON/qbuf and close() paths in mtk_jpeg_dec_device_run, requiring local process access rather than network or adjacent packet delivery. AC:L - An attacker can deterministically force the mtk_jpeg_set_dec_dst error path (plane/size mismatch under their control), which schedules the 1s job_timeout_work and then job_finish; they fully control the subsequent close or a second decode session that races the dangling timeout, so success does not depend on conditions outside their control. PR:L - mtk_jpeg_open has no capability checks; triggering the path only needs access to the JPEG codec video node at unprivileged video-group/media-process level, not real root or init-namespace admin rights. UI:N - The attacker performs the entire open, queue, intentional decode-error, and close/second-session sequence themselves; no victim mount, open, or other interactive action is required. S:U - The use-after-free corrupts host-kernel m2m/context/buffer state within a single kernel security authority and does not cross a VM, IOMMU, or sandbox boundary. C:H - The dangling timeout worker calls v4l2_m2m_get_curr_priv and operates on freed or wrong-context m2m/buffer objects after release or cross-session reuse, enabling reclaim-based arbitrary kernel memory disclosure as with other heap UAFs. I:H - The same worker path can double-finish jobs, reset HW, and manipulate freed or concurrently active buffer/context state, providing heap corruption and control-flow hijack primitives consistent with UAF guidance. A:H - Use-after-free or NULL dereference in mtk_jpeg_job_timeout_work reliably causes kernel oops/panic, so availability impact is High.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 43872f44eee6c6781fea1348b38885d8e78face9 (affected · git)b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 1b1036c60a37a30caf6759a90fe5ecd06ec35590 (affected · git)b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 9fec4db7fff54d9b0306a332bab31eac47eeb5f6 (affected · git)b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 8254d54d00eb6cdb8367399c7f912eb8d354ecd7 (affected · git)b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 6e2f37022f0fc0893da4d85a0500c9d547fffd4c (affected · git)b2f0d2724ba477d326e9d654d4db1c93e98f8b93 to < 206c857dd17d4d026de85866f1b5f0969f2a109e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 4.12 (affected)0 to < 4.12 (unaffected · semver)5.10.210 through 5.10.* (unaffected · semver)5.15.149 through 5.15.* (unaffected · semver)6.1.76 through 6.1.* (unaffected · semver)6.6.15 through 6.6.* (unaffected · semver)6.7.3 through 6.7.* (unaffected · semver)6.8 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
7- https://git.kernel.org/stable/c/1b1036c60a37a30caf6759a90fe5ecd06ec35590
- https://git.kernel.org/stable/c/206c857dd17d4d026de85866f1b5f0969f2a109e
- https://git.kernel.org/stable/c/43872f44eee6c6781fea1348b38885d8e78face9
- https://git.kernel.org/stable/c/6e2f37022f0fc0893da4d85a0500c9d547fffd4c
- https://git.kernel.org/stable/c/8254d54d00eb6cdb8367399c7f912eb8d354ecd7
- https://git.kernel.org/stable/c/9fec4db7fff54d9b0306a332bab31eac47eeb5f6
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html
Provider assertions
3Linux · cna
media: mtk-jpeg: Fix use after free bug due to error path handling in mtk_jpeg_dec_device_run
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 1449986a8bace605f40d39a0faede4d2b7d661a6f5f9916ea09821e80a2b5683
- Ingested
- 23 Sep 2026, 08:14:33 UTC
- Source record
- Official CVE record