md/raid10: reset read_slot when reusing r10bio for discard
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d30588b2731fb01e1616cf16c3fe79a1443e29aa · < eb04e3e9c14ed15914f5fd2eae8b6435f54f095f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
md/raid10: reset read_slot when reusing r10bio for discard
put_all_bios() always drops devs[i].bio, but it only drops devs[i].repl_bio when r10_bio->read_slot < 0. If discard reuses an r10bio that was previously used for a read, read_slot can still be non-negative, and discard cleanup can skip bio_put() on repl_bio.
Reset read_slot to -1 when preparing an r10bio for discard so the replacement bio is always released correctly.
From the CVE record · Linux
In the Linux kernel's md/raid10 code, discard cleanup can fail to release a replacement bio when it reuses an r10bio previously used for a read. The input does not establish whether an attacker can trigger this condition, or specify network access, authentication, or user-interaction requirements.
Engineers running the Linux kernel with md/raid10 should check their deployments; affected versions are not specified.