android_kernel_motorola_sm6375/drivers/lightnvm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Colin Ian King d21b8c8fbf lightnvm: fix out-of-bounds write to array devices->info[]
[ Upstream commit a48faebe65b0db55a73b9220c3d919eee849bb79 ]

There is an off-by-one array check that can lead to a out-of-bounds
write to devices->info[i].  Fix this by checking by using >= rather
than > for the size check. Also replace hard-coded array size limit
with ARRAY_SIZE on the array.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: cd9e9808d1 ("lightnvm: Support for Open-Channel SSDs")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-10-29 09:58:00 +01:00
..
core.c
Kconfig
Makefile
pblk-cache.c
pblk-core.c
pblk-gc.c
pblk-init.c
pblk-map.c
pblk-rb.c
pblk-read.c
pblk-recovery.c
pblk-rl.c
pblk-sysfs.c
pblk-trace.h
pblk-write.c
pblk.h