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 lightnvm: fix out-of-bounds write to array devices->info[] 2020-10-29 09:58:00 +01:00
Kconfig
Makefile
pblk-cache.c
pblk-core.c lightnvm: pblk: use kvmalloc for metadata 2019-08-06 08:20:10 -06:00
pblk-gc.c lightnvm: pblk: use kvmalloc for metadata 2019-08-06 08:20:10 -06:00
pblk-init.c lightnvm: pblk: use kvmalloc for metadata 2019-08-06 08:20:10 -06:00
pblk-map.c
pblk-rb.c
pblk-read.c lightnvm: remove unused 'geo' variable 2019-08-08 22:14:04 -06:00
pblk-recovery.c lightnvm: remove set but not used variables 'data_len' and 'rq_len' 2019-08-08 07:34:34 -06:00
pblk-rl.c
pblk-sysfs.c
pblk-trace.h
pblk-write.c
pblk.h lightnvm: pblk: use kvmalloc for metadata 2019-08-06 08:20:10 -06:00