af_unix: Return immediately when manage_oob() returns NULL for 0-length buffer.
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
af_unix: Return immediately when manage_oob() returns NULL for 0-length buffer.
Fahad Alharbi reported that recv(0, MSG_PEEK) triggers busy-wait in unix_stream_read_generic() if recv() is blocking and the last skb in the queue is MSG_OOB skb.
In such a situation, TCP returns 0 immediately regardless of blocking or non-blocking.
Let's follow the behaviour.
From the CVE record · Linux
The Linux kernel's af_unix socket handling can enter a busy-wait during a blocking, zero-length recv() call with MSG_PEEK when the last queued socket buffer is an out-of-band message. The issue is triggered by a caller using that socket; the input does not specify authentication requirements.
Engineers running Linux kernels with the affected af_unix behavior should check their kernel version.