{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-21955",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-12-29T08:45:45.790Z",
        "datePublished": "2025-04-01T15:46:55.724Z",
        "dateUpdated": "2026-08-05T11:55:35.788Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:55:35.788Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: prevent connection release during oplock break notification\n\nksmbd_work could be freed when after connection release.\nIncrement r_count of ksmbd_conn to indicate that requests\nare not finished yet and to not release the connection."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 8.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:N - ksmbd is the in-kernel SMB server listening on TCP/445; the entire path (oplock grant, oplock break trigger, and the connection reset that wins the race) is driven purely by SMB2 traffic from remote clients.\nAC:L - The attacker owns both sides of the race — connection A holds the oplock, connection B triggers the break notification, and the attacker chooses exactly when to reset A's socket — and can retry the sequence unlimited times over the network.\nPR:L - Reaching an oplock/lease break requires an established SMB2 session and tree connect (SMB2_CREATE with an oplock or lease context), so valid low-privileged share credentials (or a guest mapping) are needed; it is not a pre-authentication code path.\nUI:N - No victim action is required — the attacker's own two connections create the oplock, trigger the break, and tear down the connection entirely on their own schedule.\nS:U - The use-after-free is confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed ksmbd_conn/tcp_transport objects are dereferenced after release, and reclaiming those kmalloc-64 slots with attacker-sprayed data yields a read primitive over kernel memory and leaks server/session state.\nI:H - ksmbd_conn_write() performs an indirect call through conn->transport->ops->writev read out of the freed transport, giving control-flow hijack and arbitrary-write potential once the slab is reclaimed with controlled contents.\nA:H - Even without successful grooming the stale dereference of the freed connection, transport, and released socket reliably oopses or panics the kernel, killing the SMB server host."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/smb/server/connection.c",
                        "fs/smb/server/connection.h",
                        "fs/smb/server/oplock.c",
                        "fs/smb/server/server.c"
                    ],
                    "versions": [
                        {
                            "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                            "lessThan": "09aeab68033161cb54f194da93e51a11aee6144b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                            "lessThan": "a4261bbc33fbf99b99c80aa3a2c5097611802980",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                            "lessThan": "f17d1c63a76b0fe8e9c78023a86507a3a6d62cfa",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                            "lessThan": "3aa660c059240e0c795217182cf7df32909dd917",
                            "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/smb/server/connection.c",
                        "fs/smb/server/connection.h",
                        "fs/smb/server/oplock.c",
                        "fs/smb/server/server.c"
                    ],
                    "versions": [
                        {
                            "version": "5.15",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.15",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.84",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.20",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.8",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14",
                            "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.15",
                                    "versionEndExcluding": "6.6.84"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.12.20"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.13.8"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.14"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/09aeab68033161cb54f194da93e51a11aee6144b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a4261bbc33fbf99b99c80aa3a2c5097611802980"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f17d1c63a76b0fe8e9c78023a86507a3a6d62cfa"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3aa660c059240e0c795217182cf7df32909dd917"
                }
            ],
            "title": "ksmbd: prevent connection release during oplock break notification",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}