nbd: fix race between timeout and normal completion
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
cdf62c535a9bfd5ff0eef4b91669da39d8abc0c3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nbd: fix race between timeout and normal completion
If request timetout is handled by nbd_requeue_cmd(), normal completion has to be stopped for avoiding to complete this requeued request, other use-after-free can be triggered.
Fix the race by clearing NBD_CMD_INFLIGHT in nbd_requeue_cmd(), meantime make sure that cmd->lock is grabbed for clearing the flag and the requeue.
From the CVE record · Linux
A race in the Linux kernel's nbd component can occur when a request times out while normal completion is in progress. Completing the requeued request can trigger a use-after-free. The input does not specify attacker access requirements or whether user interaction is needed.
Engineers running Linux kernels with the nbd component should check their versions; affected versions are not specified.