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.
CVSS Details
- CVSS 3.1 Base Score: 9.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade kernel-libbpf-debuginfoUpgrade bpftool-debuginfoUpgrade kernel6.12Upgrade kernel-toolsUpgrade perf6.12Upgrade bpftoolUpgrade kernel6.12-modules-extraUpgrade kernel-livepatch-6.12.25-32.101Upgrade perf6.12-debuginfoUpgrade kernel6.12-debuginfoUpgrade kernel-tools-debuginfoUpgrade kernel-modules-extra-commonUpgrade kernel6.12-debuginfo-common-aarch64Upgrade kernel-develUpgrade kernel-libbpf-staticUpgrade kernel-libbpfUpgrade kernel6.12-debuginfo-common-x86_64Upgrade kernel-tools-develUpgrade kernel-libbpf-develUpgrade python3-perf6.12Upgrade kernel-headersUpgrade python3-perf6.12-debuginfo | Jun 11, 2025 | Apr 16, 2025 |
| Debian | — | Upgrade linux | Jul 23, 2026 | Jul 23, 2026 |
| Huawei Euleros 2_0_sp13 | — | Upgrade bpftoolUpgrade kernelUpgrade python3-perfUpgrade kernel-tools-libsUpgrade kernel-toolsUpgrade kernel-abi-stablelists | Mar 10, 2026 | Mar 10, 2026 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | Apr 16, 2025 |
| Suse | — | Upgrade kernel-rt-optionalUpgrade kselftests-kmp-64kbUpgrade ocfs2-kmp-defaultUpgrade kernel-sourceUpgrade dtb-hisiliconUpgrade kernel-docs-htmlUpgrade dtb-alteraUpgrade dtb-amazonUpgrade dlm-kmp-64kbUpgrade kernel-rtUpgrade kernel-develUpgrade kernel-rt-livepatchUpgrade cluster-md-kmp-rtUpgrade kernel-symsUpgrade dtb-xilinxUpgrade kernel-default-optionalUpgrade ocfs2-kmp-rtUpgrade kernel-default-vdsoUpgrade kernel-kvmsmall-vdsoUpgrade kernel-zfcpdumpUpgrade kernel-rt-vdsoUpgrade kernel-default-develUpgrade gfs2-kmp-rtUpgrade kernel-source-vanillaUpgrade gfs2-kmp-defaultUpgrade gfs2-kmp-64kbUpgrade kernel-kvmsmall-develUpgrade ocfs2-kmp-64kbUpgrade dtb-lgUpgrade kernel-kvmsmallUpgrade kernel-default-livepatchUpgrade dtb-allwinnerUpgrade dtb-qcomUpgrade kernel-64kbUpgrade dtb-broadcomUpgrade kernel-64kb-optionalUpgrade dtb-caviumUpgrade dtb-exynosUpgrade dtb-freescaleUpgrade dlm-kmp-rtUpgrade kernel-default-extraUpgrade dtb-marvellUpgrade dlm-kmp-defaultUpgrade cluster-md-kmp-64kbUpgrade kernel-rt-livepatch-develUpgrade kernel-rt-extraUpgrade kselftests-kmp-defaultUpgrade kernel-obs-qaUpgrade kernel-64kb-develUpgrade kernel-rt-develUpgrade kernel-64kb-extraUpgrade dtb-rockchipUpgrade dtb-sprdUpgrade dtb-socionextUpgrade dtb-renesasUpgrade dtb-armUpgrade kselftests-kmp-rtUpgrade kernel-default-livepatch-develUpgrade cluster-md-kmp-defaultUpgrade dtb-appleUpgrade kernel-defaultUpgrade kernel-docsUpgrade dtb-apmUpgrade dtb-nvidiaUpgrade dtb-mediatekUpgrade dtb-amdUpgrade kernel-macrosUpgrade dtb-amlogicUpgrade kernel-obs-build | Dec 5, 2025 | Nov 6, 2025 |
| Ubuntu | — | No solution exists | Jun 26, 2025 | Apr 16, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub