CVE-2023-52636: libceph: just wait for more data to be available on the socket
In the Linux kernel, the following vulnerability has been resolved:
libceph: just wait for more data to be available on the socket
A short read may occur while reading the message footer from the socket. Later, when the socket is ready for another read, the messenger invokes all readpartial() handlers, including readpartialsparsemsgdata(). The expectation is that readpartialsparsemsgdata() would bail, allowing the messenger to invoke readpartial() for the footer and pick up where it left off.
However readpartialsparsemsgdata() violates that and ends up calling into the state machine in the OSD client. The sparse-read state machine assumes that it's a new op and interprets some piece of the footer as the sparse-read header and returns bogus extents/data length, etc.
To determine whether readpartialsparsemsgdata() should bail, let's reuse cursor->totalresid. Because once it reaches to zero that means all the extents and data have been successfully received in last read, else it could break out when partially reading any of the extents and data. And then osdsparseread() could continue where it left off.
[ idryomov: changelog ]
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2023-52636?
CVE-2023-52636 has been classified as a medium severity vulnerability affecting the Linux kernel.
How do I fix CVE-2023-52636?
To fix CVE-2023-52636, you should update your Linux kernel to the latest version provided by your distribution.
Which versions of the Linux kernel are affected by CVE-2023-52636?
CVE-2023-52636 affects the Linux kernel versions from 6.6 up to 6.8-rc3.
What does CVE-2023-52636 impact in the Linux kernel?
CVE-2023-52636 impacts the handling of reads from sockets in the libceph protocol.
Is there a workaround for CVE-2023-52636?
Currently, the recommended action is to upgrade the kernel as there are no known workarounds for CVE-2023-52636.