CVE-2026-99427: smb: client: fix OOB last_entry pointer from unbounded LastNameOffset

Published Nov 19, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix OOB lastentry pointer from unbounded LastNameOffset

CIFSFindFirst() and CIFSFindNext() locate the last entry of a TRANS2FINDFIRST2 or TRANS2FINDNEXT2 response by adding the LastNameOffset of the response parameters to the start of the data area, and store the result in psrchinf->lastentry. MS-CIFS 2.2.6.2.2 defines that offset as the offset of the entry's file name; the client follows the reading of NT and Samba servers, which point it at the entry. LastNameOffset is only checked against CIFSMaxBufSize, which says nothing about the response actually received: validatet2() lets the data area start up to 1024 bytes into the buffer, and SendReceive() copies at most CIFSMaxBufSize + MAXCIFSHDRSIZE bytes of a response, 16468 by default, into a cifsrequest allocation of CIFSMaxBufSize + MAXSMB2HDRSIZE bytes, 16588 by default. The pointer itself can therefore be placed anywhere from the end of the received data to 820 bytes past the end of the allocation.

The read through that pointer is far larger than its displacement. findcifsentry() hands lastentry to cifssaveresumekey() after every FindNext and after the FindFirst of a search rewind, and cifsfilldirent() takes the length of the name from the entry itself: a le32 FileNameLength for most levels, a u8 for SMBFINDFILEINFOSTANDARD, and for SMBFINDFILEUNIX the result of a scan for the terminating NUL over up to PATHMAX + 1 UTF-16 units. The name is recorded as the resume name of the search, and the next CIFSFindNext() rejects only a recorded length of PATHMAX or more before copying the name into the ResumeFileName of its request and sending it with the resume key taken from the same entry: up to 4 KiB of memory from past the end of the allocation leaks to the server, and for SMBFINDFILEUNIX the NUL scan runs about twice as far before the length is even known. The entry does not have to lie outside the response for that either: a maximal response ends about 120 bytes before the end of the allocation, so an entry in its last bytes with a name just under PATHMAX has nearly all of that name copied from past the allocation.

It needs nothing unusual from the client: a FindNext response that reports no entries and does not end the search makes findcifsentry() send the next FindNext at once, carrying whatever was parsed at LastNameOffset, and a search rewind can do the same after its FindFirst. SMB1 is not negotiated by default: this takes a malicious or compromised server, a mount of it with an explicit vers=1.0, which CONFIGCIFSALLOWINSECURELEGACY (default y) permits, and a directory listing on that mount.

With KASAN enabled, a response that places the last entry past the buffer, with a large DataOffset and a LastNameOffset near the end of its range, gives:

================================================================== BUG: KASAN: slab-out-of-bounds in cifssaveresumekey.isra.0+0x7aa/0x7f0 Read of size 4 at addr ffff88807b55c33b by task ls/83

CPU: 1 UID: 0 PID: 83 Comm: ls Not tainted 7.3.0-rc4-00457-gf14572c203d5 #69 PREEMPT(lazy) Call Trace: <TASK> kasanreport+0xdf/0x1a0 cifssaveresumekey.isra.0+0x7aa/0x7f0 cifsreaddir+0x1ed6/0x29c0 iteratedir+0x1c0/0x570 x64sysgetdents64+0x133/0x270 dosyscall64+0x109/0x5d0 entrySYSCALL64afterhwframe+0x77/0x7f </TASK>

Allocated by task 83 on cpu 0 at 19.317556s: cifsbufget+0x36/0x90 smbinit+0x4f/0x110 CIFSFindNext+0xf7/0x14c0 cifsreaddir+0xf51/0x29c0

The buggy address belongs to the object at ffff88807b558000 which belongs to the cache cifsrequest of size 16588 The buggy address is located 623 bytes to the right of allocated 16588-byte region [ffff88807b558000, ffff88807b55c0cc) ==================================================================

The four bytes read there are the FileNameLength of the entry, which cifsfilldirent() tak ---truncated---

Affected Software

6 affected componentsFixes available
linux/kernel>=2.6.25.19<2.6.26
2.6.26
linux/kernel>=2.6.26.7<2.6.27
2.6.27
linux/kernel>=2.6.27.2<2.6.28
2.6.28
linux/kernel>=2.6.28<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.61
6.18.61
linux/kernel>=6.19.0<7.3.2
7.3.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 2.6.26
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 2.6.27
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 2.6.28
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.61
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.2

Event History

Nov 19, 2026
CVE Published
via MITRE·02:40 PM
Data Sourced
via MITRE·02:40 PM
Description
Data Sourced
via OSV·02:40 PM
DescriptionAffected Software
Data Sourced
via NVD·03:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203