ata: libata-core: Reject an invalid concurrent positioning ranges count
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fe22e1c2f705676a705d821301fc52eecc2fe055 · < 533a0b940f901c15e5cbbd4b5d66e871c209e8ce| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ata: libata-core: Reject an invalid concurrent positioning ranges count
ata_dev_config_cpr() takes the number of range descriptors from buf[0] of the concurrent positioning ranges log (up to 255), which the device reports independently of the log size in the GPL directory. The count is then walked at a fixed 32-byte stride in two places with no bound: the log read here, and the INQUIRY VPD page B9h emitter, which writes one descriptor per range into the fixed 2048-byte ata_scsi_rbuf. A device reporting a count larger than its own log overflows the read buffer (up to 7704 bytes past a 512-byte slab), and a count above 62 overflows the response buffer on the emit side.
Bound the count once, on probe, against both the log the device returned and the number of descriptors the VPD B9h response buffer can hold (ATA_DEV_MAX_CPR, derived from the rbuf size). Reject an out-of-range count with a warning; this keeps the emitter in bounds with no separate change there.
From the CVE record · Linux
The Linux kernel's libata-core does not bound a device-reported concurrent positioning ranges count against the log size or response buffer. A device reporting an excessive count can cause buffer overflows during log reading or VPD B9h response generation; the issue requires interaction with such a device.
Engineers running the Linux kernel with ATA devices should check their systems; affected versions were not specified.