Cloudanix VulnDB

CVE-2025-21673

Critical · 9.8

CVSS

9.8

EPSS

0.4%

Published

Jan 31, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Linux kernel's file sharing code can cause the entire system to crash when handling certain network connections to shared folders.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Denial Of Service
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Double free of the hostname field in TCP_Server_Info during CIFS session shutdown when the cifsd thread is still processing DFS reconnections, leading to use-after-free and slab corruption in the kernel.

Why it matters to the business

Kernel crashes or system instability on Linux hosts using SMB/CIFS file shares with DFS, potentially causing unplanned downtime and requiring reboots in environments with heavy network filesystem usage.

How an attack unfolds

An attacker or local process triggers CIFS session termination conditions while the cifsd demultiplex thread is inside the reconnection loop for multiple DFS targets; the hostname pointer is freed once during shutdown and again when extract_hostname runs, resulting in slab double-free and kernel panic.

How to fix it

Upgrade the Linux kernel to a version containing commit 1ea68070338518a1d31ce71e6abfe1b30001b27a or later stable releases that include the fix for double-free of TCP_Server_Info::hostname in the CIFS client.

How to confirm the fix worked

Verify the running kernel git commit or version contains 1ea68070338518a1d31ce71e6abfe1b30001b27a; reproduce DFS reconnection scenarios and confirm absence of slab double-free oops in dmesg during cifs_put_tcp_session shutdown.

Typical attack path

  1. Mount or access an SMB share configured with DFS namespaces
  2. Trigger conditions that cause cifs_put_tcp_session to run while reconnections are active
  3. Force the cifsd thread to execute __reconnect_target_unlocked and extract_hostname after the first free
  4. Trigger the second free leading to __slab_free invalid operation and kernel oops

How to detect it

Search kernel logs and dmesg for oops traces containing __slab_free combined with cifs functions such as extract_hostname, __reconnect_target_unlocked, reconnect_dfs_server, or cifs_demultiplex_thread; look for RIP patterns matching slab free invalid operations during session shutdown.

  • __reconnect_target_unlocked+0x3e/0x160 [cifs]
  • extract_hostname+0x5c/0xa0 [cifs]
  • reconnect_dfs_server+0x145/0x430 [cifs]
  • cifs_handle_standard+0x1ad/0x1d0 [cifs]
  • __slab_free+0x223/0x3c0

What your security team should do

  • Apply the referenced kernel commit or newer stable branch immediately on all systems using the CIFS client
  • Monitor for kernel oops involving cifs and __slab_free in production logs
  • Limit use of DFS namespaces over CIFS until patches are deployed if possible

The record

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix double free of TCP_Server_Info::hostname When shutting down the server in cifs_put_tcp_session(), cifsd thread might be reconnecting to multiple DFS targets before it realizes it should exit the loop, so @server->hostname can't be freed as long as cifsd thread isn't done. Otherwise the following can happen: RIP: 0010:__slab_free+0x223/0x3c0 Code: 5e 41 5f c3 cc cc cc cc 4c 89 de 4c 89 cf 44 89 44 24 08 4c 89 1c 24 e8 fb cf 8e 00 44 8b 44 24 08 4c 8b 1c 24 e9 5f fe ff ff <0f> 0b 41 f7 45 08 00 0d 21 00 0f 85 2d ff ff ff e9 1f ff ff ff 80 RSP: 0018:ffffb26180dbfd08 EFLAGS: 00010246 RAX: ffff8ea34728e510 RBX: ffff8ea34728e500 RCX: 0000000000800068 RDX: 0000000000800068 RSI: 0000000000000000 RDI: ffff8ea340042400 RBP: ffffe112041ca380 R08: 0000000000000001 R09: 0000000000000000 R10: 6170732e31303000 R11: 70726f632e786563 R12: ffff8ea34728e500 R13: ffff8ea340042400 R14: ffff8ea34728e500 R15: 0000000000800068 FS: 0000000000000000(0000) GS:ffff8ea66fd80000(0000) 000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc25376080 CR3: 000000012a2ba001 CR4: PKRU: 55555554 Call Trace: <TASK> ? show_trace_log_lvl+0x1c4/0x2df ? show_trace_log_lvl+0x1c4/0x2df ? __reconnect_target_unlocked+0x3e/0x160 [cifs] ? __die_body.cold+0x8/0xd ? die+0x2b/0x50 ? do_trap+0xce/0x120 ? __slab_free+0x223/0x3c0 ? do_error_trap+0x65/0x80 ? __slab_free+0x223/0x3c0 ? exc_invalid_op+0x4e/0x70 ? __slab_free+0x223/0x3c0 ? asm_exc_invalid_op+0x16/0x20 ? __slab_free+0x223/0x3c0 ? extract_hostname+0x5c/0xa0 [cifs] ? extract_hostname+0x5c/0xa0 [cifs] ? __kmalloc+0x4b/0x140 __reconnect_target_unlocked+0x3e/0x160 [cifs] reconnect_dfs_server+0x145/0x430 [cifs] cifs_handle_standard+0x1ad/0x1d0 [cifs] cifs_demultiplex_thread+0x592/0x730 [cifs] ? __pfx_cifs_demultiplex_thread+0x10/0x10 [cifs] kthread+0xdd/0x100 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x29/0x50 </TASK>

Affected packages

Ecosystem Package Introduced Fixed
Debian:12 linux 0 No fix
Debian:13 linux 0 6.12.11-1
Linux Kernel 5.16.0 6.6.74
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.42.2
SUSE:Linux Enterprise Live Patching 12 SP5 kernel-default 0 4.12.14-122.250.1
SUSE:Linux Enterprise Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_66 0 1-8.3.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.42.2
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_9 0 1-150600.1.3.2
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_9 0 1-150600.13.3.4
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-64kb 0 6.4.0-150600.23.42.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default 0 6.4.0-150600.23.42.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default-base 0 6.4.0-150600.23.42.2.150600.12.18.4
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-source 0 6.4.0-150600.23.42.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-zfcpdump 0 6.4.0-150600.23.42.2
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-coco 0 6.4.0-15061.15.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-coco_debug 0 6.4.0-15061.15.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-source-coco 0 6.4.0-15061.15.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-syms-coco 0 6.4.0-15061.15.coco15sp6.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-docs 0 6.4.0-150600.23.42.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-obs-build 0 6.4.0-150600.23.42.2
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-source 0 6.4.0-150600.23.42.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-syms 0 6.4.0-150600.23.42.1
SUSE:Linux Enterprise Module for Legacy 15 SP6 kernel-default 0 6.4.0-150600.23.42.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-azure 0 6.4.0-150600.8.31.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-source-azure 0 6.4.0-150600.8.31.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-syms-azure 0 6.4.0-150600.8.31.1
SUSE:Linux Enterprise Server 12 SP5-LTSS kernel-default 0 4.12.14-122.250.1
SUSE:Linux Enterprise Server 12 SP5-LTSS kernel-source 0 4.12.14-122.250.1
SUSE:Linux Enterprise Server 12 SP5-LTSS kernel-syms 0 4.12.14-122.250.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 kernel-default 0 4.12.14-122.250.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 kernel-source 0 4.12.14-122.250.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 kernel-syms 0 4.12.14-122.250.1
SUSE:Linux Enterprise Workstation Extension 15 SP6 kernel-default 0 6.4.0-150600.23.42.2
SUSE:Real Time Module 15 SP6 kernel-rt 0 6.4.0-150600.10.29.1
SUSE:Real Time Module 15 SP6 kernel-rt_debug 0 6.4.0-150600.10.29.1
SUSE:Real Time Module 15 SP6 kernel-source-rt 0 6.4.0-150600.10.29.1
SUSE:Real Time Module 15 SP6 kernel-syms-rt 0 6.4.0-150600.10.29.1
openSUSE:Leap 15.6 dtb-aarch64 0 6.4.0-150600.23.42.1
openSUSE:Leap 15.6 kernel-64kb 0 6.4.0-150600.23.42.2
openSUSE:Leap 15.6 kernel-azure 0 6.4.0-150600.8.31.1
openSUSE:Leap 15.6 kernel-debug 0 6.4.0-150600.23.42.2
openSUSE:Leap 15.6 kernel-default 0 6.4.0-150600.23.42.2
openSUSE:Leap 15.6 kernel-default-base 0 6.4.0-150600.23.42.2.150600.12.18.4
openSUSE:Leap 15.6 kernel-docs 0 6.4.0-150600.23.42.1
openSUSE:Leap 15.6 kernel-kvmsmall 0 6.4.0-150600.23.42.2
openSUSE:Leap 15.6 kernel-obs-build 0 6.4.0-150600.23.42.2
openSUSE:Leap 15.6 kernel-obs-qa 0 6.4.0-150600.23.42.1
openSUSE:Leap 15.6 kernel-rt 0 6.4.0-150600.10.29.1
openSUSE:Leap 15.6 kernel-rt_debug 0 6.4.0-150600.10.29.1
openSUSE:Leap 15.6 kernel-source 0 6.4.0-150600.23.42.1
openSUSE:Leap 15.6 kernel-source-azure 0 6.4.0-150600.8.31.1
openSUSE:Leap 15.6 kernel-source-rt 0 6.4.0-150600.10.29.1
openSUSE:Leap 15.6 kernel-syms 0 6.4.0-150600.23.42.1
openSUSE:Leap 15.6 kernel-syms-azure 0 6.4.0-150600.8.31.1
openSUSE:Leap 15.6 kernel-syms-rt 0 6.4.0-150600.10.29.1
openSUSE:Leap 15.6 kernel-zfcpdump 0 6.4.0-150600.23.42.2

Related vulnerabilities