Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B2F54A6CFD for ; Thu, 24 Sep 2026 16:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790265832; cv=none; b=MYLfW3lWuxg6oi82rUkoL/wvoxR866Dc7vzJVUASmgLdGtmE/+qej0tDvHAp36O0uW6KOp7qLlqDH1iJHyURU6HCtN5o7q/cpfS4ujgTUubRLrQhPCqwaatG0HoFtHGOBGGrn1vRQyMoDRz6/k1wk8PdiW6JzEBvfIQl4fR3XFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790265832; c=relaxed/simple; bh=QE302GthASeyFwOwZoiUVMZzHUupCTFJ2pjcEIGKBDU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NSzBSh4dKUTIvm4b0zXYiwWHBQd06XNCw3RoXUWzS1aL9qAkvPxMSyIxcv7fcdpVGAKI57OpgA6iPBycz1BdsuYiEdTCgiP8OdueqzhmAX6gRdBnTd37RqcAgsgMkzT6+sSIBC8geESz773diePieyqRxsDDVdyKPq+yRc54uFA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DWQPzpqD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DWQPzpqD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72EA51F000FF; Thu, 24 Sep 2026 16:03:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790265831; bh=vN3b6WLbWIq6TmKDDWQcxqyFtL/5JPRY7E0MjPLjY20=; h=From:To:Cc:Subject:Date:Reply-To; b=DWQPzpqDPZEs/0ILrzNvMNfPFz/d7oB1aPAcY+Cni5CtEPnI1ciwYnaPAAl2ZtQlb /uHyyCHfdG+EiaU0MK/L+KSXpTk+L7/9qiw2FR8bvzlEbUsuU7x3CF+04PCG2L15yh 8hWAb3saW2iOJQqmR00d7Q5k/hBHGNBxMXvtT0q4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-93787: smb: client: bound dirent name against end of SMB response in cifs_filldir Date: Thu, 24 Sep 2026 18:02:23 +0200 Message-ID: <2026092416-CVE-2026-93787-dc1a@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3370; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=G//vX9C8/sOLoKCiwUiEvL3IbU5hFOUSSubByoxyR2c=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlbPTsC/QKizji2lZhLPfx8vo6HV/WGUP/Cg88anqUJZ kXm+P/oiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlsKmZYMF3424oVii7mFZKZ /zQzmf9mHUm9zrBgof99hY0XP/hqLFVrfLhXWGXnnXe2AA== 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: bound dirent name against end of SMB response in cifs_filldir cifs_filldir() copies the entry name out of an SMB1 TRANS2_FIND_FIRST / FIND_NEXT response using a length (de.namelen) supplied by the server. The kmalloc'd SMB response buffer is bounded, but nothing checks that de.name + de.namelen still lies inside that buffer before the eventual filldir64() -> verify_dirent_name() -> memchr() reads namelen bytes. A hostile SMB1 server that returns an oversized FileNameLength in a directory entry therefore causes memchr() to read past the end of the response slab buffer. Reachable from any user who can list a directory on a CIFS mount served by an attacker-controlled server (getdents64() on the mounted directory): BUG: KASAN: slab-out-of-bounds in memchr+0x71/0x80 Read of size 1 at addr ffff88800e0640cc by task poc/115 Call Trace: dump_stack_lvl+0x64/0x80 print_report+0xce/0x620 kasan_report+0xec/0x120 memchr+0x71/0x80 filldir64+0x4c/0x6a0 cifs_filldir.constprop.0+0x9bb/0x1e00 cifs_readdir+0x2101/0x3380 iterate_dir+0x19c/0x520 __x64_sys_getdents64+0x126/0x210 do_syscall_64+0x107/0x5a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Pass the end-of-response pointer down to cifs_filldir() and reject entries whose name would extend past that boundary. This bug was discovered by Artiphishell's vTriage pipeline, which generated a userspace reproducer (an emulated hostile SMB1 server plus a getdents64() client) that reliably triggers the KASAN report on an unpatched kernel. The fix below was drafted with the Claude coding assistant; a userspace reproducer is available on request. The Linux kernel CVE team has assigned CVE-2026-93787 to this issue. Affected and fixed versions =========================== Fixed in 6.12.111 with commit 6e3b965267b7313903baba2739992b1e2e92d540 Fixed in 6.18.53 with commit 03003506c86f90312b0966283662c42fcab66e4b Fixed in 7.2 with commit f8cf09a53a0dc1da298e9dd0ba5f21710cf119d6 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-93787 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/readdir.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/6e3b965267b7313903baba2739992b1e2e92d540 https://git.kernel.org/stable/c/03003506c86f90312b0966283662c42fcab66e4b https://git.kernel.org/stable/c/f8cf09a53a0dc1da298e9dd0ba5f21710cf119d6