PT-2026-151565
CVE-2026-99384
·
Published
2026-11-19
·
Updated
2026-11-19
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix OOB read of the resume name sent in TRANS2 FIND NEXT2
cifs fill dirent() reads the fixed part of a directory entry and the
name length it holds, or for SMB FIND FILE UNIX scans the name for its
terminating NUL, without knowing where the response ends.
cifs save resume key() calls it for the entry at the LastNameOffset the
server chose, after every FindNext and after the FindFirst of a search
rewind, and records the name it returns as the resume name of the
search without bounding it; the next CIFSFindNext() copies up to
PATH MAX - 1 bytes from that name into its request and sends them to
the server. cifs filldir() bounds
the name against the end of the response since
commit f8cf09a53a0d ("smb: client: bound dirent name against end of
SMB response in cifs filldir"), but only after cifs fill dirent() has
read the entry, and nxt dir entry() checks the entries it walks only
against sizeof(FILE DIRECTORY INFO), for every level but
SMB FIND FILE INFO STANDARD, and never sees the first entry of a
response.
Bounding where last entry starts, as the preceding patch does, does
not bound the read. A last entry that starts within the final bytes of
the response still has its fixed part read past the end of the
received data, and the name length it declares, a le32 for every
level but SMB FIND FILE INFO STANDARD and SMB FIND FILE UNIX, is
recorded without being checked against anything. CIFSFindNext()
rejects only a length of PATH MAX or more, then copies the name, up to
4095 bytes, into its request and sends it, and as the report below
shows that copy can run past the end of the cifs request allocation
that holds the response. For SMB FIND FILE UNIX the name is in
addition scanned for its terminating NUL over up to PATH MAX + 1
UTF-16 units, or PATH MAX bytes, before any check. The FindNext that
carries the name is only sent by the SMB1 dialect, which is not
negotiated by default; reaching it requires an explicit vers=1.0
mount.
With KASAN enabled, a response whose last entry declares a name
longer than the bytes that follow it gives:
==================================================================
BUG: KASAN: slab-out-of-bounds in CIFSFindNext+0x8ca/0x14c0
Read of size 4080 at addr ffff88807c823f98 by task ls/83
CPU: 0 UID: 0 PID: 83 Comm: ls Not tainted 7.3.0-rc4-00457-gf14572c203d5 #69 PREEMPT(lazy)
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
The buggy address belongs to the object at ffff88807c820000 which belongs to the cache cifs request of size 16588 The buggy address is located 16280 bytes inside of allocated 16588-byte region [ffff88807c820000, ffff88807c8240cc)
The read is the memcpy() that copies the recorded name into the next
request, so those bytes go to the server.
Pass the end of the response to cifs fill dirent() and have it reject
an entry whose fixed part does not fit or whose name extends past the
end, before either is used, so that both callers are covered;
cifs save resume key() computes the end the same way cifs readdir()
does. The name bound compares the bytes left between the name and the
end with the name length rather than adding the length to the name
pointer, since the length is a 32-bit value taken from the entry and
the sum could wrap on 32-bit systems. cifs fill dirent() is also used
on the SMB2 readdir path; there smb2 parse query directory() has
already checked every entry against the end of the response, so a
vali
---truncated---
Found an issue in the description? Have something to add? Feel free to write us 👾