Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2024-53103

CVE-2024-53103: Linux Kernel Use-After-Free Vulnerability

CVE-2024-53103 is a use-after-free vulnerability in the Linux Kernel's hv_sock module that can lead to a dangling pointer. This article covers the technical details, affected versions, security impact, and mitigation.

Updated:

CVE-2024-53103 Overview

CVE-2024-53103 is a use-after-free vulnerability [CWE-416] in the Linux kernel's Hyper-V socket (hv_sock) implementation. When an hvs instance is released, the vsk->trans pointer may not be reset to NULL, leaving a dangling pointer that can be referenced after the underlying memory is freed. A local authenticated attacker can exploit this condition to corrupt kernel memory and escalate privileges. The flaw affects multiple Linux kernel branches, including the 6.12 release series and its release candidates. The Linux kernel maintainers resolved the issue by explicitly initializing vsk->trans to NULL after release.

Critical Impact

A local attacker with low privileges can trigger the dangling pointer to achieve kernel memory corruption, leading to privilege escalation, information disclosure, or denial of service.

Affected Products

  • Linux kernel multiple stable branches prior to the fix commits
  • Linux kernel 6.12 (including release candidates rc1 through rc7)
  • Debian distributions tracked in the January and March 2025 LTS advisories

Discovery Timeline

  • 2024-12-02 - CVE-2024-53103 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2024-53103

Vulnerability Analysis

The vulnerability resides in the hv_sock transport layer, which provides socket communication between a Linux guest and the Hyper-V host. The vsock framework associates each socket with a transport-specific structure referenced through vsk->trans. When the Hyper-V socket (hvs) is released, the code path frees the underlying hvs object but does not consistently clear the vsk->trans pointer. Subsequent operations that dereference vsk->trans access freed memory, producing a classic use-after-free condition.

Root Cause

The root cause is incomplete cleanup logic in the hv_sock release path. The freed hvs allocation leaves vsk->trans pointing to memory that the slab allocator may reuse for unrelated kernel objects. The upstream fix initializes vsk->trans to NULL immediately after the hvs object is freed, ensuring later code paths handle the cleared pointer safely rather than dereferencing stale data.

Attack Vector

Exploitation requires local access and the ability to create and manipulate AF_VSOCK sockets on a Linux guest running on Hyper-V. An attacker triggers the release path while keeping a reference that later dereferences vsk->trans. By shaping the slab heap through controlled allocations, the attacker can place attacker-influenced data where the freed hvs object resided, transforming the dangling pointer into a primitive for kernel memory corruption or control-flow hijack.

No public proof-of-concept code has been verified for this CVE. Refer to the upstream kernel commits in the vendor advisory section for the precise code change.

Detection Methods for CVE-2024-53103

Indicators of Compromise

  • Unexpected kernel oops or panic messages referencing hv_sock, vsock, or vsk->trans in dmesg and /var/log/kern.log
  • KASAN reports identifying use-after-free conditions inside the hv_sock transport on instrumented kernels
  • Unprivileged processes gaining elevated capabilities shortly after creating AF_VSOCK sockets

Detection Strategies

  • Inventory running kernel versions across Hyper-V guests and flag hosts on unpatched 6.12 and earlier stable branches
  • Monitor for processes opening AF_VSOCK sockets that are not part of expected Hyper-V integration services
  • Correlate kernel crash telemetry with vsock syscall activity to identify exploitation attempts

Monitoring Recommendations

  • Forward kernel ring buffer and audit logs to a centralized SIEM and alert on hv_sock fault signatures
  • Enable auditd rules for the socket(AF_VSOCK, ...) syscall on Hyper-V guest workloads
  • Track uname -r output across the fleet and alert on kernels missing the upstream fix commits

How to Mitigate CVE-2024-53103

Immediate Actions Required

Patch Information

The Linux kernel maintainers fixed CVE-2024-53103 by initializing vsk->trans to NULL when hvs is released. The fix is distributed across multiple stable kernel branches via commits including 285266ef92f7, 414476c4fb11, 4bdc5a62c6e5, 4fe1d42f2acc, 7cf2598782035, 8621725afb38, 98d8dde92322, e0fe33923712, and e629295bd60a.

Workarounds

  • Restrict access to AF_VSOCK by limiting which users and containers can create vsock sockets on Hyper-V guests
  • Blacklist the hv_sock module on systems that do not require Hyper-V socket communication using modprobe configuration
  • Apply mandatory access control policies (SELinux or AppArmor) to constrain processes able to invoke vsock syscalls
bash
# Configuration example: disable the hv_sock module if not needed
echo 'blacklist hv_sock' | sudo tee /etc/modprobe.d/blacklist-hv_sock.conf
sudo update-initramfs -u
sudo reboot

# Verify the running kernel version against patched releases
uname -r

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.