{"id":"CVE-2023-54103","summary":"media: mtk-jpeg: Fix use after free bug due to uncanceled work","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: mtk-jpeg: Fix use after free bug due to uncanceled work\n\nIn mtk_jpeg_probe, &jpeg-\u003ejob_timeout_work is bound with\nmtk_jpeg_job_timeout_work. Then mtk_jpeg_dec_device_run\nand mtk_jpeg_enc_device_run may be called to start the\nwork.\nIf we remove the module which will call mtk_jpeg_remove\nto make cleanup, there may be a unfinished work. The\npossible sequence is as follows, which will cause a\ntypical UAF bug.\n\nFix it by canceling the work before cleanup in the mtk_jpeg_remove\n\nCPU0                  CPU1\n\n                    |mtk_jpeg_job_timeout_work\nmtk_jpeg_remove     |\n  v4l2_m2m_release  |\n    kfree(m2m_dev); |\n                    |\n                    | v4l2_m2m_get_curr_priv\n                    |   m2m_dev-\u003ecurr_ctx //use","modified":"2026-04-10T05:07:04.074076Z","published":"2025-12-24T13:06:28.654Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54103.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2fc20f8bcc2b4d31c808a5320506c31aa2cf3834"},{"type":"WEB","url":"https://git.kernel.org/stable/c/715c0200b4809396998e562ce5cd0284e7314cc1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8977d9924843823f46696d7d9432ea4b2499ed14"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c677d7ae83141d390d1253abebafa49c962afb52"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d346a2ef6b1ebb77d740890cfaf8478c5b286380"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d56dbfe750a8f96789cc86a911864f663e63bc5d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54103.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-54103"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b2f0d2724ba477d326e9d654d4db1c93e98f8b93"},{"fixed":"d346a2ef6b1ebb77d740890cfaf8478c5b286380"},{"fixed":"d56dbfe750a8f96789cc86a911864f663e63bc5d"},{"fixed":"715c0200b4809396998e562ce5cd0284e7314cc1"},{"fixed":"8977d9924843823f46696d7d9432ea4b2499ed14"},{"fixed":"2fc20f8bcc2b4d31c808a5320506c31aa2cf3834"},{"fixed":"c677d7ae83141d390d1253abebafa49c962afb52"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54103.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.12.0"},{"fixed":"5.10.199"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.136"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.53"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.4.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.5.0"},{"fixed":"6.5.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54103.json"}}],"schema_version":"1.7.5"}