scsi: sd: fix missing put_disk() when device_add(&disk_dev) fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 265dfe8ebbabae7959060bd1c3f75c2473b697ed · < 1e111c4b3a726df1254670a5cc4868cedb946d37| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s SCSI sd driver can leave a gendisk referenced when device_add() fails during device setup. The input does not describe an attacker action or specify whether network access, authentication, or user interaction is required.
Teams running the Linux kernel should check their affected versions; no version range is provided.