aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorZhang Shurong <[email protected]>2023-07-22 15:53:53 +0800
committerSong Liu <[email protected]>2023-08-15 09:37:27 -0700
commit8b0472b50bcf0f19a5119b00a53b63579c8e1e4d (patch)
tree4e4aadbf69506e0616d32601bd97e3ce572c74f7 /lib/test_fortify/write_overflow-strncpy-src.c
parenta705b11b358dee677aad80630e7608b2d5f56691 (diff)
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 <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Song Liu <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions