CVE-2026-46011

media: mtk-jpeg: fix use-after-free in release path due to uncancelled work

7.8 high EPSS 0.12%

Published 27 May 2026 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2026-46011

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-46011 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

media: mtk-jpeg: fix use-after-free in release path due to uncancelled work

The mtk_jpeg_release() function frees the context structure (ctx) without first cancelling any pending or running work in ctx->jpeg_work. This creates a race window where the workqueue callback may still be accessing the context memory after it has been freed.

Race condition:

CPU 0 (release) CPU 1 (workqueue) ---------------- ------------------ close() mtk_jpeg_release() mtk_jpegenc_worker() ctx = work->data // accessing ctx

kfree(ctx) // freed! access ctx // UAF!

The work is queued via queue_work() during JPEG encode/decode operations (via mtk_jpeg_device_run). If the device is closed while work is pending or running, the work handler will access freed memory.

Fix this by calling cancel_work_sync() BEFORE acquiring the mutex. This ordering is critical: if cancel_work_sync() is called after mutex_lock(), and the work handler also tries to acquire the same mutex, it would cause a deadlock.

Note: The open error path does NOT need cancel_work_sync() because INIT_WORK() only initializes the work structure - it does not schedule it. Work is only scheduled later during ioctl operations.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.12%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 2.38% of all scored CVEs. Scores of 2 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 5fb1c2361e5630491d2a2f9359654eb022601bc0, before 2209fdae5c2f615930c9af1379c1cfca199ec5d8
affected from 5fb1c2361e5630491d2a2f9359654eb022601bc0, before 0498b27a1542021d90269d58347501d4c3ccd84e
affected from 5fb1c2361e5630491d2a2f9359654eb022601bc0, before 26506a30e0e26d612f82a7bf0e395626968a44e6
affected from 5fb1c2361e5630491d2a2f9359654eb022601bc0, before e78c39f720679fcf3a2eacd82725ec3ea2648301
affected from 5fb1c2361e5630491d2a2f9359654eb022601bc0, before 34c519feef3e4fcff1078dc8bdb25fbbbd10303f
Other versions: unaffected
Linux
affected 6.2
unaffected before 6.2
unaffected from 6.6.140 up to and including 6.6.*
unaffected from 6.12.86 up to and including 6.12.*
unaffected from 6.18.27 up to and including 6.18.*
unaffected from 7.0.4 up to and including 7.0.*
unaffected 7.1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-46011 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-46011

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-46011
trivy image --scanners vuln IMAGE | grep CVE-2026-46011

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-46011 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.