CVE-2026-52957: libceph: Fix potential null-ptr-deref in decode_choose_args()
In the Linux kernel, the following vulnerability has been resolved:
libceph: Fix potential null-ptr-deref in decodechooseargs()
A message of type CEPHMSGOSDMAP contains an OSD map that itself contains a CRUSH map. When decoding this CRUSH map in crushdecode(), an array of maxbuckets CRUSH buckets is decoded, where some indices may not refer to actual buckets and are therefore set to NULL. The received CRUSH map may optionally contain chooseargs that get decoded in decodechooseargs(). When decoding a crushchooseargmap, a series of chooseargs for different buckets is decoded, with the bucketindex being read from the incoming message. It is only checked that the bucket index does not exceed maxbuckets, but not that it doesn't point to an index with a NULL bucket. If a (potentially corrupted) message contains a crushchooseargmap including such a bucketindex, a null pointer dereference may occur in the subsequent processing when attempting to access the bucket with the given index.
This patch fixes the issue by extending the affected check. Now, it is only attempted to access the bucket if it is not NULL.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Apply the provided libceph patch to extend the bucket NULL check in decode_choose_args() (crush_decode()/crush_choose_arg_map decoding) so the bucket is only accessed if the decoded bucket pointer is not NULL, preventing a potential null-ptr-deref during subsequent processing.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-52957?
CVE-2026-52957 has a risk rating of 27, indicating a significant vulnerability in the Linux kernel's libceph.
How do I fix CVE-2026-52957?
To mitigate CVE-2026-52957, it is recommended to update the Linux kernel to the latest patched version that addresses this vulnerability.
What component of the Linux kernel is affected by CVE-2026-52957?
CVE-2026-52957 affects the libceph component of the Linux kernel.
What type of vulnerability is identified by CVE-2026-52957?
CVE-2026-52957 is a potential null pointer dereference vulnerability in the decode_choose_args function.
When was CVE-2026-52957 published?
CVE-2026-52957 was published on June 24, 2026.