PT-2026-151638

CVE-2026-99427

·

Publicado

2026-11-19

·

Atualizado

2026-11-19

Descrição por

Pontuação
N/A
Não disponível

Não há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.

In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix OOB last entry pointer from unbounded LastNameOffset
CIFSFindFirst() and CIFSFindNext() locate the last entry of a TRANS2 FIND FIRST2 or TRANS2 FIND NEXT2 response by adding the LastNameOffset of the response parameters to the start of the data area, and store the result in psrch inf->last entry. 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: validate t2() lets the data area start up to 1024 bytes into the buffer, and SendReceive() copies at most CIFSMaxBufSize + MAX CIFS HDR SIZE bytes of a response, 16468 by default, into a cifs request allocation of CIFSMaxBufSize + MAX SMB2 HDR SIZE 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. find cifs entry() hands last entry to cifs save resume key() after every FindNext and after the FindFirst of a search rewind, and cifs fill dirent() takes the length of the name from the entry itself: a le32 FileNameLength for most levels, a u8 for SMB FIND FILE INFO STANDARD, and for SMB FIND FILE UNIX the result of a scan for the terminating NUL over up to PATH MAX + 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 PATH MAX 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 SMB FIND FILE UNIX 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 PATH MAX 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 find cifs entry() 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 CONFIG CIFS ALLOW INSECURE LEGACY (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 cifs save resume key.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: kasan report+0xdf/0x1a0 cifs save resume key.isra.0+0x7aa/0x7f0 cifs readdir+0x1ed6/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 0 at 19.317556s: cifs buf get+0x36/0x90 smb init+0x4f/0x110 CIFSFindNext+0xf7/0x14c0 cifs readdir+0xf51/0x29c0

The buggy address belongs to the object at ffff88807b558000 which belongs to the cache cifs request 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 cifs fill dirent() tak ---truncated---
Fornecedores
Produtos afetados
Identificadores relacionados
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾