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

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

CVE-2024-50150 is a use-after-free vulnerability in the Linux Kernel USB Type-C altmode subsystem that causes reference handling issues. This article covers the technical details, affected versions, and mitigation strategies.

Published:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-50150 Overview

CVE-2024-50150 is a use-after-free vulnerability [CWE-416] in the Linux kernel's USB Type-C altmode subsystem. The typec_altmode_release() function dereferences the parent device during cleanup without holding a reference to it. When the parent is freed before the altmode release runs, the kernel accesses freed memory. Kernel Address Sanitizer (KASAN) reports confirm the slab-use-after-free during delayed kobject_cleanup work. Local attackers with low privileges can trigger the condition through USB Type-C port register and unregister sequences. Successful exploitation can lead to kernel memory corruption, denial of service, or local privilege escalation on affected Linux systems.

Critical Impact

Local use-after-free in the USB Type-C altmode release path can corrupt kernel memory and enable privilege escalation on vulnerable Linux hosts.

Affected Products

  • Linux kernel stable branches prior to the fix commits
  • Linux kernel 6.12-rc1, 6.12-rc2, 6.12-rc3
  • Debian LTS distributions and Siemens industrial products shipping affected kernels

Discovery Timeline

  • 2024-11-07 - CVE-2024-50150 published to the National Vulnerability Database
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2024-50150

Vulnerability Analysis

The flaw resides in the USB Type-C altmode device lifecycle logic within drivers/usb/typec/. The altmode device's release callback, typec_altmode_release(), reads fields from the parent typec_port structure during cleanup. The registration path never incremented the parent's reference count, so the kernel can free the parent before the altmode release runs.

KASAN traces attached to the advisory show the use-after-free occurring inside kobject_delayed_cleanup when CONFIG_DEBUG_KOBJECT_RELEASE is enabled. The parent port0 kobject is released with delayed cleanup, after which the port0.0 altmode release dereferences the freed parent. The accepted fix calls get_device() on the parent during altmode registration and put_device() in the release callback, correcting reference ordering.

Root Cause

The root cause is missing reference counting between child altmode devices and their parent Type-C port. Linux device model semantics require that any object whose release handler touches a parent must hold a parent reference for the object's lifetime. The altmode code violated this contract, producing a classic ordering-dependent use-after-free [CWE-416].

Attack Vector

Exploitation requires local access with the ability to trigger Type-C port registration or driver bind and unbind cycles. On systems with physical USB Type-C ports, device hotplug events can exercise the vulnerable paths. On virtualized or ChromeOS platforms using cros_typec, bind and unbind through sysfs under /sys/bus/platform/drivers/ can race the release handlers. A local attacker with CAP_SYS_ADMIN or write access to the relevant sysfs nodes can repeatedly provoke the race to groom kernel heap state.

No verified public proof-of-concept exploit is available. The vulnerability is described in prose; see the kernel commits referenced in the advisory URLs for the exact code change.

Detection Methods for CVE-2024-50150

Indicators of Compromise

  • KASAN splats in dmesg containing BUG: KASAN: slab-use-after-free in typec_altmode_release
  • Kernel oops or panic traces referencing typec_altmode_release, device_release, and kobject_delayed_cleanup
  • Unexpected kernel crashes correlated with USB Type-C hotplug events or driver bind and unbind activity

Detection Strategies

  • Audit running kernel versions against the fixed commits (1ded6b12, 2b0b33e8, 2c15c413, 68a7c7fe, 6af43ec3, 87474406, bee1b68c, befab3a2) using package inventory data.
  • Monitor kernel log streams for KASAN or general protection fault signatures involving typec_altmode_release.
  • Correlate udev hotplug events on Type-C ports with subsequent kernel error logs to surface exploitation attempts.

Monitoring Recommendations

  • Centralize journald and /var/log/kern.log collection to detect kernel oops events in near real time.
  • Track sysfs write activity against /sys/bus/platform/drivers/*typec*/bind and unbind endpoints on multi-user systems.
  • Alert on repeated driver bind and unbind cycles from non-root sessions, which may indicate race-condition probing.

How to Mitigate CVE-2024-50150

Immediate Actions Required

  • Upgrade affected Linux systems to a kernel release containing the backported fix commits listed in the kernel.org advisories.
  • Apply Debian LTS updates referenced in the January and March 2025 debian-lts-announce advisories.
  • For Siemens industrial products, follow guidance in Siemens Security Advisory SSA-265688.
  • Restrict local shell and sysfs write access to trusted administrators on multi-tenant hosts.

Patch Information

The upstream fix adds get_device(parent) during typec_register_altmode() and put_device(parent) in typec_altmode_release(). Fix commits are published at kernel.org commit 1ded6b12, commit 2b0b33e8, commit 2c15c413, commit 68a7c7fe, commit 6af43ec3, commit 87474406, commit bee1b68c, and commit befab3a2.

Workarounds

  • Blacklist the typec and typec_altmode modules on servers that do not require USB Type-C functionality using /etc/modprobe.d/ entries.
  • Remove physical access to USB Type-C ports on exposed systems where patching is delayed.
  • Restrict CAP_SYS_ADMIN and tighten permissions on platform driver sysfs bind and unbind interfaces to prevent unprivileged triggering.

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

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.