Files
linux/drivers/md
NeilBrown 5175ed17a5 md: avoid signed overflow in slot_store()
[ Upstream commit 3bc5729227 ]

slot_store() uses kstrtouint() to get a slot number, but stores the
result in an "int" variable (by casting a pointer).
This can result in a negative slot number if the unsigned int value is
very large.

A negative number means that the slot is empty, but setting a negative
slot number this way will not remove the device from the array.  I don't
think this is a serious problem, but it could cause confusion and it is
best to fix it.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-05 11:24:52 +02:00
..
2021-02-26 15:49:51 -07:00
2021-08-16 10:50:32 -06:00
2021-08-10 13:32:40 -04:00
2023-04-05 11:24:52 +02:00
2022-10-26 12:35:12 +02:00
2021-06-14 22:32:07 -07:00
2019-03-12 10:15:18 -07:00
2022-08-17 14:22:57 +02:00
2021-06-14 22:32:07 -07:00