Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795100330; b=pPeMgHxYzxx7CWrOLxgOxdcE4YDZxUFOjwJAd30mucWL/ivLVWe75c0RqX9cb9o2RtrC QPy8GbtIUqrHro7BGW/hMQoJqjN71x+9ub6+h6DSLVKh2brOenjlFgiMtci0cSOuDwVWe cZ6v+gv1Xf+TIjTt20MBOlJ1hw1BXBooKQgT32M40V/6dWqxBbFzc7w8YEfTyGs8WhDKC Epe9UCkCVr5eReauz8H8U4CD+4cindNZ04iLd3/Txai/Mnbunj45FrMWVbM2nB1x/1y4h UEIzyltMLCyVSPbtNuJmBiuAPWcdxqkOHZCX/iiM8F9IXuTBuISObY40wWUTHCHmCag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795100330; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=aXvFdFck0vMpyuX+JuKZsU7TqZqmjOnkDojkRdi4AfY=; b=ftGeWbEr2oHU75/dTSAEVaBBATyTgXGjfirb6MErZ3m7Vera1yFqI2BfGIbsTRYdcNH7 8dcQDc9UEv7kFSbRG1M2qItSf5hLpxMCaaJqGMIJV5PRF8+zE6l+i1fOIf5gEpf2FqXpG m9tnNQxEUVKkN3XjCxg1PzkrhNWUZIbmj5K8B3a+xBDwtk0H82rES7bIZPG4PHXpXrdZW uph9anRX7LMDrNPBrXhnIh6kbMTZ1HRc7PRrOq+KBH7W8SwGleENfCTbwV72r2+qJPYjM ktHf5xrHgjMg6bIpYzyjQuOPkQioVFOkdEqNQW+Ag3gBTcD9EeW1zw9TaaGWdTsjXLw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=jQK+9SWR; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A2F4606A325 for ; Thu, 19 Nov 2026 14:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=jQK+9SWR Received: by smtp.kernel.org (Postfix) with ESMTPSA id F28461F000C4; Thu, 19 Nov 2026 14:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795100330; bh=aXvFdFck0vMpyuX+JuKZsU7TqZqmjOnkDojkRdi4AfY=; h=From:To:Cc:Subject:Date:Reply-To; b=jQK+9SWRTi+zc2H+O4PD3Uw6HfOGPlGBq0j494BaVzqRevV160MpFoJleoAmztj7D 2Ghih3KF/T2jJj5kelJz49vZQD7Zq97sUHkmrNCE1nw3oq1k4GDCWTCrTx2Bf6gBjH CgXuiGm7nnXeUwNWwdeozuNfSJTsjYPvUg1EMKT8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99468: media: imx-jpeg: cancel timeout worker when streaming stops Date: Thu, 19 Nov 2026 15:26:06 +0100 Message-ID: <2026111910-CVE-2026-99468-3545@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4610; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fmSw/Py2DgzD+94oRvAuhjeC1MJZbDiIWhkn6PsUGs4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2br6z0x7y+EU9Ds5fOW+P3d7re30ZsvGFjG8LX58U //vKZvejlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIfDHDXOGyld8ncMhEKos0 6+zRWhynufjkJ4b5iTem3z66d/aGZZNaIg54ZEd1l/SEAgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: media: imx-jpeg: cancel timeout worker when streaming stops Each per-fd context ctx owns a delayed_work (ctx->task_timer, callback mxc_jpeg_device_run_timeout) armed via schedule_delayed_work() at the end of mxc_jpeg_device_run() to recover a stalled encode/decode job. The only existing cancellation is cancel_delayed_work() in the frame-done IRQ handler, which de-queues a pending work item but does not wait for a callback that has already started, and it only runs when a frame completes. When the fd is closed while a job is in flight (the frame-done IRQ has not fired yet), nothing syncs the worker before mxc_jpeg_release() frees ctx with kfree() after v4l2_m2m_ctx_release(). A queued or executing mxc_jpeg_device_run_timeout() can then recover ctx through container_of(&ctx->task_timer) and dereference it (ctx->mxc_jpeg, slot_data, dev_warn) after ctx has been freed. Cancel the worker from mxc_jpeg_stop_streaming(). The cancel cannot live in mxc_jpeg_release(): mxc_jpeg_device_run() arms the timer while holding only hw_lock, not the mxc_jpeg->lock mutex that release holds, so a cancel in release could still race a concurrent mxc_jpeg_device_run() that re-arms the timer afterwards. mxc_jpeg_stop_streaming() instead runs inside v4l2_m2m_ctx_release() -> vb2_queue_release(), i.e. after v4l2_m2m_cancel_job() has set TRANS_ABORT and waited for any in-flight job to finish (so __v4l2_m2m_try_queue() will not queue and v4l2_m2m_try_run() will not run any further job for this context, which prevents mxc_jpeg_device_run() from re-arming the timer) and before the m2m context is freed. cancel_delayed_work_sync() removes a pending work item and waits for a running callback, so the worker can no longer race with the subsequent kfree(). The cancel is placed before the buffer-release loop so a concurrently running timeout callback cannot race with it over the same buffers. If the frame-done IRQ canceled a still-pending timer, this cancel is a no-op; if the timeout callback has already started, it waits for the callback to finish. The same mxc_jpeg_stop_streaming() call is also reached from VIDIOC_STREAMOFF, which drains the worker early, although STREAMOFF itself does not free ctx -- the use-after-free arises only when the fd is later closed. This bug was found by static analysis. The Linux kernel CVE team has assigned CVE-2026-99468 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit cfed9632ca8e8bdf0128745ae2400b72c4292886 and fixed in 6.12.117 with commit 77e1c41d65a9f3cd22d73d0ec1f33cf6cd37b341 Issue introduced in 6.2 with commit cfed9632ca8e8bdf0128745ae2400b72c4292886 and fixed in 6.18.61 with commit 49a0623994a10d3d333d48c304f89d816495f332 Issue introduced in 6.2 with commit cfed9632ca8e8bdf0128745ae2400b72c4292886 and fixed in 7.3.2 with commit 9e393784a902bb4eb00a21e46d389a32c7ea61b0 Issue introduced in 6.2 with commit cfed9632ca8e8bdf0128745ae2400b72c4292886 and fixed in 7.4-rc1 with commit 78fdfbf117c409273eecbfa7a528ef42358a0e38 Issue introduced in 6.1.143 with commit 1f3367fa4210f37417cd55622b3872ababd2f06d Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-99468 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/77e1c41d65a9f3cd22d73d0ec1f33cf6cd37b341 https://git.kernel.org/stable/c/49a0623994a10d3d333d48c304f89d816495f332 https://git.kernel.org/stable/c/9e393784a902bb4eb00a21e46d389a32c7ea61b0 https://git.kernel.org/stable/c/78fdfbf117c409273eecbfa7a528ef42358a0e38