libceph: bound get_version reply decode to front len
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 513a8243d67f8e8d27f2883bd2f18bc87c7ca376 · < 4e7ebfaa0d14cf50e44041bfde38070d6dbc019f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
libceph: bound get_version reply decode to front len
handle_get_version_reply() uses msg->front_alloc_len as the decode boundary for MON_GET_VERSION_REPLY. That is the size of the reused reply buffer, not the number of bytes actually received.
A truncated reply can therefore pass ceph_decode_need() and decode the second u64 from stale tail bytes left in the buffer by an earlier message, causing an uninitialized memory read.
Use msg->front.iov_len as the receive-side decode boundary, matching other libceph reply handlers and limiting decoding to the bytes that were actually read from the wire.
From the CVE record · Linux
The Linux kernel's libceph handler for MON_GET_VERSION_REPLY uses the allocated buffer size rather than the received message length as its decode boundary. A truncated reply received over the network can cause it to read stale bytes from the buffer. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with libceph should check their versions against the vendor advisory; affected versions are not specified.