CVE-2026-143386: scsi: core: Balance the pseudo target reap reference
In the Linux kernel, the following vulnerability has been resolved:
scsi: core: Balance the pseudo target reap reference
With memory allocation profiling enabled, unloading scsidebug reports allocations left at module unload. A stock Linux 7.2.11 VM without OpenZFS emitted the following on each of three load/unload cycles:
[ 1.644665] drivers/scsi/scsidebug.c:8863 module scsidebug func:sdebugaddhosthelper has 1024 allocated at module unload [ 1.656260] drivers/scsi/scsidebug.c:1261 module scsidebug func:sdebugtargetalloc has 16 allocated at module unload
scsialloctarget() supplies a reap reference for its caller. The SCSI device initializer takes another reference, which device removal drops. scsigetpseudosdev() drops its caller reference only when device allocation fails. On success the target cannot be destroyed, retaining its driver-private data and its parent host and adapter.
Drop the caller reference in the common cleanup path, as the other scsialloctarget() callers do.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
What systems are affected in practice?
The issue is demonstrated when the scsi_debug kernel module is loaded and unloaded with memory allocation profiling enabled. The described behavior leaves allocations associated with scsi_debug, its target, and its parent host and adapter at module unload.
What is required to trigger the issue?
The reported trigger is a successful scsi_debug initialization followed by module removal. The reference leak occurs on the successful device-allocation path; the allocation-failure path already drops the caller reference.
How can I tell whether a system is affected?
With memory allocation profiling enabled, unload scsi_debug and check for allocation-at-module-unload reports. The example reports remaining allocations from sdebug_add_host_helper and sdebug_target_alloc.
What can be done if the fix cannot be applied immediately?
Avoid repeated loading and unloading of the scsi_debug module, particularly on systems using memory allocation profiling. The provided information identifies the leak during module unload rather than during normal operation.