Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-64173

CVE-2026-64173: Linux Kernel Use-After-Free Vulnerability

CVE-2026-64173 is a use-after-free flaw in the Linux kernel's tracing subsystem that occurs when elt_free() is incorrectly called after failed allocations. This article covers technical details, affected versions, and mitigations.

Published:

CVE-2026-64173 Overview

CVE-2026-64173 is a Linux kernel vulnerability in the tracing subsystem. The flaw exists in tracing_map_elt_alloc(), where the cleanup path incorrectly invokes map->ops->elt_free() even when the corresponding map->ops->elt_alloc() call never succeeded. This mismatch between allocation and free operations can lead to undefined behavior in kernel memory management routines. The patch ensures that elt_free() is only called when elt_alloc() has completed successfully.

Critical Impact

Improper cleanup after a failed allocation in the kernel tracing map can result in freeing objects that were never allocated, potentially leading to memory corruption or kernel instability.

Affected Products

  • Linux kernel (tracing subsystem — kernel/trace/tracing_map.c)
  • Multiple stable branches referenced by upstream fix commits
  • Distributions shipping affected stable kernel versions

Discovery Timeline

  • 2026-07-19 - CVE-2026-64173 published to NVD
  • 2026-07-19 - Last updated in NVD database

Technical Details for CVE-2026-64173

Vulnerability Analysis

The vulnerability resides in the Linux kernel's tracing map infrastructure, which underpins histogram triggers and other tracing features. When tracing_map_elt_alloc() runs, it iterates through map elements and calls per-element allocator hooks via map->ops->elt_alloc(). If any element allocation fails, the code enters a cleanup path that walks the map and calls map->ops->elt_free() on entries — including entries whose elt_alloc() was never executed. Calling a type-specific free routine on an object that was never initialized violates the allocator contract and can cause invalid memory operations.

Root Cause

The root cause is an unbalanced allocation/free pairing in error handling logic. The cleanup routine did not track which elements had actually completed initialization before invoking their free callbacks. This is a classic double-free/uninitialized-free class defect [CWE-415, CWE-908] where error paths free resources that were never acquired.

Attack Vector

Exploitation requires local access with the ability to configure tracing features that trigger tracing map allocations, such as histogram triggers or synthetic events. An attacker who can force allocation failures — for example, under memory pressure — could reach the flawed cleanup path. The primary observable impact is denial of service through kernel instability, with potential for memory corruption depending on the allocator implementation invoked by elt_free().

No public proof-of-concept code is available. The fix is distributed across multiple stable branch commits including 1a150947, 49332e49, 798183376, 8f0f5c4f, b427e9f6, b559a218, b6723339, and f383cff9.

Detection Methods for CVE-2026-64173

Indicators of Compromise

  • Kernel oops or panic messages referencing tracing_map_elt_alloc or elt_free in stack traces
  • Slab allocator warnings such as BUG: KASAN: use-after-free or invalid free tied to tracing map elements
  • Unexpected crashes when configuring histogram triggers or synthetic events under memory pressure

Detection Strategies

  • Audit running kernel versions against the fixed commits in the stable trees to identify unpatched systems
  • Enable KASAN or KFENCE on test kernels to surface invalid free operations in the tracing map path
  • Review tracing configuration usage patterns on production hosts, since exploitation requires interaction with tracefs

Monitoring Recommendations

  • Forward dmesg and journalctl -k output to a central log system and alert on kernel oops or KASAN reports
  • Monitor which local accounts have write access to /sys/kernel/tracing and /sys/kernel/debug/tracing
  • Track memory pressure metrics that correlate with allocation failures in kernel subsystems

How to Mitigate CVE-2026-64173

Immediate Actions Required

  • Apply the stable kernel updates that include the referenced fix commits from git.kernel.org
  • Restrict access to tracefs and debugfs so only privileged administrators can create histogram triggers or synthetic events
  • Prioritize patching on multi-tenant Linux hosts where untrusted local users may interact with tracing interfaces

Patch Information

The fix ensures map->ops->elt_free() is only invoked when map->ops->elt_alloc() returned successfully. Refer to the upstream commits: Commit 1a150947, Commit 49332e49, Commit 798183376, Commit 8f0f5c4f, Commit b427e9f6, Commit b559a218, Commit b6723339, and Commit f383cff9. Vendor-supplied kernel packages from your Linux distribution should be preferred over manual builds.

Workarounds

  • Mount tracefs and debugfs with restrictive permissions or unmount them on systems that do not require tracing
  • Remove or restrict CAP_SYS_ADMIN from unprivileged users and containers
  • Disable histogram triggers and synthetic events on hosts where tracing is not operationally required
bash
# Restrict access to tracefs so only root can configure tracing
mount -o remount,mode=0700 /sys/kernel/tracing
chown -R root:root /sys/kernel/tracing

# Verify running kernel version and package state
uname -r
# On Debian/Ubuntu
apt list --installed 2>/dev/null | grep linux-image
# On RHEL/CentOS/Fedora
rpm -qa | grep kernel

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.