summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-ps-service-time.c
diff options
context:
space:
mode:
authorZhang Shurong <zhang_shurong@foxmail.com>2023-07-22 15:53:53 +0800
committerSong Liu <song@kernel.org>2023-08-15 09:37:27 -0700
commit8b0472b50bcf0f19a5119b00a53b63579c8e1e4d (patch)
tree4e4aadbf69506e0616d32601bd97e3ce572c74f7 /drivers/md/dm-ps-service-time.c
parenta705b11b358dee677aad80630e7608b2d5f56691 (diff)
downloadlinux-8b0472b50bcf0f19a5119b00a53b63579c8e1e4d.tar.gz
linux-8b0472b50bcf0f19a5119b00a53b63579c8e1e4d.tar.bz2
linux-8b0472b50bcf0f19a5119b00a53b63579c8e1e4d.zip
md: raid1: fix potential OOB in raid1_remove_disk()
If rddev->raid_disk is greater than mddev->raid_disks, there will be an out-of-bounds in raid1_remove_disk(). We have already found similar reports as follows: 1) commit d17f744e883b ("md-raid10: fix KASAN warning") 2) commit 1ebc2cec0b7d ("dm raid: fix KASAN warning in raid5_remove_disk") Fix this bug by checking whether the "number" variable is valid. Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/tencent_0D24426FAC6A21B69AC0C03CE4143A508F09@qq.com Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md/dm-ps-service-time.c')
0 files changed, 0 insertions, 0 deletions