Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795100826; b=ljnPp8Xva/KCR/ysoK9z1UOD/NJlbX63rQ9gw89Q9dUzX466z2XjeeeCcFNuqukruuLP Y3AVxppsluSSS5Et3yJy49u8Qyq35hAf5LhoUu/chgP62q14c6PuvHvUG1CpZHYxEtRsd htEb/ytqcXwxPSglHCk8yIQPsz3v6Qc2XBaowgRgyez9I3iBUETmz8bOPMJhv1onPodZX FKznnc4zNek8CycRlWSYLVSdH5sqwzC3SdTMzGKKqJYBwCrzlV38wkLqtgRcgc9ejTwHY wK6hlQ8UXspl79g5FHNM+pM6X/PaLIYM6JC8pX13mmNxlo9HAgU2QFKlSvQ+0elTTxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795100826; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Type:Content-Transfer-Encoding; bh=G6ctyl9ECfTbtV9z5spgGX2pwW+5iB2ZHeAqloGK1DY=; b=OyzaGTKH8+qygqQGyD/3S1OjyF8ggmQIWh+kA3NiHZo/ByZxA6VANFH0ofFnQCphW1vX qzX2uKFSC/fK72MjOb95XTbjqcKwOf93ofA7fDSt1hwBGGy7eCJ/K5um1WUyaSO3VVO6+ GWfaKcIdUh/rQQlherLulfnjSyK8SHt5jXL5sc1pI5nr+YrTk7g0jUx5fZdGmc4lchLMr W6H4mwISu3sAs9Ru7DxnALAiXj5btfltYDwyLDN+E8u7hRAIK5webuIThnmkjYdtiUCEm V4tr/kPoQGdiJVE96dY6lw6k2B2jAMWtcVmbN250bzQJxeoQFBPn4BW75nVAJBNCUWA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=i3Lgg81B; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F2DB606A320 for ; Thu, 19 Nov 2026 15:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=i3Lgg81B Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F99F1F000C6; Thu, 19 Nov 2026 15:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795100826; bh=G6ctyl9ECfTbtV9z5spgGX2pwW+5iB2ZHeAqloGK1DY=; h=From:To:Cc:Subject:Date:Reply-To; b=i3Lgg81BlKhBFAMwSTDjvoSsVdGGHDJpY/YZcE1Gs3dwAaGTctDXFM5rIGwofhNRa RFl+fWiNmu9n1Z/i1IDK23IBjdXcmZcrBRy7knXZF/PP3tu3xCaFlJBNBdigAH7dY5 GKEv6ZY7fAaF6BOjoIW0CY/kUbQv9mftouNHqfDM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99557: ceph: fail readdir when the MDS reply carries no dirfrag Date: Thu, 19 Nov 2026 15:27:35 +0100 Message-ID: <2026111928-CVE-2026-99557-ea3d@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4316; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SWJyvG8CUMBC4YNv5N69g4CbyyG9gBw4YxOsXuvLOAk=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2eYwHdjxqbXj82P/90eOsYUlTekPXejGzsnxtbqXQ Uia89iGjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhI6iSGeeqWKe+1XauLjQx1 HgTUdW3cbbCen2HBmsR229OPvwmsmyh698sEk4txGzgfAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== 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: ? __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 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). The Linux kernel CVE team has assigned CVE-2026-99557 to this issue. Affected and fixed versions =========================== Issue introduced in 3.13 with commit 81c6aea5275eae453719d7f3924da07e668265c5 and fixed in 6.12.117 with commit 37d01a684e6087e264895ab34b829d2267ad607c Issue introduced in 3.13 with commit 81c6aea5275eae453719d7f3924da07e668265c5 and fixed in 6.18.61 with commit 49d7c1beac3810983869ed9260dcd444b6a51c8e Issue introduced in 3.13 with commit 81c6aea5275eae453719d7f3924da07e668265c5 and fixed in 7.3.2 with commit d129cfc783b5ff091f5edcccf8129608ec50c000 Issue introduced in 3.13 with commit 81c6aea5275eae453719d7f3924da07e668265c5 and fixed in 7.4-rc1 with commit 728c856d7da04fb79f7aa00e974ffb6f55e55995 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-99557 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/ceph/dir.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: 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