# CVE-2025-21673: smb: client: fix double free of TCP\_Server\_Info::hostname

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.77% (percentile 52, 2026-11-28)
- **CWE:** CWE-415
- **Published:** 2025-01-31T11:25:35.922Z
- **Modified:** 2026-10-30T13:17:51.270Z

## Who should check

- Anyone running Linux \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< 35455f6c9326a8d10e91f3d5ba9260ab795b7d9a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< 1ea68070338518a1d31ce71e6abfe1b30001b27a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< a2be5f2ba34d0c6d5ef2624b24e3d852561fcd6a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< fa2f9906a7b333ba757a7dbae0713d8a5396186e; 49f933bb3016269dc50074eac5f6033d127644f1; 1c35a216ef77db708178ca225d796271f2f60a7a; \>= 5.14.19, \< 5.15; \>= 5.15.3, \< 5.16
- Anyone running Linux 5.16

## Description

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 and fixed versions

- Linux: \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< 35455f6c9326a8d10e91f3d5ba9260ab795b7d9a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< 1ea68070338518a1d31ce71e6abfe1b30001b27a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< a2be5f2ba34d0c6d5ef2624b24e3d852561fcd6a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< fa2f9906a7b333ba757a7dbae0713d8a5396186e; 49f933bb3016269dc50074eac5f6033d127644f1; 1c35a216ef77db708178ca225d796271f2f60a7a; \>= 5.14.19, \< 5.15; \>= 5.15.3, \< 5.16 (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- Upgrade Linux to 5.16 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21673. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21673.md
Affected: Linux >= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, < 35455f6c9326a8d10e91f3d5ba9260ab795b7d9a; >= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, < 1ea68070338518a1d31ce71e6abfe1b30001b27a; >= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, < a2be5f2ba34d0c6d5ef2624b24e3d852561fcd6a; >= 7be3248f313930ff3d3436d…
Fixed in: Linux 35455f6c9326a8d10e91f3d5ba9260ab795b7d9a, Linux 1ea68070338518a1d31ce71e6abfe1b30001b27a, Linux 5.15, Linux 5.16

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21673 being exploited?

There is no confirmed exploitation: CVE-2025-21673 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.77% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2025-21673?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-21673?

Linux \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< 35455f6c9326a8d10e91f3d5ba9260ab795b7d9a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< 1ea68070338518a1d31ce71e6abfe1b30001b27a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< a2be5f2ba34d0c6d5ef2624b24e3d852561fcd6a; \>= 7be3248f313930ff3d3436d4e9ddbe9fccc1f541, \< fa2f9906a7b333ba757a7dbae0713d8a5396186e; 49f933bb3016269dc50074eac5f6033d127644f1; 1c35a216ef77db708178ca225d796271f2f60a7a; \>= 5.14.19, \< 5.15; \>= 5.15.3, \< 5.16; Linux 5.16.

### Is there a fix for CVE-2025-21673?

Yes. Fixed in Linux 35455f6c9326a8d10e91f3d5ba9260ab795b7d9a, Linux 1ea68070338518a1d31ce71e6abfe1b30001b27a, Linux 5.15, Linux 5.16. Upgrade Linux to 5.16 or later.

### How do I check if I'm affected by CVE-2025-21673?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/1ea68070338518a1d31ce71e6abfe1b30001b27a>
- patch: <https://git.kernel.org/stable/c/a2be5f2ba34d0c6d5ef2624b24e3d852561fcd6a>
- patch: <https://git.kernel.org/stable/c/fa2f9906a7b333ba757a7dbae0713d8a5396186e>
- other: <https://git.kernel.org/stable/c/35455f6c9326a8d10e91f3d5ba9260ab795b7d9a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21673>

HTML: <https://flawdb.com/CVE-2025-21673> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21673>
