# CVE-2026-99385: smb: client: fix buffer overflow in SMB2\_tcon()

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 0149377b312eeb136119223a7c05d55c4b24c76d, 73cc469b0ff7551f8537ea919709973e6dc4f514, 75fd4c72aa3dcfabb318144636f416be6796d423, 85692a261042bab56fdfd51e10630f09ef5a5082, a4e022f375a04cadca3f799f6157877961be5829, acf25a7be39dccdbf60fdf3d437dd7832fa4b6d3, d26f7fbca42532c6c79efdceb4bd5198e1849314, e17fe5c8bf3fca4852e497b7061e316d314d7c52 (CNA); fix release not confirmed
- Status: published
- Published: 2026-11-19 · Modified: 2026-11-23
- Aliases: DEBIAN-CVE-2026-99385, UBUNTU-CVE-2026-99385, CGA-29qr-v3wv-38gw, CGA-2cph-2qp4-54g3, CGA-2g57-pf39-vhmv, CGA-2mxc-2ggh-xhh4, CGA-3cvh-2jgr-vw3j, CGA-4wxf-77hv-r4v2, CGA-f6w9-qmjh-8rgx, CGA-g7cf-cj6x-6qjq, CGA-m4ph-gg2r-5cw8, CGA-pmpp-hx5h-558g, CGA-wm38-9gfc-42c9, CGA-33rc-4wpv-9rmx, CGA-563r-9mfq-cch9, CGA-gvfp-qm68-f59g, CGA-jgj6-ffh3-v2w8, CGA-m67g-5jr8-phjg, CGA-m8fj-2j74-3w6m, CGA-q6f8-6p53-362h, CGA-2cf3-h284-cv98
- Record: https://cvemate.com/vulnerability/CVE-2026-99385 · JSON: https://cvemate.com/vulnerability/CVE-2026-99385/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix buffer overflow in SMB2_tcon()

In SMB2_tcon(), unc_path is allocated with a fixed buffer size of
MAX_SHARENAME_LENGTH * 2 bytes (672 bytes). However, the user-controlled
UNC path (tree) length is passed to cifs_strtoUTF16(), which assumes the
destination buffer is large enough and writes strlen(tree) + 1 UTF-16 code
units.

Commit 62a1a439e0fd ("cifs: clean up handling of unc= option") removed the
length check on UNC mount options, allowing mount paths to exceed
MAX_SHARENAME_LENGTH while retaining the fixed-size buffer allocation in
SMB2_tcon(). Consequently, an oversized UNC string causes cifs_strtoUTF16()
to write past the end of the heap object, resulting in a slab-out-of-bounds
write. Furthermore, if a tree exceeds MAX_TREE_SIZE characters, strscpy()
truncates it in cifs_tcon::tree_name, causing subsequent reconnects or
failovers to fail.

Fix this by first verifying that the length of tree does not exceed
MAX_TREE_SIZE, returning -EINVAL if it does. Then, dynamically allocate
unc_path based on the length of tree so that it safely accommodates all
UTF-16 code units for paths within MAX_TREE_SIZE.

[pc: remove unused MAX_SHARENAME_LENGTH]
```

## Signals

- CVSS: 9.8 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.863%, percentile 59.84%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 182)

- chainguard linux-desktop-7.2 (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc-boot-installed (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-headers (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-modules (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2 (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-bootc-boot-installed (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-headers (Chainguard): All versions (No fix recorded)
- chainguard linux-server-7.2-modules (Chainguard): All versions (No fix recorded)
- debian linux (Debian): All versions (No fix recorded) \| \< 6.12.117-1 \| \< 7.3.3-1
- debian linux-6.12 (Debian): \< 6.12.117-1~deb12u1
- ubuntu linux (Ubuntu): All versions (No fix recorded)
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/75fd4c72aa3dcfabb318144636f416be6796d423>
- <https://git.kernel.org/stable/c/acf25a7be39dccdbf60fdf3d437dd7832fa4b6d3>
- <https://git.kernel.org/stable/c/d26f7fbca42532c6c79efdceb4bd5198e1849314>
- <https://git.kernel.org/stable/c/73cc469b0ff7551f8537ea919709973e6dc4f514>
- <https://security-tracker.debian.org/tracker/CVE-2026-99385>
- <https://git.kernel.org/stable/c/a4e022f375a04cadca3f799f6157877961be5829>
- <https://git.kernel.org/stable/c/e17fe5c8bf3fca4852e497b7061e316d314d7c52>
- <https://git.kernel.org/stable/c/85692a261042bab56fdfd51e10630f09ef5a5082>
- <https://git.kernel.org/stable/c/0149377b312eeb136119223a7c05d55c4b24c76d>
- <https://ubuntu.com/security/CVE-2026-99385>
- <https://www.cve.org/CVERecord?id=CVE-2026-99385>
- <https://git.kernel.org/linus/73cc469b0ff7551f8537ea919709973e6dc4f514>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99385.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-99385>
- <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git>

---

Data as of 2026-12-05T08:38:10.643Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
