Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 385D24457B4 for ; Wed, 26 Aug 2026 14:38:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787755107; cv=none; b=DY5VuNKtxBjNrXFsjlIjWGeNGcI/fsLgWnC8WIAAv2zeD2DstMR0IQJLQTpdWLMEgftNMnU93FaGFjpP2vpJvShXzXgB3/JCtSS/j1m0DGPLIJ03zM8CGWSCbmt4h4IolHvvmwyqZoHdhbbogWRETu36zcDCrPoyvKzaZfvChbk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787755107; c=relaxed/simple; bh=CO6kX8+vfG/kZf2VlIu66GHZT7lArLGUwsI5JZje+Yg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S6V2e8oxoi2Yi7J6Tss4kbRGqQ0MQs0Vv6N7cpxuTE8Mx1ndACWDjSU6Of2qoPjER9GeOY005t0kxxOzXVBxnmUArdG9b2NED8JswJaFPNq42eOE7/c+RnEHMPs4A2TubYGe+bhbQJzPmjf0qXq8TXWMhb8QR0LvNPWxQApHeLo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RTXDtLho; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RTXDtLho" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87AF51F00A3A; Wed, 26 Aug 2026 14:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787755104; bh=IAXwdA4JpQszw4isox/COLxJvRZMHgQpuvK6Yq8P8eI=; h=From:To:Cc:Subject:Date:Reply-To; b=RTXDtLhok+L7iOnFaMuopGu8WUk7Hi7wgvlDMNz2fndC8/6fv9/lDei2IHHKm0Mw6 5KNcqR6C/ayyuxw9L3acXWoxvfGQaXZqX1vGsfPgXA+AnKB7+Z6EJwVSbqiy8TZ0S2 14UfZdr5zWbXKFJMEUYRCZrFEosWdWUiXCt/tyQ8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-80527: ceph: fix hanging __ceph_get_caps() with stale mds_wanted Date: Wed, 26 Aug 2026 16:37:23 +0200 Message-ID: <2026082602-CVE-2026-80527-449e@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6294; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=uR44thVrl0PyNIu3HDtzHp+vd1wsLVdHfvtEyoa3gpY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFl9v/ikJiVpqHzY82LBcu4fy52e32aU+DbZ9r1ql0kJc 9T9HQ6SHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjAR72cM80s9NousrWQ6uX7D M4mEvXtC1E5EazIs6H0ZU5cn+cr0qnFbYo3YvRMZYdNCAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ceph: fix hanging __ceph_get_caps() with stale mds_wanted A reader can hang forever in __ceph_get_caps() when the client no longer holds `FILE_RD`, but local cap state still says that the capability is already wanted (via `mds_wanted`). One way to trigger this is through MDS cap revocation. If another client performs a conflicting operation, the MDS can revoke `FILE_RD` from the reader; the next read then has to reacquire `FILE_RD`. If the cap update that should request `FILE_RD` never reaches the MDS after `cap->mds_wanted` was raised, the reader is left holding only non-file caps while local `mds_wanted` still includes the file read caps. In that state, try_get_cap_refs() sees `need <= mds_wanted` and returns 0, so __ceph_get_caps() just waits on `i_cap_wq`. If the cap update that was supposed to request `FILE_RD never reaches the MDS after `cap->mds_wanted was` raised, no further request is sent and the waiter can sleep indefinitely until unrelated cap traffic happens to wake it up. The ordering issue is that `cap->mds_wanted` is updated in __prep_cap() before the `CEPH_MSG_CLIENT_CAPS message` is actually queued for send. That makes one field serve two different meanings at once: what this client wants, and what the client believes the MDS already knows it wants. A proper fix would be to split those states and track whether a cap update is actually in flight or has been observed by the MDS. However, simply moving the `cap->mds_wanted assignment` later would not be sufficient: queueing the message in the messenger does not guarantee that the MDS processed that specific wanted set, and reconnect or message loss can still invalidate that assumption. Fixing that properly would require a larger rework of the cap state machine. To allow simpler backports to stable kernels, this patch implements a simpler workaround: - stop waiting forever in __ceph_get_caps(); after a bounded wait, fall back to the renew path - make ceph_renew_caps() issue a synchronous `OPEN` request whenever the inode still does not actually hold the wanted caps, instead of only calling ceph_check_caps() The extra issued-vs-wanted check in ceph_renew_caps() is necessary because the previous test only checked whether the inode still had any real caps at all. That is not enough after revocation: the client can still hold something like `pLs` and yet be missing `FILE_RD` completely. In that case, falling back to ceph_check_caps() is not sufficient, because it still trusts `cap->mds_wanted` and may resend nothing. By requiring `(issued & wanted) == wanted` before taking the asynchronous path, the code only uses ceph_check_caps() when the `wanted caps` are already actually issued. Otherwise, it sends the synchronous `OPEN` renew. This preserves the existing asynchronous fast path when the wanted caps are already issued, avoids changing cap-state semantics, and fixes the hang by guaranteeing that a stalled waiter eventually retries through a path that does not rely on the stale `mds_wanted` state. [ idryomov: move CEPH_GET_CAPS_WAIT_TIMEOUT from libceph.h to mds_client.h, formatting ] The Linux kernel CVE team has assigned CVE-2026-80527 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 5.10.266 with commit b5661524c5a45085a866864ca9b8ae2513dfd67a Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 5.15.217 with commit 5e84bc6f67e19fdd192d8b215de728acbfc12572 Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 6.1.184 with commit 5fedf279a1ea369d39c8b06dd4547cdc576065d0 Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 6.6.153 with commit e05c315b4da0c16ea800ee4b2cb6c617f586d1b5 Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 6.12.105 with commit fcce1b3be6d286aa80831e730289f4c062053ae6 Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 6.18.46 with commit a3bc6b3e9ef3f5f5cb85a902a30a090c7931127c Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 7.1.10 with commit 9e55fe24c548ad3163903eb58bb002d28d32a630 Issue introduced in 5.8 with commit 0a454bdd501ad1aa30bb72e9581efa338ad6ce5c and fixed in 7.2 with commit 50958bb928bad3bdba9e5d1b7ff4bbadcf6951e6 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-80527 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/caps.c fs/ceph/file.c fs/ceph/mds_client.h 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/b5661524c5a45085a866864ca9b8ae2513dfd67a https://git.kernel.org/stable/c/5e84bc6f67e19fdd192d8b215de728acbfc12572 https://git.kernel.org/stable/c/5fedf279a1ea369d39c8b06dd4547cdc576065d0 https://git.kernel.org/stable/c/e05c315b4da0c16ea800ee4b2cb6c617f586d1b5 https://git.kernel.org/stable/c/fcce1b3be6d286aa80831e730289f4c062053ae6 https://git.kernel.org/stable/c/a3bc6b3e9ef3f5f5cb85a902a30a090c7931127c https://git.kernel.org/stable/c/9e55fe24c548ad3163903eb58bb002d28d32a630 https://git.kernel.org/stable/c/50958bb928bad3bdba9e5d1b7ff4bbadcf6951e6