In the Linux kernel, the following vulnerability has been resolved:
smb: client: restore the data_offset bound in is_valid_oplock_break()
Commit 83bfbd0bb902 ("cifs: Remove the RFC1002 header from smb_hdr")
changed the quantity this bound is measured against. It used to be
srv->total_read minus the 4-byte RFC1002 preamble that total_read then
included, so it was the SMB message length. The same commit stopped
counting the preamble, and the mechanical substitution to
srv->total_read - srv->pdu_size left an expression that is identically
zero: standard_receive3() reads MID_HEADER_SIZE() bytes and then exactly
pdu_length - MID_HEADER_SIZE() more, adding both to total_read.
len is therefore 0, the subtraction below it wraps, and no __u32
DataOffset can exceed the result, so the check from commit 097f5863b1a0
("cifs: read overflow in is_valid_oplock_break()") no longer rejects
anything. Use total_read, which is now the message length on its own.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS Score: 9.1
AV:N - The flaw is in the in-kernel SMB1 client demultiplex path: a remote peer sends an unsolicited SMB_COM_NT_TRANSACT response over TCP/445 and cifs_demultiplex_thread() calls is_valid_oplock_break() on unmatched frames, so a malicious or compromised SMB server (or MITM) reaches it via network protocol data.
AC:L - The attacker fully controls Command, Flags, ByteCount, and DataOffset in a single unsolicited frame; the broken bound wraps so any DataOffset is accepted and the resulting heap over-read is deterministic, with no race or condition the attacker cannot influence once the client is on the SMB1 connection.
PR:N - A matching MID, session setup, or tree connect is not required: after negotiate, an unmatched NT_TRANSACT+RESPONSE frame is treated as an oplock/dnotify break before authentication, so the malicious server needs no credentials or privileges on the client host.
UI:N - On a persistent SMB1 mount (cifsroot, automount, or an already-mounted legacy NAS share) the cifsd thread processes unsolicited frames after the existing connection or reconnect, so no additional victim action is required at attack time.
S:U - The out-of-bounds/use-after-free read occurs in kernel heap used by the CIFS client on the same host kernel security authority and does not cross a VM, IOMMU, or sandbox boundary.
C:H - Attacker-controlled DataOffset displaces file_notify_information into adjacent or freed cifs_small_rq slab objects (KASAN use-after-free read), and printing FileName with %s can walk unbounded kernel memory, so the disclosure is not limited to a few bounded bytes.
I:N - The displaced pointer is only read (Action and FileName for a debug print); the bug does not write through that pointer or otherwise provide a kernel memory-modification or control-flow primitive.
A:H - The KASAN-confirmed slab use-after-free and unmapped over-read run in the cifsd demultiplex thread and can oops or panic the kernel, and a malicious peer can repeat the unsolicited frame to retrigger the crash.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
None |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The flaw is in the in-kernel SMB1 client demultiplex path: a remote peer sends an unsolicited SMB_COM_NT_TRANSACT response over TCP/445 and cifs_demultiplex_thread() calls is_valid_oplock_break() on unmatched frames, so a malicious or compromised SMB server (or MITM) reaches it via network protocol data.
AC:L - The attacker fully controls Command, Flags, ByteCount, and DataOffset in a single unsolicited frame; the broken bound wraps so any DataOffset is accepted and the resulting heap over-read is deterministic, with no race or condition the attacker cannot influence once the client is on the SMB1 connection.
PR:N - A matching MID, session setup, or tree connect is not required: after negotiate, an unmatched NT_TRANSACT+RESPONSE frame is treated as an oplock/dnotify break before authentication, so the malicious server needs no credentials or privileges on the client host.
UI:N - On a persistent SMB1 mount (cifsroot, automount, or an already-mounted legacy NAS share) the cifsd thread processes unsolicited frames after the existing connection or reconnect, so no additional victim action is required at attack time.
S:U - The out-of-bounds/use-after-free read occurs in kernel heap used by the CIFS client on the same host kernel security authority and does not cross a VM, IOMMU, or sandbox boundary.
C:H - Attacker-controlled DataOffset displaces file_notify_information into adjacent or freed cifs_small_rq slab objects (KASAN use-after-free read), and printing FileName with %s can walk unbounded kernel memory, so the disclosure is not limited to a few bounded bytes.
I:N - The displaced pointer is only read (Action and FileName for a debug print); the bug does not write through that pointer or otherwise provide a kernel memory-modification or control-flow primitive.
A:H - The KASAN-confirmed slab use-after-free and unmapped over-read run in the cifsd demultiplex thread and can oops or panic the kernel, and a malicious peer can repeat the unsolicited frame to retrigger the crash.
CVSS 3.1