CVE-2023-52636

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-52636
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52636.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-52636
Downstream
Related
Published
2024-04-02T07:01:38Z
Modified
2025-10-16T12:36:38.718385Z
Summary
libceph: just wait for more data to be available on the socket
Details

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 read_partial() 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 osdsparse_read() could continue where it left off.

[ idryomov: changelog ]

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d396f89db39a2f259e2125ca43b4c31bb65afcad
Fixed
da9c33a70f095d5d55c36d0bfeba969e31de08ae
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d396f89db39a2f259e2125ca43b4c31bb65afcad
Fixed
bd9442e553ab8bf74b8be3b3c0a43bf4af4dc9b8
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d396f89db39a2f259e2125ca43b4c31bb65afcad
Fixed
8e46a2d068c92a905d01cbb018b00d66991585ab

Affected versions

v6.*

v6.5
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.2
v6.6.3
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.7.1
v6.7.2
v6.7.3
v6.7.4
v6.8-rc1
v6.8-rc2
v6.8-rc3

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.17
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.5