CVE-2023-5345

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's SMB client component that allows local attackers to escalate privileges. The flaw occurs when an error in smb3_fs_context_parse_param frees memory but doesn't null the pointer, potentially leading to double-free conditions. Systems running vulnerable Linux kernel versions with SMB client functionality are affected.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Versions before commit e6e43b8aa7cd3c3af686caf0c2e11819a886d705
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires SMB client functionality (fs/smb/client) to be present and used.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local attacker gains root privileges, enabling complete system compromise, data theft, persistence establishment, and lateral movement.

🟠

Likely Case

Local user escalates to root privileges, allowing unauthorized access to sensitive data and system resources.

🟢

If Mitigated

Attack limited to users with local shell access; proper access controls prevent initial access.

🌐 Internet-Facing: LOW - This is a local privilege escalation vulnerability requiring local access to exploit.
🏢 Internal Only: HIGH - Any user with local shell access could potentially exploit this to gain root privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local access and specific error conditions to trigger the use-after-free.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions including commit e6e43b8aa7cd3c3af686caf0c2e11819a886d705

Vendor Advisory: https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GISYSL3F6WIEVGHJGLC2MFNTUXHPTKQH/

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing commit e6e43b8aa7cd3c3af686caf0c2e11819a886d705
2. For RHEL/CentOS/Fedora: yum update kernel
3. For Ubuntu/Debian: apt update && apt upgrade linux-image-$(uname -r)
4. Reboot system to load new kernel

🔧 Temporary Workarounds

Disable SMB client module

linux

Prevent loading of the vulnerable SMB client kernel module

echo 'install cifs /bin/false' >> /etc/modprobe.d/disable-cifs.conf
rmmod cifs

Restrict local user access

linux

Limit shell access to trusted users only

usermod -s /sbin/nologin [username]
chsh -s /sbin/nologin [username]

🧯 If You Can't Patch

  • Implement strict access controls to limit local user accounts
  • Monitor for privilege escalation attempts and unusual root activity

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if commit e6e43b8aa7cd3c3af686caf0c2e11819a886d705 is present: git log --oneline | grep e6e43b8aa7cd3c3af686caf0c2e11819a886d705

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version after update and ensure commit is present: uname -r && git log --oneline | grep e6e43b8aa7cd3c3af686caf0c2e11819a886d705

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs
  • OOM killer activity related to SMB
  • Unusual privilege escalation in audit logs

Network Indicators:

  • Unexpected SMB client connections from localhost

SIEM Query:

source="kernel" AND ("panic" OR "Oops" OR "general protection fault") AND "cifs" OR source="audit" AND "privilege" AND success

🔗 References

📤 Share & Export