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

Published Nov 19, 2026
·
Updated

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 cephreaddir() when the MDS answers a READDIR request with a reply whose extra blob is empty. parsereplyinfo() skips reply blobs whose length is zero, so parsereplyinforeaddir() never runs, rreplyinfo.dirdir stays NULL, and the reply still parses as successful. cephmdscdorequest() returns 0 and cephreaddir() then reads rinfo->dirdir->frag with no NULL check:

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

The oops on v7.3.0-rc4-00537-ga3ff15db6820, one getdents64(2) on the mount root after an msmode=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:cephreaddir+0xbff/0x3ea0 Call Trace: <TASK> ? pfxcephreaddir+0x10/0x10 wrapdirectoryiterator+0xa2/0xe0 iteratedir+0x1da/0x5d0 x64sysgetdents64+0x13b/0x2a0 dosyscall64+0xdd/0x4a0 entrySYSCALL64afterhwframe+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 cephreaddir() 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, FRAGEND|FRAGCOMPLETE — 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).

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in v7.3-rc5

Event History

Nov 19, 2026
CVE Published
via MITRE·02:45 PM
Data Sourced
via MITRE·02:45 PM
Description
Data Sourced
via OSV·02:45 PM
DescriptionAffected Software
Data Sourced
via NVD·03:18 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203