{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46011","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-05-13T15:03:33.092Z","datePublished":"2026-05-27T12:56:13.198Z","dateUpdated":"2026-06-14T17:47:51.841Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-06-14T17:47:51.841Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: mtk-jpeg: fix use-after-free in release path due to uncancelled work\n\nThe mtk_jpeg_release() function frees the context structure (ctx) without\nfirst cancelling any pending or running work in ctx->jpeg_work. This\ncreates a race window where the workqueue callback may still be accessing\nthe context memory after it has been freed.\n\nRace condition:\n\n    CPU 0 (release)                    CPU 1 (workqueue)\n    ----------------                   ------------------\n    close()\n      mtk_jpeg_release()\n                                       mtk_jpegenc_worker()\n                                         ctx = work->data\n                                         // accessing ctx\n\n        kfree(ctx)  // freed!\n                                         access ctx  // UAF!\n\nThe work is queued via queue_work() during JPEG encode/decode operations\n(via mtk_jpeg_device_run). If the device is closed while work is pending\nor running, the work handler will access freed memory.\n\nFix this by calling cancel_work_sync() BEFORE acquiring the mutex. This\nordering is critical: if cancel_work_sync() is called after mutex_lock(),\nand the work handler also tries to acquire the same mutex, it would cause\na deadlock.\n\nNote: The open error path does NOT need cancel_work_sync() because\nINIT_WORK() only initializes the work structure - it does not schedule\nit. Work is only scheduled later during ioctl operations."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"}}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c"],"versions":[{"version":"5fb1c2361e5630491d2a2f9359654eb022601bc0","lessThan":"2209fdae5c2f615930c9af1379c1cfca199ec5d8","status":"affected","versionType":"git"},{"version":"5fb1c2361e5630491d2a2f9359654eb022601bc0","lessThan":"0498b27a1542021d90269d58347501d4c3ccd84e","status":"affected","versionType":"git"},{"version":"5fb1c2361e5630491d2a2f9359654eb022601bc0","lessThan":"26506a30e0e26d612f82a7bf0e395626968a44e6","status":"affected","versionType":"git"},{"version":"5fb1c2361e5630491d2a2f9359654eb022601bc0","lessThan":"e78c39f720679fcf3a2eacd82725ec3ea2648301","status":"affected","versionType":"git"},{"version":"5fb1c2361e5630491d2a2f9359654eb022601bc0","lessThan":"34c519feef3e4fcff1078dc8bdb25fbbbd10303f","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c"],"versions":[{"version":"6.2","status":"affected"},{"version":"0","lessThan":"6.2","status":"unaffected","versionType":"semver"},{"version":"6.6.140","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.86","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.27","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.0.4","lessThanOrEqual":"7.0.*","status":"unaffected","versionType":"semver"},{"version":"7.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.6.140"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.12.86"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.18.27"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"7.0.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"7.1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/2209fdae5c2f615930c9af1379c1cfca199ec5d8"},{"url":"https://git.kernel.org/stable/c/0498b27a1542021d90269d58347501d4c3ccd84e"},{"url":"https://git.kernel.org/stable/c/26506a30e0e26d612f82a7bf0e395626968a44e6"},{"url":"https://git.kernel.org/stable/c/e78c39f720679fcf3a2eacd82725ec3ea2648301"},{"url":"https://git.kernel.org/stable/c/34c519feef3e4fcff1078dc8bdb25fbbbd10303f"}],"title":"media: mtk-jpeg: fix use-after-free in release path due to uncancelled work","x_generator":{"engine":"bippy-1.2.0"}}}}