CVE-2026-99557 in Linuxinfo

Summary

by MITRE • 11/19/2026

In the Linux kernel, the following vulnerability has been resolved:

ceph: fail readdir when the MDS reply carries no dirfrag

A ceph mount oopses in ceph_readdir() when the MDS answers a READDIR request with a reply whose extra blob is empty. parse_reply_info() skips reply blobs whose length is zero, so parse_reply_info_readdir() never runs, r_reply_info.dir_dir stays NULL, and the reply still parses as successful. ceph_mdsc_do_request() returns 0 and ceph_readdir() then reads rinfo->dir_dir->frag with no NULL check:

/* extra */ ceph_decode_32_safe(&p, end, len, bad); if (len > 0) {
... err = parse_reply_info_extra(&p, p + len, req, features, s); ... }

The oops on v7.3.0-rc4-00537-ga3ff15db6820, one getdents64(2) on the mount root after an ms_mode=legacy mount, trimmed:

BUG: KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
CPU: 1 UID: 0 PID: 266 Comm: ls Tainted: G N 7.3.0-rc4-00537-ga3ff15db6820 #1 PREEMPT(lazy) RIP: 0010:ceph_readdir+0xbff/0x3ea0 Call Trace: <TASK> ? __pfx_ceph_readdir+0x10/0x10 wrap_directory_iterator+0xa2/0xe0 iterate_dir+0x1da/0x5d0 __x64_sys_getdents64+0x13b/0x2a0 do_syscall_64+0xdd/0x4a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK>

The unconditional frag read came in with 81c6aea5275ea ("ceph: handle frag mismatch between readdir request and reply"), so the bug is old.

Treat a reply with no dirfrag as a protocol violation: warn once, drop the request and return -EIO, the same way ceph_readdir() already handles the two malformed-reply cases later in the function.

Tested on v7.3.0-rc4-00537-ga3ff15db6820 (KASAN). Unpatched, the getdents64(2) above takes the machine down (oops=panic) on the first READDIR reply. With the patch it warns once and getdents64(2) returns -EIO, no oops, no hang. A conformant reply for an empty directory — dirfrag present, zero entries, FRAG_END|FRAG_COMPLETE — still lists "." and ".." and returns EOF on both kernels, so normal readdir behavior is unchanged. The oops is still present in v7.3-rc5 (72d3fcf802c45).

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel's Ceph filesystem client contains a critical null pointer dereference vulnerability within the ceph_readdir function, which can lead to system crashes or denial of service conditions when interacting with specific Metadata Server configurations. This flaw arises from an incomplete validation of incoming READDIR responses from the Ceph Metadata Server (MDS). Under normal operation, the MDS returns directory listing data encapsulated in extra blobs that contain fragment information necessary for reconstructing the directory structure. However, if the MDS replies to a READDIR request with an empty extra blob—indicating no dirfrag is present—the kernel's parsing logic fails to account for this edge case properly. The parse_reply_info function correctly skips processing of zero-length reply blobs, which means that parse_reply_info_readdir is never executed in these instances. Consequently, the internal structure member r_reply_info.dir_dir remains uninitialized and set to NULL. Despite this lack of valid data, the overall request parsing logic still considers the operation successful because it does not detect the absence of expected directory fragment information as an error condition.

The vulnerability manifests when ceph_mdsc_do_request returns a success status code zero, prompting ceph_readdir to proceed with accessing the now NULL dir_dir pointer. Specifically, the function attempts to read the frag field from rinfo->dir_dir without performing any null check prior to access. This unconditional dereference triggers a general protection fault or kernel panic depending on system configuration and crash settings. The issue was introduced by commit 81c6aea5275ea titled ceph handle frag mismatch between readdir request and reply, indicating that the bug has persisted across multiple kernel versions including v7.3-rc4 and v7.3-rc5. Attackers or misconfigured clients could potentially exploit this behavior to cause a denial of service by forcing READDIR operations on mounts where legacy mode is enabled, particularly when listing root directories under specific network conditions that result in empty replies from the MDS.

From a security classification perspective, this vulnerability aligns with CWE-476 NULL Pointer Dereference, as it involves accessing memory through an uninitialized or null pointer leading to undefined behavior and system instability. In terms of attack vectors, this relates to ATT&CK technique T1053 Scheduled Task/Job which could be abused if the crash occurs during automated maintenance scripts, though more directly it represents a local denial of service via resource exhaustion caused by kernel oopses. The operational impact is severe for environments relying on high availability and stability, as repeated occurrences can lead to node reboots or cluster instability depending on how panics are handled at the host level.

The resolution involves treating replies lacking directory fragments as protocol violations rather than successful operations. Upon detecting an empty extra blob in a READDIR response, the kernel now issues a single warning message and drops the request returning an I/O error code -EIO to the calling application instead of proceeding with invalid memory access. This approach mirrors existing error handling logic for other malformed reply scenarios within the same function ensuring consistency in defensive programming practices. Normal behavior remains unaffected since conformant replies containing zero entries but valid fragment markers such as FRAG_END and FRAG_COMPLETE continue to list standard directory entries dot and double-dot correctly returning end of file status without triggering the vulnerability path. System administrators should apply this patch immediately to prevent potential denial of service attacks exploiting malformed metadata server responses in Ceph distributed storage environments running affected kernel versions.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00157

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!