Skip to main content
Network Thinking Solutions Logo

CVE-2025-22077

Linux kernel: Revert "smb: client: fix TCP timers deadlock after rmmod"

All CVEs
CVE-2025-22077Published 4/16/2025

Linux kernel: Revert "smb: client: fix TCP timers deadlock after rmmod"

Vendor advisory
CVSS9.8Critical

Overview

In the Linux kernel, the following vulnerability has been resolved: Revert "smb: client: fix TCP timers deadlock after rmmod" This reverts commit e9f2517a3e18a54a3943c098d2226b245d488801. Commit e9f2517a3e18 ("smb: client: fix TCP timers deadlock after rmmod") is intended to fix a null-ptr-deref in LOCKDEP, which is mentioned as CVE-2024-54680, but is actually did not fix anything; The issue can be reproduced on top of it. [0] Also, it reverted the change by commit ef7134c7fc48 ("smb: client: Fix use-after-free of network namespace.") and introduced a real issue by reviving the kernel TCP socket. When a reconnect happens for a CIFS connection, the socket state transitions to FIN_WAIT_1. Then, inet_csk_clear_xmit_timers_sync() in tcp_close() stops all timers for the socket. If an incoming FIN packet is lost, the socket will stay at FIN_WAIT_1 forever, and such sockets could be leaked up to net.ipv4.tcp_max_orphans. Usually, FIN can be retransmitted by the peer, but if the peer aborts the connection, the issue comes into reality. I warned about this privately by pointing out the exact report [1], but the bogus fix was finally merged. So, we should not stop the timers to finally kill the connection on our side in that case, meaning we must not use a kernel socket for TCP whose sk->sk_net_refcnt is 0. The kernel socket does not have a reference to its netns to make it possible to tear down netns without cleaning up every resource in it. For example, tunnel devices use a UDP socket internally, but we can destroy netns without removing such devices and let it complete during exit. Otherwise, netns would be leaked when the last application died. However, this is problematic for TCP sockets because TCP has timers to close the connection gracefully even after the socket is close()d. The lifetime of the socket and its netns is different from the lifetime of the underlying connection. If the socket user does not maintain the netns lifetime, the timer could be fired after the socket is close()d and its netns is freed up, resulting in use-after-free. Actually, we have seen so many similar issues and converted such sockets to have a reference to netns. That's why I converted the CIFS client socket to have a reference to netns (sk->sk_net_refcnt == 1), which is somehow mentioned as out-of-scope of CIFS and technically wrong in e9f2517a3e18, but **is in-scope and right fix**. Regarding the LOCKDEP issue, we can prevent the module unload by bumping the module refcount when switching the LOCKDDEP key in sock_lock_init_class_and_name(). [2] For a while, let's revert the bogus fix. Note that now we can use sk_net_refcnt_upgrade() for the socket conversion, but I'll do so later separately to make backport easy.

Published
4/16/2025
Last modified
10/15/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
≥ 6.6.68, < 6.6.88

Verify advisory

Source
linux kernel
linux
≥ 6.12.7, < 6.12.25

Verify advisory

Source
linux kernel
linux
≥ 6.13.1, < 6.14.4

Verify advisory

Source
linux kernel
linux
6.13

Verify advisory

Source
linux kernel
linux
6.13

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
linux kernel
linux
6.15

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
Linux
Linux
≥ 906807c734ed219dcb2e7bbfde5c4168ed72a3d0, < 8dbf060480236877703bff0106fc984576184d11

Verify advisory

Source
Linux
Linux
≥ 127e907e11ccd54b59bb78fc22c43ccb76c71079, < f761eeefd531e6550cd3a5c047835b4892acb00d

Verify advisory

Source
Linux
Linux
≥ e9f2517a3e18a54a3943c098d2226b245d488801, < 4b6f6bf1bde8d6045c389fda8d21c304dfe49384

Verify advisory

Source
Linux
Linux
≥ e9f2517a3e18a54a3943c098d2226b245d488801, < 95d2b9f693ff2a1180a23d7d59acc0c4e72f4c41

Verify advisory

Source
Linux
Linux
≥ 6.6.68, < 6.6.88

Verify advisory

Source
Linux
Linux
≥ 6.12.7, < 6.12.25

Verify advisory

Source
Linux
Linux
6.13

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 9.8. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.