{"id":"CVE-2025-68324","published":"2025-12-18T15:02:49Z","modified":"2026-10-30T12:23:13Z","title":"scsi: imm: Fix use-after-free bug caused by unfinished delayed work","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: imm: Fix use-after-free bug caused by unfinished delayed work\n\nThe delayed work item 'imm_tq' is initialized in imm_attach() and\nscheduled via imm_queuecommand() for processing SCSI commands.  When the\nIMM parallel port SCSI host adapter is detached through imm_detach(),\nthe imm_struct device instance is deallocated.\n\nHowever, the delayed work might still be pending or executing\nwhen imm_detach() is called, leading to use-after-free bugs\nwhen the work function imm_interrupt() accesses the already\nfreed imm_struct memory.\n\nThe race condition can occur as follows:\n\nCPU 0(detach thread)   | CPU 1\n                       | imm_queuecommand()\n                       |   imm_queuecommand_lck()\nimm_detach()           |     schedule_delayed_work()\n  kfree(dev) //FREE    | imm_interrupt()\n                       |   dev = container_of(...) //USE\n                           dev-> //USE\n\nAdd disable_delayed_work_sync() in imm_detach() to guarantee proper\ncancellation of the delayed work item before imm_struct is deallocated.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00244,"percentile":0.15778,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/cfd561e8df5f46fc1c9d54885165a60e63831c14","tags":[]},{"url":"https://git.kernel.org/stable/c/9a8e53154353580d53f7f86a253927e41294017e","tags":[]},{"url":"https://git.kernel.org/stable/c/31ab2aad7a7b7501e904a09bf361e44671f66092","tags":[]},{"url":"https://git.kernel.org/stable/c/48dd41fa2d6c6a0c50e714deeba06ffe7f91961b","tags":[]},{"url":"https://git.kernel.org/stable/c/9e434426cc23ad5e2aad649327b59aea00294b13","tags":[]},{"url":"https://git.kernel.org/stable/c/ab58153ec64fa3fc9aea09ca09dc9322e0b54a7c","tags":[]}],"priority":{"score":3.2,"factors":[{"name":"EPSS percentile","points":3.16}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < cfd561e8df5f46fc1c9d54885165a60e63831c14",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 9a8e53154353580d53f7f86a253927e41294017e",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 31ab2aad7a7b7501e904a09bf361e44671f66092",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 48dd41fa2d6c6a0c50e714deeba06ffe7f91961b",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 9e434426cc23ad5e2aad649327b59aea00294b13",">= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < ab58153ec64fa3fc9aea09ca09dc9322e0b54a7c"]},{"vendor":"Linux","product":"Linux","versions":["2.6.12"]}],"euvd":{"id":"EUVD-2025-204268","exploited":false,"provenance":"source"}}