Skip to contentSkip to conversation

CVE-2026-45997: scsi: sd: fix missing put_disk() when device_add(&disk_dev) fails

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

scsi: sd: fix missing put_disk() when device_add(&disk_dev) fails

If device_add(&sdkp->disk_dev) fails, put_device() runs scsi_disk_release(), which frees the scsi_disk but leaves the gendisk referenced. The device_add_disk() error path in sd_probe() calls put_disk(gd); call put_disk(gd) here to mirror that cleanup.

The Linux kernel CVE team has assigned CVE-2026-45997 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.15 with commit 265dfe8ebbabae7959060bd1c3f75c2473b697ed and fixed in 6.6.140 with commit 262152ec37101f9dc524743ccdbd6c7641d14573
	Issue introduced in 5.15 with commit 265dfe8ebbabae7959060bd1c3f75c2473b697ed and fixed in 6.12.86 with commit b64b4f499801b12d0e2785447e4df6c164c608a9
	Issue introduced in 5.15 with commit 265dfe8ebbabae7959060bd1c3f75c2473b697ed and fixed in 6.18.27 with commit 13e550fbfccdb311e76ec96892dfe35f0dba0657
	Issue introduced in 5.15 with commit 265dfe8ebbabae7959060bd1c3f75c2473b697ed and fixed in 7.0.4 with commit a95d38c5701431bfc826e7b18acc0785919d5c88
	Issue introduced in 5.15 with commit 265dfe8ebbabae7959060bd1c3f75c2473b697ed and fixed in 7.1-rc1 with commit 1e111c4b3a726df1254670a5cc4868cedb946d37
	Issue introduced in 4.4.288 with commit d56459d361a9a99bead8b594635353053271356c
	Issue introduced in 4.9.286 with commit a3e5a9208466b63f27a2509a691023b446ea5105
	Issue introduced in 4.14.250 with commit 4e8e6427319de323f613caa8fd37120df83138d0
	Issue introduced in 4.19.210 with commit eadb60bcc2005247d97dcb3becee57aba4024ff4
	Issue introduced in 5.4.152 with commit 350d048cc506368a316f0bc4082426b24a2a9fc0
	Issue introduced in 5.10.72 with commit 60df9f55562a57173a11b6c7011eee40dfa48157
	Issue introduced in 5.14.11 with commit e95f62013a1159eeea752bb52df0683ee77f70ca

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-45997

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/scsi/sd.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/262152ec37101f9dc524743ccdbd6c7641d14573
	https://git.kernel.org/stable/c/b64b4f499801b12d0e2785447e4df6c164c608a9
	https://git.kernel.org/stable/c/13e550fbfccdb311e76ec96892dfe35f0dba0657
	https://git.kernel.org/stable/c/a95d38c5701431bfc826e7b18acc0785919d5c88
	https://git.kernel.org/stable/c/1e111c4b3a726df1254670a5cc4868cedb946d37