CVE-2025-22077

5.5 MEDIUM

📋 TL;DR

This CVE describes a Linux kernel vulnerability in the SMB client where a reverted fix incorrectly revived kernel TCP sockets without proper network namespace references. This can cause TCP socket leaks and potential use-after-free conditions when network namespaces are destroyed. Systems running affected Linux kernel versions with CIFS/SMB client functionality are at risk.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions containing commit e9f2517a3e18a54a3943c098d2226b245d488801 (reverted in fix commits)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when CIFS/SMB client functionality is used. Systems not using CIFS/SMB mounts or connections are not affected.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic or system crash due to use-after-free when network namespace cleanup interacts with orphaned TCP sockets, potentially leading to denial of service.

🟠

Likely Case

TCP socket resource exhaustion leading to connection failures and degraded network performance for CIFS/SMB connections.

🟢

If Mitigated

Minimal impact if systems don't use CIFS/SMB client functionality or have proper network namespace isolation.

🌐 Internet-Facing: LOW - This primarily affects internal CIFS/SMB client connections rather than internet-facing services.
🏢 Internal Only: MEDIUM - Affects systems using CIFS/SMB client functionality for internal file sharing and network storage.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires specific conditions: CIFS/SMB client usage, network namespace operations, and TCP connection state transitions. No public exploits known.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with reverting commits: 4b6f6bf1bde8d6045c389fda8d21c304dfe49384, 8dbf060480236877703bff0106fc984576184d11, 95d2b9f693ff2a1180a23d7d59acc0c4e72f4c41, f761eeefd531e6550cd3a5c047835b4892acb00d

Vendor Advisory: https://git.kernel.org/stable/c/4b6f6bf1bde8d6045c389fda8d21c304dfe49384

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the reverting commits. 2. Check with your distribution vendor for specific patched kernel versions. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable CIFS/SMB client

linux

Prevent vulnerability by disabling CIFS/SMB client functionality if not needed

modprobe -r cifs
echo 'blacklist cifs' >> /etc/modprobe.d/blacklist.conf

Reduce TCP orphan sockets

linux

Lower tcp_max_orphans to limit potential socket leaks

sysctl -w net.ipv4.tcp_max_orphans=16384
echo 'net.ipv4.tcp_max_orphans=16384' >> /etc/sysctl.conf

🧯 If You Can't Patch

  • Avoid using CIFS/SMB client mounts and connections
  • Implement network namespace isolation and avoid destroying namespaces with active CIFS connections

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if it contains the problematic commit: 'uname -r' and check with distribution vendor

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated to one containing the reverting commits. Check CIFS module is functioning normally.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs mentioning use-after-free
  • TCP socket exhaustion warnings in dmesg
  • CIFS connection failures

Network Indicators:

  • Increased TCP sockets in FIN_WAIT_1 state
  • CIFS/SMB connection timeouts

SIEM Query:

source="kernel" AND ("use-after-free" OR "TCP" OR "CIFS" OR "SMB")

🔗 References

📤 Share & Export