{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-31392",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-03-09T15:48:24.085Z",
        "datePublished": "2026-04-03T15:15:57.491Z",
        "dateUpdated": "2026-08-05T12:22:03.739Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:22:03.739Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix krb5 mount with username option\n\nCustomer reported that some of their krb5 mounts were failing against\na single server as the client was trying to mount the shares with\nwrong credentials.  It turned out the client was reusing SMB session\nfrom first mount to try mounting the other shares, even though a\ndifferent username= option had been specified to the other mounts.\n\nBy using username mount option along with sec=krb5 to search for\nprincipals from keytab is supported by cifs.upcall(8) since\ncifs-utils-4.8.  So fix this by matching username mount option in\nmatch_session() even with Kerberos.\n\nFor example, the second mount below should fail with -ENOKEY as there\nis no 'foobar' principal in keytab (/etc/krb5.keytab).  The client\nends up reusing SMB session from first mount to perform the second\none, which is wrong.\n\n```\n$ ktutil\nktutil:  add_entry -password -p testuser -k 1 -e aes256-cts\nPassword for testuser@ZELDA.TEST:\nktutil:  write_kt /etc/krb5.keytab\nktutil:  quit\n$ klist -ke\nKeytab name: FILE:/etc/krb5.keytab\nKVNO Principal\n ---- ----------------------------------------------------------------\n   1 testuser@ZELDA.TEST (aes256-cts-hmac-sha1-96)\n$ mount.cifs //w22-root2/scratch /mnt/1 -o sec=krb5,username=testuser\n$ mount.cifs //w22-root2/scratch /mnt/2 -o sec=krb5,username=foobar\n$ mount -t cifs | grep -Po 'username=\\K\\w+'\ntestuser\ntestuser\n```"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:L",
                        "baseScore": 8.1,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The vulnerable path is reached through local CIFS/SMB mount setup, via the mount/fs_context path into SMB client session matching. It is not directly triggerable by remote SMB packets alone.\nAC:L - Once Kerberos CIFS mounts are in use, the bug is triggered reliably by mounting the same server with sec=krb5 and a different username option while the cred_uid matches an existing session. No race or attacker-uncontrolled timing is required.\nPR:H - CIFS and SMB3 filesystems are not marked FS_USERNS_MOUNT, so final mount creation requires real CAP_SYS_ADMIN in the initial namespace. Unprivileged user namespaces do not provide access to this path.\nUI:N - The attacker with the required local administrative privilege can perform the mount sequence directly. No separate victim action is required.\nS:C - The kernel SMB client session-confusion flaw can cause access to resources governed by a separate SMB/Kerberos server security authority using the wrong authenticated principal. That crosses from the client kernel's mount/session selection into remote server authorization.\nC:H - Reusing the wrong Kerberos SMB session can expose files and shares accessible to the previously authenticated principal rather than the requested username. In a high-impact deployment, that principal may have broad access to sensitive remote data.\nI:H - File operations on the unintended mount use the reused principal's SMB session, so writes, deletes, ACL changes, or other modifications may be authorized as that principal. If that account has broad write rights, integrity impact is high.\nA:L - The flaw does not indicate kernel memory corruption, panic, or hang, but it can cause intended Kerberos mounts to fail or bind to the wrong session. This can interrupt access to the intended SMB share without a full availability loss."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/smb/client/connect.c"
                    ],
                    "versions": [
                        {
                            "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
                            "lessThan": "fd4547830720647d4af02ee50f883c4b1cca06e4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
                            "lessThan": "9229709ec8bf85ae7ca53aeee9aa14814cdc1bd2",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
                            "lessThan": "d33cbf0bf8979d779900da9be2505d68d9d8da25",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
                            "lessThan": "9ee803bfdba0cf739038dbdabdd4c02582c8f2b2",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
                            "lessThan": "6e9ff1eb7feedcf46ff2d0503759960ab58e7775",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
                            "lessThan": "12b4c5d98cd7ca46d5035a57bcd995df614c14e1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "223c7f082d2836ac719b3b228bdcfab35e5e5330",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "88720224330a655ab6268e20109b65b11cfd7f6a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2.6.32.44",
                            "lessThan": "2.6.33",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "2.6.34.12",
                            "lessThan": "2.6.35",
                            "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/connect.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.36",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.36",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.167",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.130",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.78",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.20",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.19.10",
                            "lessThanOrEqual": "6.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.0",
                            "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": "2.6.36",
                                    "versionEndExcluding": "6.1.167"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.36",
                                    "versionEndExcluding": "6.6.130"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.36",
                                    "versionEndExcluding": "6.12.78"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.36",
                                    "versionEndExcluding": "6.18.20"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.36",
                                    "versionEndExcluding": "6.19.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.36",
                                    "versionEndExcluding": "7.0"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.32.44"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.34.12"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/fd4547830720647d4af02ee50f883c4b1cca06e4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9229709ec8bf85ae7ca53aeee9aa14814cdc1bd2"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d33cbf0bf8979d779900da9be2505d68d9d8da25"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9ee803bfdba0cf739038dbdabdd4c02582c8f2b2"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6e9ff1eb7feedcf46ff2d0503759960ab58e7775"
                },
                {
                    "url": "https://git.kernel.org/stable/c/12b4c5d98cd7ca46d5035a57bcd995df614c14e1"
                }
            ],
            "title": "smb: client: fix krb5 mount with username option",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}