{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-80527",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-08-26T14:34:25.764Z",
        "datePublished": "2026-08-26T14:37:06.178Z",
        "dateUpdated": "2026-08-26T14:37:06.178Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-26T14:37:06.178Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix hanging __ceph_get_caps() with stale mds_wanted\n\nA reader can hang forever in __ceph_get_caps() when the client no\nlonger holds `FILE_RD`, but local cap state still says that the\ncapability is already wanted (via `mds_wanted`).\n\nOne way to trigger this is through MDS cap revocation.  If another\nclient performs a conflicting operation, the MDS can revoke `FILE_RD`\nfrom the reader; the next read then has to reacquire `FILE_RD`.  If\nthe cap update that should request `FILE_RD` never reaches the MDS\nafter `cap->mds_wanted` was raised, the reader is left holding only\nnon-file caps while local `mds_wanted` still includes the file read\ncaps.\n\nIn that state, try_get_cap_refs() sees `need <= mds_wanted` and\nreturns 0, so __ceph_get_caps() just waits on `i_cap_wq`.  If the cap\nupdate that was supposed to request `FILE_RD never reaches the MDS\nafter `cap->mds_wanted was` raised, no further request is sent and the\nwaiter can sleep indefinitely until unrelated cap traffic happens to\nwake it up.\n\nThe ordering issue is that `cap->mds_wanted` is updated in\n__prep_cap() before the `CEPH_MSG_CLIENT_CAPS message` is actually\nqueued for send.  That makes one field serve two different meanings at\nonce: what this client wants, and what the client believes the MDS\nalready knows it wants.\n\nA proper fix would be to split those states and track whether a cap\nupdate is actually in flight or has been observed by the MDS.\nHowever, simply moving the `cap->mds_wanted assignment` later would\nnot be sufficient: queueing the message in the messenger does not\nguarantee that the MDS processed that specific wanted set, and\nreconnect or message loss can still invalidate that assumption.\nFixing that properly would require a larger rework of the cap state\nmachine.\n\nTo allow simpler backports to stable kernels, this patch implements a\nsimpler workaround:\n\n- stop waiting forever in __ceph_get_caps(); after a bounded wait,\n  fall back to the renew path\n\n- make ceph_renew_caps() issue a synchronous `OPEN` request whenever\n  the inode still does not actually hold the wanted caps, instead of\n  only calling ceph_check_caps()\n\nThe extra issued-vs-wanted check in ceph_renew_caps() is necessary\nbecause the previous test only checked whether the inode still had any\nreal caps at all.  That is not enough after revocation: the client can\nstill hold something like `pLs` and yet be missing `FILE_RD`\ncompletely.  In that case, falling back to ceph_check_caps() is not\nsufficient, because it still trusts `cap->mds_wanted` and may resend\nnothing.  By requiring `(issued & wanted) == wanted` before taking the\nasynchronous path, the code only uses ceph_check_caps() when the\n`wanted caps` are already actually issued.  Otherwise, it sends the\nsynchronous `OPEN` renew.\n\nThis preserves the existing asynchronous fast path when the wanted\ncaps are already issued, avoids changing cap-state semantics, and\nfixes the hang by guaranteeing that a stalled waiter eventually\nretries through a path that does not rely on the stale `mds_wanted`\nstate.\n\n[ idryomov: move CEPH_GET_CAPS_WAIT_TIMEOUT from libceph.h to\n  mds_client.h, formatting ]"
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ceph/caps.c",
                        "fs/ceph/file.c",
                        "fs/ceph/mds_client.h"
                    ],
                    "versions": [
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "b5661524c5a45085a866864ca9b8ae2513dfd67a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "5e84bc6f67e19fdd192d8b215de728acbfc12572",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "5fedf279a1ea369d39c8b06dd4547cdc576065d0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "e05c315b4da0c16ea800ee4b2cb6c617f586d1b5",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "fcce1b3be6d286aa80831e730289f4c062053ae6",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "a3bc6b3e9ef3f5f5cb85a902a30a090c7931127c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "9e55fe24c548ad3163903eb58bb002d28d32a630",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0a454bdd501ad1aa30bb72e9581efa338ad6ce5c",
                            "lessThan": "50958bb928bad3bdba9e5d1b7ff4bbadcf6951e6",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ceph/caps.c",
                        "fs/ceph/file.c",
                        "fs/ceph/mds_client.h"
                    ],
                    "versions": [
                        {
                            "version": "5.8",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.8",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.266",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.217",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.184",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.153",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.105",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.46",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.1.10",
                            "lessThanOrEqual": "7.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.2",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "5.10.266"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "5.15.217"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "6.1.184"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "6.6.153"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "6.12.105"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "6.18.46"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "7.1.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "7.2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/b5661524c5a45085a866864ca9b8ae2513dfd67a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5e84bc6f67e19fdd192d8b215de728acbfc12572"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5fedf279a1ea369d39c8b06dd4547cdc576065d0"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e05c315b4da0c16ea800ee4b2cb6c617f586d1b5"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fcce1b3be6d286aa80831e730289f4c062053ae6"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a3bc6b3e9ef3f5f5cb85a902a30a090c7931127c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9e55fe24c548ad3163903eb58bb002d28d32a630"
                },
                {
                    "url": "https://git.kernel.org/stable/c/50958bb928bad3bdba9e5d1b7ff4bbadcf6951e6"
                }
            ],
            "title": "ceph: fix hanging __ceph_get_caps() with stale mds_wanted",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}