{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38737",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:24.034Z",
        "datePublished": "2025-09-05T17:20:37.719Z",
        "dateUpdated": "2026-08-05T12:04:26.998Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:04:26.998Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: Fix oops due to uninitialised variable\n\nFix smb3_init_transform_rq() to initialise buffer to NULL before calling\nnetfs_alloc_folioq_buffer() as netfs assumes it can append to the buffer it\nis given.  Setting it to NULL means it should start a fresh buffer, but the\nvalue is currently undefined."
                }
            ],
            "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 vulnerable path is the SMB3 client transport-encryption routine, and whether it is entered is dictated by server-supplied SESSION_SETUP/TREE_CONNECT flags (SMB2_SESSION_FLAG_ENCRYPT_DATA / SHI1005_FLAGS_ENCRYPT_DATA), so a remote or MITM SMB server across the network selects the vulnerable path and receives the leaked plaintext of the corrupted buffer.\nAC:L - Once encryption is negotiated, every write with a payload runs the uninitialised pointer through netfs_alloc_folioq_buffer(); the stack slot is reachable and groomable via ordinary syscall sequences on the writing task's kernel stack, with no condition outside the attacker's influence.\nPR:N - The remote SMB server presents no credentials to the client and needs none to set the encryption flags that gate the path; on the local side, any user holding a normal write handle to the mounted share triggers it with no elevated privileges.\nUI:N - An already-mounted share reaches the path through routine writeback and automatic reconnect (which re-runs session setup and tree connect), so no victim action beyond normal use of an existing mount is required.\nS:U - The wild reads, writes and bogus folio_put()s all occur within the kernel's own memory and the same security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - Because *_buffer is never reassigned, the garbage folio_queue is used as the ITER_SOURCE for crypt_message(), so arbitrary kernel memory pointed to by the stale chain is encrypted and sent to the remote peer, and freeing the chain yields further use-after-free read primitives.\nI:H - netfs_alloc_folioq_buffer() writes through the garbage pointer (tail->next = p, p->prev = tail, folioq_append_mark()), and cifs_copy_iter_to_folioq() then copies attacker-supplied write() data into folios derived from that chain, giving a content-controlled kernel write suitable for control-flow hijacking.\nA:H - The commit is titled \"Fix oops due to uninitialised variable\" — dereferencing the indeterminate pointer oopses the kernel, and the resulting folio_queue/folio refcount corruption and bogus frees cause further panics."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/smb/client/smb2ops.c"
                    ],
                    "versions": [
                        {
                            "version": "a2906d3316fc19bf0ade84618bb73eab604c447e",
                            "lessThan": "4931fe2dbe1cc0e7d350a4b51b0b330e43971d98",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a2906d3316fc19bf0ade84618bb73eab604c447e",
                            "lessThan": "6adaa9fae36f848afa7278945d725e197e33c496",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a2906d3316fc19bf0ade84618bb73eab604c447e",
                            "lessThan": "453a6d2a68e54a483d67233c6e1e24c4095ee4be",
                            "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/client/smb2ops.c"
                    ],
                    "versions": [
                        {
                            "version": "6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.44",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16.4",
                            "lessThanOrEqual": "6.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.17",
                            "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.44"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.16.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.17"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/4931fe2dbe1cc0e7d350a4b51b0b330e43971d98"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6adaa9fae36f848afa7278945d725e197e33c496"
                },
                {
                    "url": "https://git.kernel.org/stable/c/453a6d2a68e54a483d67233c6e1e24c4095ee4be"
                }
            ],
            "title": "cifs: Fix oops due to uninitialised variable",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}