{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-99385","id":"CVE-2026-99385","title":"smb: client: fix buffer overflow in SMB2_tcon()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix buffer overflow in SMB2_tcon()\n\nIn SMB2_tcon(), unc_path is allocated with a fixed buffer size of\nMAX_SHARENAME_LENGTH * 2 bytes (672 bytes). However, the user-controlled\nUNC path (tree) length is passed to cifs_strtoUTF16(), which assumes the\ndestination buffer is large enough and writes strlen(tree) + 1 UTF-16 ","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix buffer overflow in SMB2_tcon()\n\nIn SMB2_tcon(), unc_path is allocated with a fixed buffer size of\nMAX_SHARENAME_LENGTH * 2 bytes (672 bytes). However, the user-controlled\nUNC path (tree) length is passed to cifs_strtoUTF16(), which assumes the\ndestination buffer is large enough and writes strlen(tree) + 1 UTF-16 code\nunits.\n\nCommit 62a1a439e0fd (\"cifs: clean up handling of unc= option\") removed the\nlength check on UNC mount options, allowing mount paths to exceed\nMAX_SHARENAME_LENGTH while retaining the fixed-size buffer allocation in\nSMB2_tcon(). Consequently, an oversized UNC string causes cifs_strtoUTF16()\nto write past the end of the heap object, resulting in a slab-out-of-bounds\nwrite. Furthermore, if a tree exceeds MAX_TREE_SIZE characters, strscpy()\ntruncates it in cifs_tcon::tree_name, causing subsequent reconnects or\nfailovers to fail.\n\nFix this by first verifying that the length of tree does not exceed\nMAX_TREE_SIZE, returning -EINVAL if it does. Then, dynamically allocate\nunc_path based on the length of tree so that it safely accommodates all\nUTF-16 code units for paths within MAX_TREE_SIZE.\n\n[pc: remove unused MAX_SHARENAME_LENGTH]","published":"2026-11-19T14:23:25.254Z","updated":"2026-11-19T14:23:25.254Z","reserved":"2026-09-25T10:25:14.411Z","status":"PUBLISHED","rejected":false,"assigner":"Linux","metric":null,"metrics":[],"rating":"unrated","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1","lessThan":"75fd4c72aa3dcfabb318144636f416be6796d423","status":"affected","versionType":"git"},{"version":"62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1","lessThan":"acf25a7be39dccdbf60fdf3d437dd7832fa4b6d3","status":"affected","versionType":"git"},{"version":"62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1","lessThan":"d26f7fbca42532c6c79efdceb4bd5198e1849314","status":"affected","versionType":"git"},{"version":"62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1","lessThan":"73cc469b0ff7551f8537ea919709973e6dc4f514","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.8","status":"affected"},{"version":"0","lessThan":"3.8","status":"unaffected","versionType":"semver"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.61","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.2","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/75fd4c72aa3dcfabb318144636f416be6796d423","tags":[]},{"url":"https://git.kernel.org/stable/c/acf25a7be39dccdbf60fdf3d437dd7832fa4b6d3","tags":[]},{"url":"https://git.kernel.org/stable/c/d26f7fbca42532c6c79efdceb4bd5198e1849314","tags":[]},{"url":"https://git.kernel.org/stable/c/73cc469b0ff7551f8537ea919709973e6dc4f514","tags":[]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":null,"epssPercentile":null,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-99385","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99385","ok":false,"note":"not found"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-99385","ok":false,"note":"no open-source package data"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-99385","ok":false,"note":"no score yet"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}