md/raid10: fix writes_pending and barrier reference leaks on discard failures
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c9aa889b035fca4598ae985a0f0c76ebbb547ad2 · < 393d687131d8aa8c7e4de2cb494438e145d20fc2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
md/raid10: fix writes_pending and barrier reference leaks on discard failures
raid10_make_request() acquires a writes_pending reference with md_write_start() before calling raid10_handle_discard(). Several failure paths in raid10_handle_discard() complete the bio and return without releasing the corresponding reference, causing md_write_end() to be skipped.
Call md_write_end() before returning from these failure paths to keep writes_pending accounting balanced.
Additionally, discard split allocation failures can occur after wait_barrier() succeeds. Those paths return without calling allow_barrier(), leaking the associated barrier reference.
Release the barrier before returning from those paths.
From the CVE record · Linux
The Linux kernel's md/raid10 code can leak writes_pending references on discard failure paths and barrier references when discard split allocation fails. An attacker who can trigger these failures could cause reference leaks; the input does not specify whether network access, authentication, or user interaction is required.
Teams running Linux kernels with md/raid10 should check their kernel vendor's advisory; affected versions are not specified.