CVE-2026-31392 (GCVE-0-2026-31392)
Vulnerability from cvelistv5
Published
2026-04-03 15:15
Modified
2026-08-05 12:22
Summary
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix krb5 mount with username option Customer reported that some of their krb5 mounts were failing against a single server as the client was trying to mount the shares with wrong credentials. It turned out the client was reusing SMB session from first mount to try mounting the other shares, even though a different username= option had been specified to the other mounts. By using username mount option along with sec=krb5 to search for principals from keytab is supported by cifs.upcall(8) since cifs-utils-4.8. So fix this by matching username mount option in match_session() even with Kerberos. For example, the second mount below should fail with -ENOKEY as there is no 'foobar' principal in keytab (/etc/krb5.keytab). The client ends up reusing SMB session from first mount to perform the second one, which is wrong. ``` $ ktutil ktutil: add_entry -password -p testuser -k 1 -e aes256-cts Password for testuser@ZELDA.TEST: ktutil: write_kt /etc/krb5.keytab ktutil: quit $ klist -ke Keytab name: FILE:/etc/krb5.keytab KVNO Principal ---- ---------------------------------------------------------------- 1 testuser@ZELDA.TEST (aes256-cts-hmac-sha1-96) $ mount.cifs //w22-root2/scratch /mnt/1 -o sec=krb5,username=testuser $ mount.cifs //w22-root2/scratch /mnt/2 -o sec=krb5,username=foobar $ mount -t cifs | grep -Po 'username=\K\w+' testuser testuser ```
Impacted products
Vendor Product Version
Linux Linux Version: 4ff67b720c02c36e54d55b88c2931879b7db1cd2
Version: 4ff67b720c02c36e54d55b88c2931879b7db1cd2
Version: 4ff67b720c02c36e54d55b88c2931879b7db1cd2
Version: 4ff67b720c02c36e54d55b88c2931879b7db1cd2
Version: 4ff67b720c02c36e54d55b88c2931879b7db1cd2
Version: 4ff67b720c02c36e54d55b88c2931879b7db1cd2
Version: 223c7f082d2836ac719b3b228bdcfab35e5e5330
Version: 88720224330a655ab6268e20109b65b11cfd7f6a
Version: 2.6.32.44   
Version: 2.6.34.12   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/connect.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "fd4547830720647d4af02ee50f883c4b1cca06e4",
              "status": "affected",
              "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
              "versionType": "git"
            },
            {
              "lessThan": "9229709ec8bf85ae7ca53aeee9aa14814cdc1bd2",
              "status": "affected",
              "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
              "versionType": "git"
            },
            {
              "lessThan": "d33cbf0bf8979d779900da9be2505d68d9d8da25",
              "status": "affected",
              "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
              "versionType": "git"
            },
            {
              "lessThan": "9ee803bfdba0cf739038dbdabdd4c02582c8f2b2",
              "status": "affected",
              "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
              "versionType": "git"
            },
            {
              "lessThan": "6e9ff1eb7feedcf46ff2d0503759960ab58e7775",
              "status": "affected",
              "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
              "versionType": "git"
            },
            {
              "lessThan": "12b4c5d98cd7ca46d5035a57bcd995df614c14e1",
              "status": "affected",
              "version": "4ff67b720c02c36e54d55b88c2931879b7db1cd2",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "223c7f082d2836ac719b3b228bdcfab35e5e5330",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "88720224330a655ab6268e20109b65b11cfd7f6a",
              "versionType": "git"
            },
            {
              "lessThan": "2.6.33",
              "status": "affected",
              "version": "2.6.32.44",
              "versionType": "semver"
            },
            {
              "lessThan": "2.6.35",
              "status": "affected",
              "version": "2.6.34.12",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/connect.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.36"
            },
            {
              "lessThan": "2.6.36",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.167",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.130",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.78",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.20",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.19.*",
              "status": "unaffected",
              "version": "6.19.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.167",
                  "versionStartIncluding": "2.6.36",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.130",
                  "versionStartIncluding": "2.6.36",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.78",
                  "versionStartIncluding": "2.6.36",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.20",
                  "versionStartIncluding": "2.6.36",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.19.10",
                  "versionStartIncluding": "2.6.36",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.0",
                  "versionStartIncluding": "2.6.36",
                  "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",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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 \u0027foobar\u0027 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 \u0027username=\\K\\w+\u0027\ntestuser\ntestuser\n```"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.1,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:L",
            "version": "3.1"
          },
          "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\u0027s 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\u0027s 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."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:22:03.739Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-31392",
    "datePublished": "2026-04-03T15:15:57.491Z",
    "dateReserved": "2026-03-09T15:48:24.085Z",
    "dateUpdated": "2026-08-05T12:22:03.739Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…