CVE-2025-68324: scsi: imm: Fix use-after-free bug caused by unfinished delayed work
In the Linux kernel, the following vulnerability has been resolved:
scsi: imm: Fix use-after-free bug caused by unfinished delayed work
The delayed work item 'immtq' is initialized in immattach() and scheduled via immqueuecommand() for processing SCSI commands. When the IMM parallel port SCSI host adapter is detached through immdetach(), the immstruct device instance is deallocated.
However, the delayed work might still be pending or executing when immdetach() is called, leading to use-after-free bugs when the work function imminterrupt() accesses the already freed immstruct memory.
The race condition can occur as follows:
CPU 0(detach thread) | CPU 1 | immqueuecommand() | immqueuecommandlck() immdetach() | scheduledelayedwork() kfree(dev) //FREE | imminterrupt() | dev = containerof(...) //USE dev-> //USE
Add disabledelayedworksync() in immdetach() to guarantee proper cancellation of the delayed work item before immstruct is deallocated.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.63-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.17.13-1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.17.13 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
ubuntu/linux-aws-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1009.9~24.04.2 - Upgrade
Upgrade
ubuntu/linux-azure-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1010.10~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1009.9~24.04.3 - Upgrade
Upgrade
ubuntu/linux-hwe-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-19.19~24.04.2 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1018.18 - Upgrade
Upgrade
ubuntu/linux-oem-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracle-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1009.9~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-19.19.1~24.04.1 - Upgrade
Upgrade
ubuntu/linux-realtime-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1008.9~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.17.0-19.19 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.17.0-1009.9 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 6.17.0-1010.10 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.17.0-1009.9 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 6.17.0-1009.9 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 6.17.0-1010.10 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 6.17.0-1008.9 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 6.17.0-19.19.1 - Compensating control
Add disable_delayed_work_sync() in imm_detach() to cancel the imm_tq delayed work item before imm_struct is deallocated.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68324?
CVE-2025-68324 has been classified with a medium severity level due to its potential exploitation risks.
How do I fix CVE-2025-68324?
To address CVE-2025-68324, users should update the Linux Kernel to the latest patched version.
What components are affected by CVE-2025-68324?
CVE-2025-68324 specifically affects the SCSI subsystem in the Linux Kernel.
What is the impact of CVE-2025-68324?
The impact of CVE-2025-68324 includes the possibility of a use-after-free vulnerability that can lead to system instability or potential code execution.
When was CVE-2025-68324 resolved?
CVE-2025-68324 was resolved in a recent update to the Linux Kernel addressing the associated bug.