CVE-2026-139716: usb-storage: alauda: fix out-of-bounds zone index
In the Linux kernel, the following vulnerability has been resolved:
usb-storage: alauda: fix out-of-bounds zone index
MEDIAINFO(us).lbatopba and .pbatolba are arrays of numzones pointers, allocated by kcalloc() in alaudainitmedia(). alaudaensuremapforzone() reads lbatopba[zone] and pbatolba[zone], and when either is NULL alaudareadmap() writes a pointer back to both. Two separate errors let zone reach numzones, one element past the end.
maxlba is capacity >> (blockshift + pageshift), which counts physical blocks, but zone is lba / uzonesize and uzonesize is 125/128 of zonesize. On a 16 MB card (alaudacardids id 0x73) numzones is 1 and uzonesize is 1000, so lba 1000 to 1023 pass the bounds check and index element 1 of a one-element array.
alaudareaddata() also calls alaudaensuremapforzone() before it compares lba against maxlba, so any larger lba is used as an index before the check rejects it. alaudawritedata() already checks first.
Bound lba by numzones uzonesize on both paths and move the read side's call below the check. alaudatransport() reports numzones uzonesize blocksize for READCAPACITY, so the new bound is exactly the range the device advertises and no block becomes unreachable.
sd never issues an lba past the reported capacity; an SGIO READ10 can.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the alauda driver, bound lba by num_zones * uzonesize on both affected paths, and move alauda_read_data()'s call to alauda_ensure_map_for_zone() below the bounds check.