{"id":"AZL-114785","summary":"CVE-2026-99385 affecting package kernel 6.6.161.1-1","details":"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]","modified":"2026-11-20T14:17:19.091319129Z","published":"2026-11-19T15:17:50Z","upstream":["CVE-2026-99385"],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99385"}],"affected":[{"package":{"name":"kernel","ecosystem":"Azure Linux:3","purl":"pkg:rpm/azure-linux/kernel"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.6.161.1-1"}]}],"database_specific":{"source":"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-114785.json"}}],"schema_version":"1.9.2"}