CVE-2026-31392
smb: client: fix krb5 mount with username option
Reported by linux · Published April 3, 2026
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 ```
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-devel | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel-libbpf-devel | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel6.12-libbpf-devel | Amazon Linux | 1:6.12.79-101.147.amzn2023 |
| kernel-livepatch-6.18.20-20.229 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel6.18-headers | Amazon Linux | 1:6.18.20-20.229.amzn2023 |
| python3-perf | Amazon Linux | 1:6.1.168-202.320.amzn2023 |
| kernel6.18-libbpf-static | Amazon Linux | 1:6.18.20-20.229.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 4ff67b720c02c36e54d55b88c2931879b7db1cd2, 4ff67b720c02c36e54d55b88c2931879b7db1cd2, 4ff67b720c02c36e54d55b88c2931879b7db1cd2 |
| Linux | Linux | 2.6.36, 0, 6.1.167 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel6.12-libbpf-devel | 0 |
| amazon:2023 | kernel-livepatch-6.18.20-20.229 | 0 |
| amazon:2023 | kernel6.18-headers | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel6.18-libbpf-static | 0 |
| linux | linux_kernel | 2.6.36, 2.6.36, 2.6.34.12 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | kernel6.18 | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-livepatch-6.1.168-202.320 | 0 |
| amazon:2023 | kernel6.18-libbpf | 0 |
…and 26 more
Timeline
- Apr 3, 2026 CVE Published
- May 18, 2026 EPSS Score (27 in total, the first dated here)
- Jun 2, 2026 Security Advisory (100 in total, the first dated here)
- Jun 13, 2026 Coalition ESS Score
- Aug 9, 2026 CVE Updated
- Aug 11, 2026 Distribution Patch (93 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-31392
vulnetix vdb fixes CVE-2026-31392
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31392/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart