drbd: fix "LOGIC BUG" in drbd_al_begin_io_nonblock()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 08a1ddab6df7d3c7b6341774cb1cf4b21b96a214 · < d1ef3aed4df2ef1fe46befd8f2da9a6ec5445508| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drbd: fix "LOGIC BUG" in drbd_al_begin_io_nonblock()
Even though we check that we "should" be able to do lc_get_cumulative() while holding the device->al_lock spinlock, it may still fail, if some other code path decided to do lc_try_lock() with bad timing.
If that happened, we logged "LOGIC BUG for enr=...", but still did not return an error.
The rest of the code now assumed that this request has references for the relevant activity log extents.
The implcations are that during an active resync, mutual exclusivity of resync versus application IO is not guaranteed. And a potential crash at this point may not realizs that these extents could have been target of in-flight IO and would need to be resynced just in case.
Also, once the request completes, it will give up activity log references it does not even hold, which will trigger a BUG_ON(refcnt == 0) in lc_put().
Fix:
From the CVE record · Linux
A failure in DRBD activity-log handling can leave an I/O request without the references the kernel assumes it holds. During an active resync, this can undermine separation between resync and application I/O and may trigger a kernel crash. The input does not establish attacker access requirements or whether user interaction is needed.
Engineers running Linux kernels with DRBD should check their versions; affected versions are not specified.