{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-54076",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-24T12:21:05.093Z",
        "datePublished": "2025-12-24T12:23:18.330Z",
        "dateUpdated": "2026-08-05T09:16:59.986Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:16:59.986Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix missed ses refcounting\n\nUse new cifs_smb_ses_inc_refcount() helper to get an active reference\nof @ses and @ses->dfs_root_ses (if set).  This will prevent\n@ses->dfs_root_ses of being put in the next call to cifs_put_smb_ses()\nand thus potentially causing an use-after-free bug."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 9.8,
                        "baseSeverity": "CRITICAL"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:N - The flaw is in the in-kernel SMB/CIFS network filesystem client, and the unbalanced puts are driven by data from the remote peer — the server picks the SMB2.0/2.1 dialect that routes signing through the buggy `smb2_calc_signature()`, returns the DFS referrals (`DFSREF_REFERRAL_SERVER`) that populate `ses->dfs_root_ses`, and controls the delayed CREATE replies that reach `smb2_handle_cancelled_mid()`. A malicious, compromised, or MITM'd SMB/DFS server drives the refcount underflow purely over the network.\nAC:L - The imbalance is deterministic, not a race: every `smb2_find_smb_ses_unlocked()` acquisition drops one extra reference on `ses->dfs_root_ses` at release, so the attacker simply drives enough signed exchanges to force the count to zero. No memory-layout or timing condition outside the attacker's control is needed.\nPR:N - The attacker is the remote SMB/DFS server (or a network MITM) and holds no privileges or account on the victim client; referral responses and dialect negotiation happen without any credential on the target system.\nUI:N - The `smb2transport.c` half of the bug is a steady-state runtime path — on an already-mounted DFS share, signature calculation, cancelled-MID handling, echo keepalives and the DFS cache refresh worker accumulate the extra puts with no user action at attack time.\nS:U - The premature free and subsequent corruption are confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Use-after-free on a `cifs_ses` object whose slot can be reoccupied by attacker-groomed heap data yields a read primitive, and the freed session still holds authentication material (`auth_key.response`, signing keys) and kernel pointers used by subsequent code.\nI:H - After the free, `cifs_put_smb_ses()` reads `ses->server` from freed memory and performs an indirect call via `server->ops->logoff()`, giving a control-flow hijack primitive; heap spraying over the freed `cifs_ses` converts this into arbitrary write/code execution.\nA:H - The refcount underflow frees a session still referenced by child sessions, tcons, and the DFS cache worker, reliably producing an oops/panic (and a `WARN_ON(ses->ses_count < 0)`) that takes down the machine."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/smb/client/dfs.c",
                        "fs/smb/client/smb2transport.c"
                    ],
                    "versions": [
                        {
                            "version": "8e3554150d6c80a84b3cb046615d1a0e943811dc",
                            "lessThan": "eb382196e6f6e05cfafdab797840e5a96c6e7bf0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8e3554150d6c80a84b3cb046615d1a0e943811dc",
                            "lessThan": "bf99f6be2d20146942bce6f9e90a0ceef12cbc1e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f30d226bcc9f0e2d97b4a6e94c43a28148fbeab6",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "c082c3be0f96e759ff2e361d929832fda0b93851",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6.2.15",
                            "lessThan": "6.3",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3.2",
                            "lessThan": "6.4",
                            "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/smb/client/dfs.c",
                        "fs/smb/client/smb2transport.c"
                    ],
                    "versions": [
                        {
                            "version": "6.4",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.4",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4.7",
                            "lessThanOrEqual": "6.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.5",
                            "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.4",
                                    "versionEndExcluding": "6.4.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4",
                                    "versionEndExcluding": "6.5"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.2.15"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.3.2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/eb382196e6f6e05cfafdab797840e5a96c6e7bf0"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bf99f6be2d20146942bce6f9e90a0ceef12cbc1e"
                }
            ],
            "title": "smb: client: fix missed ses refcounting",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}