CVE-2026-89637

smb: client: fix UAF and buffer leak in cifs_check_trans2() for malformed secondary T2

Published Sep 11, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix UAF and buffer leak in cifs_check_trans2() for malformed secondary T2

When a valid primary TRANSACT2 response has been received (mid->resp_buf
set, mid->multiRsp true) and a subsequent secondary response causes
cifs_check_trans2() to return false -- either because the SMB header is
invalid (malformed != 0) or because check2ndT2() rejects the PDU --
handle_mid() overwrites mid->resp_buf with the new buffer (leaking the
primary buffer) and, because mid->multiRsp is set, skips the
server->smallbuf/bigbuf NULL-out. When the user thread frees
mid->resp_buf, server->smallbuf or server->bigbuf is left dangling; the
demux thread reuses it for the next packet, resulting in a use-after-free.

Combine both early-exit conditions and, when mid->multiRsp is already
set, abort the pending transaction inline: set multiEnd, call
dequeue_mid() with malformed=true, and return true so handle_mid() exits
without touching mid->resp_buf or the server buffer pointers.

Analysis

AI-generated

Technical impact

A malformed secondary SMB transaction can trigger a use‑after‑free in the Linux kernel’s CIFS (SMB) client. When a a subsequent malformed secondary response causes cifs_check_trans2() to return false due to an invalid SMB header or a rejected PDU, the client logic new buffer, leaving server->smallbuf/bigbuf dangling. The demultiplexer thread later reuses that memory for the next packet, creating a dangling pointer that can be exploited. The flaw arises from improper handling of buffer references and is identified by CWE‑825.

Affected Systems

The flaw resides in the Linux kernel’s CIFS (SMB) client implementation. Any kernel that includes CIFS client support and lacks the patch applied in the recent commit is vulnerable. Versions preceding the patched release are at risk until updated.

Risk and Exploitability

The CVSS score is 9.8, indicating catastrophic is < 1%, implying a very low exploitation probability under current threat landscape. The vulnerability is not listed in CISA's KEV catalog. The CVE description indicates a use‑after‑free is triggered by malformed secondary SMB responses. Based on the description, it is inferred that an attacker could send crafted SMB replies from a malicious SMB server to a vulnerable client over the network, exposing only systems that accept SMB traffic. be treated as high risk, albeit with low likelihood of exploitation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel update that contains the cifs_check_trans2 patch or backport the fix to older kernels
  • Restrict SMB traffic to limit exposure to malicious SMB servers
  • If CIFS client support is unnecessary, disable it in the kernel configuration

Generated by OpenCVE AI on September 15, 2026 at 21:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-9002-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H'}

cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: smb: client: fix UAF and buffer leak in cifs_check_trans2() for malformed secondary T2 When a valid primary TRANSACT2 response has been received (mid->resp_buf set, mid->multiRsp true) and a subsequent secondary response causes cifs_check_trans2() to return false -- either because the SMB header is invalid (malformed != 0) or because check2ndT2() rejects the PDU -- handle_mid() overwrites mid->resp_buf with the new buffer (leaking the primary buffer) and, because mid->multiRsp is set, skips the server->smallbuf/bigbuf NULL-out. When the user thread frees mid->resp_buf, server->smallbuf or server->bigbuf is left dangling; the demux thread reuses it for the next packet, resulting in a use-after-free. Combine both early-exit conditions and, when mid->multiRsp is already set, abort the pending transaction inline: set multiEnd, call dequeue_mid() with malformed=true, and return true so handle_mid() exits without touching mid->resp_buf or the server buffer pointers.
Title smb: client: fix UAF and buffer leak in cifs_check_trans2() for malformed secondary T2
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-825

    Expired Pointer Dereference

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 8:50 AM
Reserved
Sep 11, 2026, 7:38 PM
Status
Received
Published
Sep 11, 2026, 8:19 PM
Modified
Oct 19, 2026, 9:18 AM
Severity
Important
Public date
Sep 11, 2026, 7:45 PM