CVE-2023-5178
📋 TL;DR
This CVE describes a use-after-free vulnerability in the NVMe/TCP subsystem of the Linux kernel that could allow attackers to execute arbitrary code or escalate privileges. It affects Linux systems with NVMe over TCP functionality enabled. The vulnerability requires local or network access to the NVMe/TCP service.
💻 Affected Systems
- Linux kernel
📦 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 →Solidfire \& Hci Management Node by Netapp
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to full system compromise or local privilege escalation to root access.
Likely Case
Kernel panic causing denial of service or limited privilege escalation.
If Mitigated
No impact if NVMe/TCP is disabled or systems are properly patched.
🎯 Exploit Status
Exploitation requires access to NVMe/TCP service and knowledge of kernel memory layout. No public exploit code has been reported.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Varies by distribution - see Red Hat advisories for specific kernel versions
Vendor Advisory: https://access.redhat.com/errata/RHSA-2023:7370
Restart Required: Yes
Instructions:
1. Check current kernel version. 2. Update kernel package using distribution's package manager. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable NVMe/TCP
linuxDisable the NVMe over TCP functionality if not required
modprobe -r nvmet-tcp
echo 'blacklist nvmet-tcp' > /etc/modprobe.d/disable-nvmet-tcp.conf
🧯 If You Can't Patch
- Disable NVMe/TCP functionality completely
- Restrict network access to NVMe/TCP services using firewall rules
🔍 How to Verify
Check if Vulnerable:
Check if nvmet_tcp module is loaded: lsmod | grep nvmet_tcp
Check Version:
uname -r
Verify Fix Applied:
Check kernel version after update and reboot: uname -r
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages
- OOM killer activity related to nvmet
- Unexpected process crashes
Network Indicators:
- Unexpected connections to NVMe/TCP port 4420
- Abnormal NVMe/TCP protocol traffic
SIEM Query:
source="kernel" AND ("panic" OR "Oops" OR "BUG") AND "nvmet"
🔗 References
- https://access.redhat.com/errata/RHSA-2023:7370
- https://access.redhat.com/errata/RHSA-2023:7379
- https://access.redhat.com/errata/RHSA-2023:7418
- https://access.redhat.com/errata/RHSA-2023:7548
- https://access.redhat.com/errata/RHSA-2023:7549
- https://access.redhat.com/errata/RHSA-2023:7551
- https://access.redhat.com/errata/RHSA-2023:7554
- https://access.redhat.com/errata/RHSA-2023:7557
- https://access.redhat.com/errata/RHSA-2023:7559
- https://access.redhat.com/errata/RHSA-2024:0340
- https://access.redhat.com/errata/RHSA-2024:0378
- https://access.redhat.com/errata/RHSA-2024:0386
- https://access.redhat.com/errata/RHSA-2024:0412
- https://access.redhat.com/errata/RHSA-2024:0431
- https://access.redhat.com/errata/RHSA-2024:0432
- https://access.redhat.com/errata/RHSA-2024:0461
- https://access.redhat.com/errata/RHSA-2024:0554
- https://access.redhat.com/errata/RHSA-2024:0575
- https://access.redhat.com/errata/RHSA-2024:1268
- https://access.redhat.com/errata/RHSA-2024:1269
- https://access.redhat.com/errata/RHSA-2024:1278
- https://access.redhat.com/security/cve/CVE-2023-5178
- https://bugzilla.redhat.com/show_bug.cgi?id=2241924
- https://lore.kernel.org/linux-nvme/20231002105428.226515-1-sagi@grimberg.me/
- https://access.redhat.com/errata/RHSA-2023:7370
- https://access.redhat.com/errata/RHSA-2023:7379
- https://access.redhat.com/errata/RHSA-2023:7418
- https://access.redhat.com/errata/RHSA-2023:7548
- https://access.redhat.com/errata/RHSA-2023:7549
- https://access.redhat.com/errata/RHSA-2023:7551
- https://access.redhat.com/errata/RHSA-2023:7554
- https://access.redhat.com/errata/RHSA-2023:7557
- https://access.redhat.com/errata/RHSA-2023:7559
- https://access.redhat.com/errata/RHSA-2024:0340
- https://access.redhat.com/errata/RHSA-2024:0378
- https://access.redhat.com/errata/RHSA-2024:0386
- https://access.redhat.com/errata/RHSA-2024:0412
- https://access.redhat.com/errata/RHSA-2024:0431
- https://access.redhat.com/errata/RHSA-2024:0432
- https://access.redhat.com/errata/RHSA-2024:0461
- https://access.redhat.com/errata/RHSA-2024:0554
- https://access.redhat.com/errata/RHSA-2024:0575
- https://access.redhat.com/errata/RHSA-2024:1268
- https://access.redhat.com/errata/RHSA-2024:1269
- https://access.redhat.com/errata/RHSA-2024:1278
- https://access.redhat.com/security/cve/CVE-2023-5178
- https://bugzilla.redhat.com/show_bug.cgi?id=2241924
- https://lists.debian.org/debian-lts-announce/2024/01/msg00005.html
- https://lore.kernel.org/linux-nvme/20231002105428.226515-1-sagi@grimberg.me/
- https://security.netapp.com/advisory/ntap-20231208-0004/