out of bounds vulnerability report
I found a out-of-bounds vulnerability in /linux/drivers/scsi/sd.c , sd_read_block_limits_ext Function Due to Unreasonable boundary checks.
out-of-bounds read vulnerability exists in the Linux kernel's SCSI disk driver (drivers/scsi/sd.c). The flaw occurs in the sd_read_block_limits_ext function when processing Vital Product Data (VPD) page B7 (Block Limits Extension) responses from storage devices
The vulnerability can be fixed by changing the boundary checks from 2 to 6
rcu_read_lock();
vpd = rcu_dereference(sdkp->device->vpd_pgb7);
- if (vpd && vpd->len >= 2)
+ if (vpd && vpd->len >= 6)sdkp->rscs = vpd->data[5] & 1;
rcu_read_unlock();