{"id":"CVE-2025-68324","aliases":["CVE-2025-68324"],"related":[],"kind":"vulnerability","state":"published","title":"scsi: imm: Fix use-after-free bug caused by unfinished delayed work","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nscsi: imm: Corrección de error de uso después de liberación causado por trabajo retrasado sin finalizar\n\nEl elemento de trabajo retrasado 'imm_tq' se inicializa en imm_attach() y se programa a través de imm_queuecommand() para procesar comandos SCSI. Cuando el adaptador de host SCSI de puerto paralelo IMM se desvincula mediante imm_detach(), la instancia del dispositivo imm_struct se desasigna.\n\nSin embargo, el trabajo retrasado podría seguir pendiente o ejecutándose cuando se llama a imm_detach(), lo que lleva a errores de uso después de liberación cuando la función de trabajo imm_interrupt() accede a la memoria imm_struct ya liberada.\n\nLa condición de carrera puede ocurrir de la siguiente manera:\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\nAñadir disable_delayed_work_sync() en imm_detach() para garantizar la cancelación adecuada del elemento de trabajo retrasado antes de que imm_struct sea desasignado.","source":"nvd"}],"published":"2025-12-18T15:02:49.230Z","modified":"2026-10-30T13:18:20.967Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"cfd561e8df5f46fc1c9d54885165a60e63831c14","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"9a8e53154353580d53f7f86a253927e41294017e","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"31ab2aad7a7b7501e904a09bf361e44671f66092","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"48dd41fa2d6c6a0c50e714deeba06ffe7f91961b","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"9e434426cc23ad5e2aad649327b59aea00294b13","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"ab58153ec64fa3fc9aea09ca09dc9322e0b54a7c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.12","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.63","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.13","lastAffected":"6.17.*","status":"unaffected"},{"type":"semver","introduced":"6.18.2","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/cfd561e8df5f46fc1c9d54885165a60e63831c14","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9a8e53154353580d53f7f86a253927e41294017e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/31ab2aad7a7b7501e904a09bf361e44671f66092","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/48dd41fa2d6c6a0c50e714deeba06ffe7f91961b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9e434426cc23ad5e2aad649327b59aea00294b13","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ab58153ec64fa3fc9aea09ca09dc9322e0b54a7c","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68324","url":"https://www.cve.org/CVERecord?id=CVE-2025-68324","licence":"CVE Terms of Use","modified":"2026-10-30T12:23:13.712Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68324","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68324","licence":"Public domain","modified":"2026-10-30T13:18:20.967Z"}],"updatedAt":"2026-11-25T22:59:09.693Z","epss":{"score":0.00244,"percentile":0.16749,"date":"2026-12-01T12:00:22.000Z"}}