# CVE-2026-99557: ceph: fail readdir when the MDS reply carries no dirfrag

- Priority: **Routine**
- Reason: Not severe (CVSS 6, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-19 · Modified: 2026-11-23
- Aliases: DEBIAN-CVE-2026-99557, UBUNTU-CVE-2026-99557, CGA-4x2r-rvrw-8rq2, CGA-685j-cwpm-9gvp, CGA-8542-2g43-5wmf, CGA-8g3q-wq64-mm49, CGA-8v82-hf53-vgj8, CGA-f3f8-vjrg-xfw9, CGA-fqcc-v3p6-v28v, CGA-m395-6j5q-r695, CGA-pghr-vxv5-2x4w, CGA-pxpc-cp5q-57c7, CGA-vh9r-p426-vc4g, CGA-2f9r-4xh2-rg8m, CGA-33fj-7jrv-h4px, CGA-5gpq-g4qh-g3p9, CGA-ghgw-xw3j-mw27, CGA-hjqv-42fq-m23c, CGA-qf79-php7-hxgw, CGA-vp72-53v5-gv8r, CGA-x736-fp46-5jcw
- Record: https://cvemate.com/vulnerability/CVE-2026-99557 · JSON: https://cvemate.com/vulnerability/CVE-2026-99557/json

## Description

```text
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).
```

## Signals

- CVSS: 6 medium (v4.0, OSV · Ubuntu) CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- EPSS: 0.202%, percentile 10.636%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 182)

- chainguard linux-desktop-7.2 (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc-boot-installed (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-headers (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-modules (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2 (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-bootc-boot-installed (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-headers (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-modules (Chainguard): All versions (No fix recorded)
- debian linux (Debian): All versions (No fix recorded) \| \< 6.12.117-1 \| \< 7.3.3-1
- debian linux-6.12 (Debian): \< 6.12.117-1~deb12u1
- ubuntu linux (Ubuntu): All versions (No fix recorded)
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/37d01a684e6087e264895ab34b829d2267ad607c>
- <https://git.kernel.org/stable/c/49d7c1beac3810983869ed9260dcd444b6a51c8e>
- <https://git.kernel.org/stable/c/d129cfc783b5ff091f5edcccf8129608ec50c000>
- <https://git.kernel.org/stable/c/728c856d7da04fb79f7aa00e974ffb6f55e55995>
- <https://security-tracker.debian.org/tracker/CVE-2026-99557>
- <https://git.kernel.org/stable/c/500d7e85af3116803d2cdae9f3a8319e782b84e2>
- <https://git.kernel.org/stable/c/ba0a9ccfd717a603ac10520f723cf4a4881e61b6>
- <https://git.kernel.org/stable/c/12646a00f8549c9f17e5213c30bd608e81fee8f9>
- <https://git.kernel.org/stable/c/4ec54ab76c627e4ff8dc29a18237f923ee1f2bee>
- <https://ubuntu.com/security/CVE-2026-99557>
- <https://www.cve.org/CVERecord?id=CVE-2026-99557>
- <https://git.kernel.org/linus/728c856d7da04fb79f7aa00e974ffb6f55e55995>

---

Data as of 2026-12-05T14:04:07.043Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
