md: raid1: fix potential OOB in raid1_remove_disk()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b8321b68d1445f308324517e45fb0a5c2b48e271 · < 4f7d853b4590fc20e90dd50e346c02811a8c5b08| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
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.
From the CVE record · Linux
The Linux kernel's RAID1 disk removal function can access memory out of bounds when rddev->raid_disk is greater than mddev->raid_disks. The input does not establish whether an attacker can trigger this condition or what access or interaction would be required.
Engineers running the Linux kernel with RAID1 should check their installations; affected versions were not specified.