md/raid1,raid10: fix bio accounting for split md cloned bios
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
md/raid1,raid10: fix bio accounting for split md cloned bios
Use md_cloned_bio() to control bio accounting instead of relying on r1bio_existed in raid1 or the io_accounting flag in raid10.
The previous logic does not reliably reflect whether a bio is an md cloned bio. When a failed bio is split and resubmitted via bio_submit_split_bioset() on the error path, this can lead to either double accounting for md cloned bios, or missing accounting for bios returned from bio_submit_split_bioset()
Fix this by using md_cloned_bio() to detect md cloned bios and skip accounting accordingly.
From the CVE record · Linux
The Linux kernel’s md RAID1 and RAID10 code can miscount I/O when a failed bio is split and resubmitted on the error path. This can double-count cloned bios or miss accounting for returned bios; the input does not describe an attacker, access requirements, or user interaction.
Operators running the Linux kernel with md RAID1 or RAID10 should check their systems; affected versions are not specified.