Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795099217; b=5q/G3LWEwbwn5nGrKbGOhDyN+CrZKBinSrVVyxuBwZmviW7HERlca3bFLuu99hpniAQ4 VpqOxglrAySUVPcXwb6aMMX63QqWPB3SDbWPdBaedQMxxYiwIF5FJl5YOFziEW5nNr+m3 OsDK0IkXeXY2Y31LCUxX6lqaD4TyzDqvqwgUX5Pcb+uzsG1ruf0uUVpaCP6S43wmalSam NEOmzd1hmZ9Tja2lqR7v6ybxB1hn1BuiwWQPQUnWubHWpIGhI13qyCep9VssN84iCNihI e/LL/aK0hcINzNP+xmFKSTy6lEshNbXndM3Y9S9tTABVkZWG+6nGmE+RaSoyIT7o3AA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795099217; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=l4djkzuotSHxPcSdmInnzog3SsAoFsGR08l0O9g8758=; b=t9BhbBLjYwMl9lv3LE+GahU6Ns8TStvUTdV5e0WPTa0uvB6iQAzB8v7mT+8cWD/J8aND NVpLzUUUbJqb0MojFDzPA18XTEI1wyIc88kgGtsfGrs+LCMgLbItL/zS75os5SKsR/7Ca 0fEwBGlRsX19XKZloceiI31RzYEyfKLRLDBbQpHELiP2K1ecT4zWDmMqobSNrvCeHWnqf iOgNhUi44yEWA5IrHEn1TTxL7jFlo+jE2TD8jdPavDsKCGVDOEFZ4pb2Wu+HAUQbpYFZH UPHpLoPT/RH1z+5DaASFd9QUnufNc0v1tkg01RabPMXudWtUPXmiermrLCgGe43a6KA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=gsELEOqo; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E01C9606A32C for ; Thu, 19 Nov 2026 14:40:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=gsELEOqo Received: by smtp.kernel.org (Postfix) with ESMTPSA id B425A1F000CB; Thu, 19 Nov 2026 14:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795099216; bh=l4djkzuotSHxPcSdmInnzog3SsAoFsGR08l0O9g8758=; h=From:To:Cc:Subject:Date:Reply-To; b=gsELEOqowcjLOt6F4Md6pExG0ElK2vTu5Sk+LSIfPuRh142IjV+K3z7OpqMnsBdFq AoQDHJEvHeibolSSY/gGJv6kUpRQvBb5XwgkeDavwrvhwAsDQ6ZxE4DCGYLniPbTau kgjqrr5muM9Gxu1YxsLvp24JrA3ERHU+frxfbWU0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99385: smb: client: fix buffer overflow in SMB2_tcon() Date: Thu, 19 Nov 2026 15:24:43 +0100 Message-ID: <2026111954-CVE-2026-99385-2edb@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3360; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=erxG64Yom7yxMQaVFNrkjbqueYSV63E6o5rHXZrcbm4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2ar0+OKVDPOrU9fdXrgjx91CYEbdAe4jPK9X1860N v+xdEV3RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkR4NhNsvUyhvHgvcHeS30 krystNyAM9FPi2F+xlQHXeOrkq7+UyNXBWp12K3f9OQmAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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] The Linux kernel CVE team has assigned CVE-2026-99385 to this issue. Affected and fixed versions =========================== Issue introduced in 3.8 with commit 62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1 and fixed in 6.12.117 with commit 75fd4c72aa3dcfabb318144636f416be6796d423 Issue introduced in 3.8 with commit 62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1 and fixed in 6.18.61 with commit acf25a7be39dccdbf60fdf3d437dd7832fa4b6d3 Issue introduced in 3.8 with commit 62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1 and fixed in 7.3.2 with commit d26f7fbca42532c6c79efdceb4bd5198e1849314 Issue introduced in 3.8 with commit 62a1a439e0fdd4ec8a80dc00fcbb9f26b5c34de1 and fixed in 7.4-rc1 with commit 73cc469b0ff7551f8537ea919709973e6dc4f514 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-99385 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/smb/client/smb2pdu.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: 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