CVE-2026-139066

media: imx-jpeg: finish the job on device_run() error paths

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

media: imx-jpeg: finish the job on device_run() error paths

mxc_jpeg_device_run() returns early through a shared "end" label on several
error paths (no free slot, mxc_jpeg_alloc_slot_data() failure, or missing
buffers or queue data), and none of them calls v4l2_m2m_job_finish().
Since the delayed work is queued only after the hardware is started, those
paths neither finish the job directly nor queue timeout work that could
finish it later. The job is left with TRANS_RUNNING set, so the
wait_event() in v4l2_m2m_cancel_job() (reached from v4l2_m2m_ctx_release()
at close) waits indefinitely and the close hangs.

mxc_jpeg_alloc_slot_data() uses dma_alloc_coherent(), so the failure path
is reachable under memory pressure.

Return the src/dst buffers with VB2_BUF_STATE_ERROR and call
v4l2_m2m_job_finish() on those paths: paths that have buffers use a
"buf_finish" label; the no-buffer path uses "job_finish" directly. This
mirrors the existing jpeg_parse_error path.

This bug was found by static analysis.

Analysis

AI-generated

Technical impact

The Linux kernel media driver for i.MX JPEG fails to complete a job when certain error conditions occur during device_run(). If no free slot is available, memory allocation for slot data fails, or required buffers are missing, the path exits early without calling v4l2_m2m_job_finish(). This leaves the job in a TRANS_RUNNING state. When the user later attempts to close the device, v4l2_m2m_cancel_job() waits indefinitely for the job to finish, causing the close operation to hang. The bug is uncovered by static analysis and can be triggered under memory pressure when dma_alloc_coherent() fails. While the flaw does not allow code execution, it can be abused to exhaust system resources or make a process unresponsive, effectively resulting in a denial of service.

Affected Systems

The issue resides in the Linux kernel media subsystem, specifically the imx-jpeg driver used on i.MX platforms. All distributions shipping a kernel containing this driver are affected until the patch is applied. The problem is limited to kernel versions that include the buggy implementation of mxc_jpeg_device_run(); the exact affected release line is not specified, so all kernels containing that code path are considered potentially impacted.

Risk and Exploitability

The vulnerability does not provide a remote attack surface and relies on interactions with the V4L2 JPEG device, which typically requires local privileges or user-space applications that open the device. The EPSS score is not available, so the exploitation probability is uncertain. The CVSS score is also missing, but the flaw can cause processes to hang indefinitely, presenting a local denial‑of‑service risk. The attack vector is inferred to be local or privileged through the V4L2 interface, and no official KEV listing is present.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel patch that implements the fix for the imx-jpeg driver.
  • If a patch cannot be applied immediately, reboot the system to release any stalled jobs before attempting further operations.
  • Monitor the system for prolonged close operations on V4L2 JPEG devices and consider terminating hung processes if they affect availability.

Generated by OpenCVE AI on November 30, 2026 at 18:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-399
CWE-754
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: media: imx-jpeg: finish the job on device_run() error paths mxc_jpeg_device_run() returns early through a shared "end" label on several error paths (no free slot, mxc_jpeg_alloc_slot_data() failure, or missing buffers or queue data), and none of them calls v4l2_m2m_job_finish(). Since the delayed work is queued only after the hardware is started, those paths neither finish the job directly nor queue timeout work that could finish it later. The job is left with TRANS_RUNNING set, so the wait_event() in v4l2_m2m_cancel_job() (reached from v4l2_m2m_ctx_release() at close) waits indefinitely and the close hangs. mxc_jpeg_alloc_slot_data() uses dma_alloc_coherent(), so the failure path is reachable under memory pressure. Return the src/dst buffers with VB2_BUF_STATE_ERROR and call v4l2_m2m_job_finish() on those paths: paths that have buffers use a "buf_finish" label; the no-buffer path uses "job_finish" directly. This mirrors the existing jpeg_parse_error path. This bug was found by static analysis.
Title media: imx-jpeg: finish the job on device_run() error paths
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-399
  • CWE-754

    Improper Check for Unusual or Exceptional Conditions

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:27 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM