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=1795100574; b=ElRudTTpXPIvbyJ/ffhauUBJmnhUHaP18n+uzqs22XVKao28dFVabd0kuepv0E6HjqCc 0G9c7Rgp4n2nO3m60upfIMlMT9FBHKBD4U/wyEZ5TOJcEJAQZguEN5ZiFvShDA40WxfTN DjGBIuyZT4h0fbiD1IuEpqN9hOT5V3XNigxIwP0mXXLd5O0BvVDVQJQsUtPlquToZcZCD ipyu04KpFx3Lpo7TIwZboMbufi/botPW9z2hTb4nSqFLqoNizBB/7sP3McifZfMRQZH3y e0hIqY2p5i2y1eBW7HW3RWBP7thCjHdLuZbRvEO/v/mAgbybJW5j3kNgd00UjonGa2A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795100574; 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=rj2vGBazm21pNLUJCKkSBB7tMQYYe7wJIvigT+pZ8TA=; b=KmGIKH/SsfWDM1QvxMpjFuIi36MvX4r6JHXctPwpMylO83IsCKZVCgy88hiLrunaYOSh 1AhAtRa5VhzB8sNs0krjbtBhik5auSqQU4Wu5dnLNWLqWAEPWLoKH+73ORItZ0bVd3XNW U68zxBITnsVR4jhSgFhwwQt7fDAwmhJul/Q30A7LqtbRM6cPT340dGylI9PiBTLzKup9j kGt7QzFIHIZFp9k1dxCR4FOGKtKectlh7WcZV9TVt7h/HaIrOHsCwUtEyU1jwh1EZmGnb kxURXH65TI3ZfeB82Qd+N/4d16cvf0x35QEmWs/4v3e5EJIMuyTS/7GSYjY/xS7YZCQ== 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="CXL238E/"; 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 934DF606A32C for ; Thu, 19 Nov 2026 15:02:54 +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=CXL238E/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id D56981F000C8; Thu, 19 Nov 2026 15:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795100574; bh=rj2vGBazm21pNLUJCKkSBB7tMQYYe7wJIvigT+pZ8TA=; h=From:To:Cc:Subject:Date:Reply-To; b=CXL238E/lylIWTWPVUgOI9DhDtFGJ/whhowcfy2uRBp0F9vNtwS8hD8wouiIBTT8x BmjghijfXrb4tkuBKG3fnp87llvi0FvH20gBm5XwQnhWIg6bGJ9Cz0Q/00zluPPN5T zlKndeQjsF3qhLfTcOlPT5V5aVzed8UcOochk1lU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99526: smb: client: fix use-after-free infoleak via the readdir resume name Date: Thu, 19 Nov 2026 15:27:04 +0100 Message-ID: <2026111921-CVE-2026-99526-acd4@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=5905; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=c3EKKgxnZtdkYHLdmlhdy30aZ9DOUqmk1Yx1pveiV2I=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2aZmPb4dK8c+e/4+50KZrY81qnvy+pcVVQjOasmaa OvxkndCRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenANxkYYZ5Vl+lLvUdODej5IXO Kq1zQYvm/hJpYVjQ0jlDJL1M33D9uuA02zTlCp7mu5EA 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 use-after-free infoleak via the readdir resume name CIFSFindNext() copies the resume name that cifs_save_resume_key() recorded from the last entry of the previous response into its request; psrch_inf->presume_name points into the response buffer that entry came from, and nothing ever clears it. find_cifs_entry() records a new name only from a response with a usable last entry, and cifs_readdir() only from an entry it walks to, so a response that carries no entries and leaves last_entry NULL, because CIFSFindFirst() or CIFSFindNext() rejected LastNameOffset, refreshes neither and presume_name keeps pointing into the previous response. That buffer has already been released: by CIFSFindNext() before it installs the new response, or by find_cifs_entry() when it rewinds the search, which does not drop the name either and can then fail in initiate_cifs_search() before a new response replaces it. The next CIFSFindNext() then copies up to PATH_MAX - 1 bytes of the resume name out of the released buffer into its request and sends them to the server: a use-after-free read that leaks kernel memory to a malicious or compromised server, which can provoke it with a single FindNext response that carries no entries and a LastNameOffset above CIFSMaxBufSize, which is all the existing check rejects. With KASAN enabled, a server that answers a listing that way gives: CIFS: VFS: ignoring corrupt resume name ================================================================== BUG: KASAN: slab-use-after-free in CIFSFindNext+0x8ca/0x14c0 Read of size 4080 at addr ffff88807c823f98 by task ls/83 CPU: 0 UID: 0 PID: 83 Comm: ls Tainted: G B 7.3.0-rc4-00457-gf14572c203d5 #69 PREEMPT(lazy) Tainted: [B]=BAD_PAGE Call Trace: kasan_report+0xdf/0x1a0 kasan_check_range+0x10f/0x1e0 __asan_memcpy+0x23/0x60 CIFSFindNext+0x8ca/0x14c0 cifs_readdir+0xf51/0x29c0 iterate_dir+0x1c0/0x570 __x64_sys_getdents64+0x133/0x270 do_syscall_64+0x109/0x5d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Allocated by task 83 on cpu 1 at 13.497119s: cifs_buf_get+0x36/0x90 smb_init+0x4f/0x110 CIFSFindNext+0xf7/0x14c0 cifs_readdir+0xf51/0x29c0 Freed by task 83 on cpu 0 at 13.584018s: cifs_buf_release+0x41/0x80 CIFSFindNext+0xfce/0x14c0 cifs_readdir+0xf51/0x29c0 The buggy address is located 16280 bytes inside of freed 16588-byte region [ffff88807c820000, ffff88807c8240cc) ================================================================== The same memcpy() first reads past the end of that object while it is still live, a slab-out-of-bounds read that the following patches bound; that is the taint the report above carries. SMB1 is not negotiated by default; reaching this code requires an explicit vers=1.0 mount. Clear presume_name and resume_name_len whenever a new response is installed and when the rewind path releases the search buffer, so that the name never outlives the buffer it points into, and reset resume_key with them, since it was taken from the same entry and would otherwise be sent with an empty name. A response without a usable last entry then continues the search with an empty resume name rather than a stale one; CIFSFindNext() skips the copy of a zero-length name so that it never runs on the NULL pointer. The next patch in the series leaves last_entry NULL for a response that carries no entries, and bounds LastNameOffset against the received response rather than against CIFSMaxBufSize. Responses that are given a last entry today then take the path fixed here, so that patch must not be applied without this one. The Linux kernel CVE team has assigned CVE-2026-99526 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.117 with commit 8c8f8029fe07634b626e96472b584b29a33993b8 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.61 with commit 6c4c12b0fadcb71e4e6616e6c1ca529c772f2a15 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.3.2 with commit a3481ed0aea2fc41a6d892a586b6eb7a97662034 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.4-rc1 with commit 59131dd72f62b198fc9ea1489ad9d3573154f684 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-99526 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/cifssmb.c 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/8c8f8029fe07634b626e96472b584b29a33993b8 https://git.kernel.org/stable/c/6c4c12b0fadcb71e4e6616e6c1ca529c772f2a15 https://git.kernel.org/stable/c/a3481ed0aea2fc41a6d892a586b6eb7a97662034 https://git.kernel.org/stable/c/59131dd72f62b198fc9ea1489ad9d3573154f684