]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: storage: sddr55: Reject out-of-bound new_pba
authorTianchu Chen <flynnnchen@tencent.com>
Sun, 16 Nov 2025 04:46:18 +0000 (12:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:25:00 +0000 (06:25 +0900)
commita20f1dd19d21dcb70140ea5a71b1f8cbe0c7e68f
treebe7ef7d067d498035e91467b078f6624a8666e3b
parentfada9c8f7ee80c88378684b260c03c8a266da1f9
usb: storage: sddr55: Reject out-of-bound new_pba

commit b59d4fda7e7d0aff1043a7f742487cb829f5aac1 upstream.

Discovered by Atuin - Automated Vulnerability Discovery Engine.

new_pba comes from the status packet returned after each write.
A bogus device could report values beyond the block count derived
from info->capacity, letting the driver walk off the end of
pba_to_lba[] and corrupt heap memory.

Reject PBAs that exceed the computed block count and fail the
transfer so we avoid touching out-of-range mapping entries.

Signed-off-by: Tianchu Chen <flynnnchen@tencent.com>
Cc: stable <stable@kernel.org>
Link: https://patch.msgid.link/B2DC73A3EE1E3A1D+202511161322001664687@tencent.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/sddr55.c