CVE-2026-138907

media: mediatek: jpeg: Avoid context access after job finish

Published Nov 30, 2026 CVSS 3.1 · 4.7 Medium EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

media: mediatek: jpeg: Avoid context access after job finish

v4l2_m2m_job_finish() publishes job completion and wakes waiters
before it returns. A concurrent file release can therefore finish
v4l2_m2m_ctx_release() and free the context while the single-core IRQ
handler continues with its tail.

Both handlers only need the device for the matching runtime PM put.
Use the IRQ-owned jpeg pointer instead of dereferencing ctx after
completion has been published. This preserves the get/put pairing and
removes the post-completion context access.

Analysis

AI-generated

Technical impact

During job completion the MediaTek JPEG driver publishes a completion event before the context is freed. A concurrent file release can then free the context while the IRQ handler continues, leading to a use‑after‑free. This can corrupt kernel memory and cause a crash, potentially exposing a denial of service, or if the attacker can control the freed memory area, data leakage or privilege escalation.

Affected Systems

This defect exists in the Linux kernel’s MediaTek JPEG driver module, affecting all kernel releases that include this code. No specific version range is supplied, so any deployment of the driver may be susceptible.

Risk and Exploitability

The CVSS score is not provided and EPSS is unavailable, so the exact likelihood is unknown. The bug requires a race condition between job completion and context release, which may be difficult to trigger reliably, reducing exploit probability. Nevertheless, since it can cause a kernel panic, the potential impact is high and the flaw is considered severe. It is not listed in CISA’s KEV catalog, but the lack of classification does not lower the urgency.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the kernel to a version that contains the patch for the MediaTek JPEG driver.
  • If an update cannot be applied immediately, disable or unload the MediaTek JPEG driver or block access to the corresponding video device nodes until a fix is available.
  • Enhance host security by enabling kernel options that mitigate race conditions, such as CONFIG_KERN_SANITIZE or similar, and monitor for abnormal process activity involving media device access.

Generated by OpenCVE AI on November 30, 2026 at 17:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: media: mediatek: jpeg: Avoid context access after job finish v4l2_m2m_job_finish() publishes job completion and wakes waiters before it returns. A concurrent file release can therefore finish v4l2_m2m_ctx_release() and free the context while the single-core IRQ handler continues with its tail. Both handlers only need the device for the matching runtime PM put. Use the IRQ-owned jpeg pointer instead of dereferencing ctx after completion has been published. This preserves the get/put pairing and removes the post-completion context access.
Title media: mediatek: jpeg: Avoid context access after job finish
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:26 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:26 PM