libceph: refresh auth->authorizer_buf{,_len} after authorizer update
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0bed9b5c523d577378b6f83eab5835fe30c27208 · < 0060ec912292a550198d8d18ac95b433c92a7091| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
libceph: refresh auth->authorizer_buf{,_len} after authorizer update
ceph_x_create_authorizer() caches au->buf->vec.iov_base and au->buf->vec.iov_len in struct ceph_auth_handshake. These cached values are then used by the messenger connect code when sending the authorizer.
ceph_x_update_authorizer() can rebuild the authorizer when a newer service ticket is available. If the rebuilt authorizer no longer fits in the existing buffer, ceph_x_build_authorizer() drops its reference to au->buf and allocates a new one. If this is the final reference, ceph_buffer_put() frees the old ceph_buffer and its vec.iov_base, but auth->authorizer_buf still points at that freed memory.
A subsequent msgr1 reconnect can therefore queue the stale pointer and trigger a KASAN slab-use-after-free in _copy_from_iter() while tcp_sendmsg() copies the authorizer.
Refresh auth->authorizer_buf and auth->authorizer_buf_len after a successful authorizer rebuild so the messenger sends the current buffer.
From the CVE record · Linux
The Linux kernel’s libceph can retain a pointer to freed memory when a newer service ticket causes an authorizer to be rebuilt in a new buffer. A subsequent msgr1 reconnect can use that pointer while sending the authorizer, triggering a use-after-free. The input does not establish whether an attacker can trigger this condition or whether authentication or user interaction is required.
Engineers running Linux kernels that use libceph should check their kernel; affected versions are not specified.