scsi: sd_zbc: Reject disks with too many zones
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: sd_zbc: Reject disks with too many zones
sd_zbc_read_zones() computes the number of zones with 64-bit arithmetic and stores the result in the unsigned int nr_zones field of struct zoned_disk_info, silently truncating counts that exceed 32 bits. The truncated count is later used to size per-zone resources, while the device may still report more zones than fit.
Moreover, sd_zbc_report_zones() counts the reported zones with a signed int zone_idx, which overflows past INT_MAX. Reject devices reporting more than INT_MAX zones at scan time; such a device is not realistic for any medium that exists today, and accepting it produces inconsistent zone bookkeeping.
From the CVE record · Linux
The Linux kernel’s sd_zbc code can truncate a disk’s zone count and overflow a zone index. A device reporting more than INT_MAX zones can trigger inconsistent zone bookkeeping when the kernel scans it; the input does not describe a network attack or authentication requirement.
Engineers running Linux kernels that scan zoned SCSI disks should check their kernel version; affected versions were not provided.