CVE-2026-139233

ksmbd: fix iface_list use-after-free during server reset

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix iface_list use-after-free during server reset

ksmbd_find_netdev_name_iface_list() walks iface_list for
fsctl_query_iface_info_ioctl(), which holds RTNL. But during server
reset, ksmbd_tcp_destroy() unlinks and frees the entries without RTNL,
and queued SMB requests can still be running at that point. So an
FSCTL_QUERY_NETWORK_INTERFACE_INFO request can therefore race with
interface destruction and dereference a freed entry. With debug-only
instrumentation to make the race deterministic, KASAN reports:

BUG: KASAN: slab-use-after-free in
ksmbd_find_netdev_name_iface_list

ksmbd_find_netdev_name_iface_list
fsctl_query_iface_info_ioctl
smb2_ioctl
handle_ksmbd_work

Freed by:
kfree
ksmbd_tcp_destroy
ksmbd_conn_transport_destroy
kill_server_store

The fix is to detach iface_list to a temporary list under RTNL, then drop
RTNL before cleanup because the following cleanup may block and hold RTNL
for a long time.

Analysis

AI-generated

Technical impact

The vulnerability lies in the Linux kernel Samba SMB server (ksmbd). During a server reset, the ksmbd_tcp_destroy routine unlinks and frees entries from iface_list without holding the required RTNL lock. If an FSCTL_QUERY_NETWORK_INTERFACE_INFO request is processed concurrently, it can walk the now‑freed list, causing a use‑after‑free. Such memory corruption in kernel space can crash the system or provide an avenue for code execution with kernel privileges.

Affected Systems

All Linux kernel installations that include the ksmbd module are potentially affected. The CVE description does not specify a version range, so any kernel version containing the legacy ksmbd code is subject to this flaw.

Risk and Exploitability

The exploit requires an attacker to send an FSCTL_QUERY_NETWORK_INTERFACE_INFO request while the SMB server is resetting, which can be done from any SMB client. No public exploit is known, and the EPSS score is not available, but the absence of a CISA KEV listing suggests the risk is not yet high. Nevertheless, the flaw resides in kernel space, so the impact can be severe if exploited, warranting a high‑risk assessment.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel patch that fixes the ksmbd use‑after‑free bug.
  • If a kernel update is not immediately possible, temporarily disable new SMB client connections while restarting or rebooting the system to avoid the race condition.
  • Consider disabling the ksmbd service entirely if the SMB share is not required.
  • Monitor system logs for kernel panic or KASAN messages that could indicate exploitation attempts.

Generated by OpenCVE AI on November 30, 2026 at 20:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix iface_list use-after-free during server reset ksmbd_find_netdev_name_iface_list() walks iface_list for fsctl_query_iface_info_ioctl(), which holds RTNL. But during server reset, ksmbd_tcp_destroy() unlinks and frees the entries without RTNL, and queued SMB requests can still be running at that point. So an FSCTL_QUERY_NETWORK_INTERFACE_INFO request can therefore race with interface destruction and dereference a freed entry. With debug-only instrumentation to make the race deterministic, KASAN reports: BUG: KASAN: slab-use-after-free in ksmbd_find_netdev_name_iface_list ksmbd_find_netdev_name_iface_list fsctl_query_iface_info_ioctl smb2_ioctl handle_ksmbd_work Freed by: kfree ksmbd_tcp_destroy ksmbd_conn_transport_destroy kill_server_store The fix is to detach iface_list to a temporary list under RTNL, then drop RTNL before cleanup because the following cleanup may block and hold RTNL for a long time.
Title ksmbd: fix iface_list use-after-free during server reset
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-416

    Use After Free

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM