{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-39688",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T07:20:57.113Z",
        "datePublished": "2025-04-18T07:01:35.177Z",
        "dateUpdated": "2026-08-05T12:04:33.491Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:04:33.491Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: allow SC_STATUS_FREEABLE when searching via nfs4_lookup_stateid()\n\nThe pynfs DELEG8 test fails when run against nfsd. It acquires a\ndelegation and then lets the lease time out. It then tries to use the\ndeleg stateid and expects to see NFS4ERR_DELEG_REVOKED, but it gets\nbad NFS4ERR_BAD_STATEID instead.\n\nWhen a delegation is revoked, it's initially marked with\nSC_STATUS_REVOKED, or SC_STATUS_ADMIN_REVOKED and later, it's marked\nwith the SC_STATUS_FREEABLE flag, which denotes that it is waiting for\ns FREE_STATEID call.\n\nnfs4_lookup_stateid() accepts a statusmask that includes the status\nflags that a found stateid is allowed to have. Currently, that mask\nnever includes SC_STATUS_FREEABLE, which means that revoked delegations\nare (almost) never found.\n\nAdd SC_STATUS_FREEABLE to the always-allowed status flags, and remove it\nfrom nfsd4_delegreturn() since it's now always implied."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
                        "baseScore": 7.5,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:N - The vulnerable code is in the in-kernel NFS server (fs/nfsd/nfs4state.c), reached from NFSv4 COMPOUND operations arriving over TCP port 2049 from a remote client. The entire trigger sequence (OPEN to obtain a delegation, ignore the recall, then reuse the revoked stateid) is composed of ordinary remote NFS RPCs.\nAC:L - The attacker deterministically controls every precondition: it requests the delegation, causes revocation by simply not answering CB_RECALL or letting the lease lapse, then issues an operation with that stateid. No race, timing window, or memory layout outside the attacker's control is involved.\nPR:N - nfsd exports under the default AUTH_SYS flavor perform no cryptographic authentication — any host matching the export ACL (frequently a whole subnet or a wildcard) can establish a clientid and OPEN files, and the client asserts its own uid. No server-side credential is required to reach delegation state handling.\nUI:N - The remote client alone drives the entire sequence against the exported filesystem. No action by a local user or administrator on the NFS server is needed.\nS:U - The mis-handled stateid lookup, the leaked delegation objects, and the resulting service degradation are all confined to the nfsd subsystem within the server kernel's own security authority. No sandbox, hypervisor, or IOMMU boundary is crossed.\nC:N - The defect is a too-narrow status mask that causes a lookup to fail and return the wrong NFS error code; no out-of-bounds read, use-after-free, or uninitialized memory is involved. No kernel memory or other clients' data is exposed.\nI:N - No memory corruption, out-of-bounds write, or type confusion occurs — the failing path is strictly more restrictive than the fixed one and grants no additional access. File data and server state are not modifiable through this bug.\nA:H - Revoked delegations are never freed, permanently consuming the global max_delegations budget until nfsd stops issuing delegations to every client, while the stuck SEQ4_STATUS_RECALLABLE_STATE_REVOKED flag in every SEQUENCE reply drives clients into per-RPC layout teardown and delegation rescans. A remote client can repeat this without bound, producing unbounded kernel resource leakage and sustained service degradation."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nfsd/nfs4state.c"
                    ],
                    "versions": [
                        {
                            "version": "8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a",
                            "lessThan": "52e209203c35a4fbff8af23cd3613efe5df40102",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a",
                            "lessThan": "dc6f3295905d7185e71091870119a8c11c3808cc",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a",
                            "lessThan": "5bcb44e650bc4ec7eac23df90c5e011a77fa2beb",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a",
                            "lessThan": "d1bc15b147d35b4cb7ca99a9a7d79d41ca342c13",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "967faa26f313a62e7bebc55d5b8122eaee43b929",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6.11.6",
                            "lessThan": "6.12",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nfsd/nfs4state.c"
                    ],
                    "versions": [
                        {
                            "version": "6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.23",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.11",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14.2",
                            "lessThanOrEqual": "6.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15",
                            "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": "6.12",
                                    "versionEndExcluding": "6.12.23"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.13.11"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.14.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.15"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11.6"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/52e209203c35a4fbff8af23cd3613efe5df40102"
                },
                {
                    "url": "https://git.kernel.org/stable/c/dc6f3295905d7185e71091870119a8c11c3808cc"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5bcb44e650bc4ec7eac23df90c5e011a77fa2beb"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d1bc15b147d35b4cb7ca99a9a7d79d41ca342c13"
                }
            ],
            "title": "nfsd: allow SC_STATUS_FREEABLE when searching via nfs4_lookup_stateid()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}