{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-3865",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2023-07-24T14:52:38.053Z",
        "datePublished": "2025-08-16T13:27:56.403Z",
        "dateUpdated": "2026-08-15T12:23:42.112Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-15T12:23:42.112Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix out-of-bound read in smb2_write\n\nksmbd_smb2_check_message doesn't validate hdr->NextCommand. If\n->NextCommand is bigger than Offset + Length of smb2 write, It will\nallow oversized smb2 write length. It will cause OOB read in smb2_write."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
                        "baseScore": 8.1,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:N - ksmbd is an in-kernel SMB server reachable over TCP/445; the bug is triggered by crafting SMB2 WRITE request fields (NextCommand/Length) sent from a remote SMB client.\nAC:L - The attacker fully controls NextCommand and Length in the SMB2 header/PDU and can reliably pass ksmbd_smb2_check_message by making them agree, with no race or other conditions outside attacker control.\nPR:L - smb2_write requires a valid SMB session, tree connect to a writable share, and an open file handle with write access; guest/basic share credentials suffice, but this is not a pre-authentication path.\nUI:N - Exploitation requires only attacker-sent SMB traffic; no victim user action such as opening a file or mounting a share is needed.\nS:U - Impact is confined to the host kernel running ksmbd; the vulnerability does not cross a VM, IOMMU, or other security authority boundary by itself.\nC:H - Oversized Length with a forged NextCommand causes smb2_write to kernel_write attacker-chosen lengths of memory past the request buffer into a share file the attacker can then read back, leaking large amounts of kernel memory (documented up to 64KiB).\nI:N - This is an out-of-bounds read only; it does not corrupt kernel memory or provide a write primitive into kernel structures.\nA:H - A large read past the kvmalloc'd request buffer can touch unmapped memory and cause a kernel oops/panic, or otherwise disrupt the ksmbd worker path."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/smb/server/smb2misc.c"
                    ],
                    "versions": [
                        {
                            "version": "e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9",
                            "lessThan": "3813eee5154d6a4c5875cb4444cb2b63bac8947f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9",
                            "lessThan": "c86211159bc3178b891e0d60e586a32c7b6a231b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9",
                            "lessThan": "58a9c41064df27632e780c5a3ae3e0e4284957d1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9",
                            "lessThan": "5fe7f7b78290638806211046a99f031ff26164e1",
                            "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/smb2misc.c"
                    ],
                    "versions": [
                        {
                            "version": "5.15",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.15",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.121",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.36",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3.10",
                            "lessThanOrEqual": "6.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4",
                            "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": "5.15.121"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.1.36"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.3.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/3813eee5154d6a4c5875cb4444cb2b63bac8947f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c86211159bc3178b891e0d60e586a32c7b6a231b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/58a9c41064df27632e780c5a3ae3e0e4284957d1"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5fe7f7b78290638806211046a99f031ff26164e1"
                }
            ],
            "title": "ksmbd: fix out-of-bound read in smb2_write",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}