
<https://sepses.org/resource/cve/CVE-2026-99385> <http://purl.org/dc/terms/description> """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]""" ;
	<http://purl.org/dc/terms/identifier> "CVE-2026-99385" ;
	<http://purl.org/dc/terms/issued> "2026-11-19T15:17:50.713"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
	<http://purl.org/dc/terms/modified> "2026-11-19T15:17:50.713"^^<http://www.w3.org/2001/XMLSchema#dateTime>, "2026-11-23T08:17:43.107"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
	<http://purl.org/dc/terms/title> "CVE-2026-99385" ;
	<https://sepses.org/vocab/ref/cve#assigner> "416baaa9-dc9f-4396-8d5f-8c081fb06d67" ;
	<https://sepses.org/vocab/ref/cve#hasCVSS3BaseMetric> <https://sepses.org/resource/cvss/CVSS3BaseMetric/CVE-2026-99385> ;
	<https://sepses.org/vocab/ref/cve#hasReference> <https://sepses.org/resource/cve/reference/CVE-2026-99385> ;
	<https://sepses.org/vocab/ref/cve#state> <https://sepses.org/resource/vocab/cve/state/Received> ;
	a <https://sepses.org/vocab/ref/cve#CVE> .

