xprtrdma: Fix bcall rep leak and unbounded peek
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 41c8f70f5a3db7e06179186b6525fd9ee1d7d314 · < 118a16a18c59f7ad8084b2d13988839b669fca10| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xprtrdma: Fix bcall rep leak and unbounded peek
rpcrdma_is_bcall() decodes a reply's first words to decide whether the frame is a backchannel call. Two issues in that decode path let a short or malformed reply leak the receive buffer and drain the Receive queue.
First, the speculative peek
p = xdr_inline_decode(xdr, 0); /* five p++ reads follow */
asks xdr_inline_decode() for zero bytes, which returns xdr->p without consulting xdr->end. The five subsequent __be32 reads can then walk up to 20 bytes past the wire payload into stale regbuf contents and misclassify the reply as a backchannel call.
Second, after the post-peek
p = xdr_inline_decode(xdr, 3 * sizeof(*p)); if (unlikely(!p)) return true;
From the CVE record · Linux
The Linux kernel's xprtrdma reply decoder can read beyond a short reply's wire payload and leak a receive buffer when handling a short or malformed reply. A peer sending such a reply can cause the Receive queue to drain, particularly when no later forward-channel replies arrive to replenish it. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels that use xprtrdma should check their deployments; affected versions are not specified.