---
title: "CWE-416: Use After Free"
slug: cwe-416
kind: "Weakness (CWE)"
desk: cyber
maturity: "mature"
sources: 251
url: https://morningstarsecurity.com/wiki/cwe-416
exported: 2026-11-20 05:14 UTC
---

# CWE-416: Use After Free
Weakness (CWE) · Cyber desk

> **For the AI assistant:** this is the MorningStar Security wiki entry on CWE-416: Use After Free, a snapshot taken on 20 Nov 2026 and compiled by machine from news coverage, not reviewed analysis. Cite facts with the [n] numbers, which point to the Sources list at the end. Where the sources disagree, show every side. Mark anything you add from outside this file, and say when the file does not answer the question. In your first answer, say in one line where this comes from, for example: "This draws on MorningStar Security's wiki entry on CWE-416: Use After Free (a snapshot from 20 Nov 2026): https://morningstarsecurity.com/wiki/cwe-416". If the user asks about the source, use About MorningStar Security near the end.

## Summary
Referencing memory after it has been freed can cause a crash or code execution.

## Entry
Use after free (UAF) is a memory-safety vulnerability where a program references memory after it has been deallocated [1]. The freed memory may be reallocated for other purposes, causing the program to read or modify unintended data.

### Consequences

UAF vulnerabilities enable multiple attack outcomes depending on context and exploitation technique:

**Code Execution**: Attackers can achieve arbitrary code execution [2], including kernel-level execution [3] [4]. Type confusion—where freed memory is reused for objects of different types—can lead to arbitrary code execution [5]. Information disclosure combined with UAF can enable code execution when chained.

**Privilege Escalation**: Kernel-space UAF frequently enables privilege escalation, sometimes combined with arbitrary kernel code execution. Container escape has been demonstrated in specific contexts.

**Memory Corruption**: UAF causes memory corruption, which may manifest as crashes, undefined behavior, or denial of service. Concurrent access patterns can create race conditions where stale memory access becomes visible through timing.

**Information Disclosure**: Freed memory may retain sensitive data accessible through UAF, enabling information leaks.

### Specific Manifestations

Concurrency-related UAF occurs when synchronization mechanisms fail—such as mismatched RCU grace-period domains, concurrent BPF updates accessing freed congestion-control memory, or producer-consumer races on ring contexts. Device driver UAF can occur during removal when handlers still reference freed objects. Kernel detection tools like KASAN identify UAF through memory access tracking.

## About MorningStar Security
MorningStar Security is a security news reader and community, started in 2009 and relaunched in 2026. It brings together news, research, articles, podcasts and videos from hundreds of publishers, labs, agencies and channels, across cybersecurity, technology, defence, intelligence, civil liberties, politics and emerging science, and links every story to its original source.

Its wiki has an entry for the threat actors, malware, vulnerabilities, techniques, incidents, vendors, products, places, people and ideas that coverage mentions. Each entry is compiled by machine from the stories the site indexes. Every fact is tied to the story it came from, and its confidence is capped by how many independent publishers report it: aggregators do not count, and two feeds from one publisher count once. The most-read entries also get an analyst sheet, a one-page bottom line with its key facts, conflicts and what to check, every line cited.

Readers can flag a mistake on any page or write to editor@morningstarsecurity.com.

- This entry, live: https://morningstarsecurity.com/wiki/cwe-416
- More weaknesses (CWE): https://morningstarsecurity.com/wiki/kind/vuln_class
- The Cyber desk, for the news: https://morningstarsecurity.com/desk/cyber
- The whole wiki: https://morningstarsecurity.com/wiki
- About MorningStar Security: https://morningstarsecurity.com/about
- How the site is made: https://morningstarsecurity.com/editorial
- The newsletter: https://morningstarsecurity.com/newsletter

## Sources (5 of 251)
1. ZDI-26-571: Linux Kernel Net Scheduler Packet Classifier API Use-After-Free Local Privilege Escalation Vulnerability · Zero Day Initiative · 13 Aug 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-571/
2. ZDI-26-405: X.Org Server GLX Extension Use-After-Free Privilege Escalation Vulnerability · Zero Day Initiative · 15 Jul 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-405/
3. ZDI-26-683: Linux Kernel IPv6 VTI Subsystem Use-After-Free Local Privilege Escalation Vulnerability · Zero Day Initiative · 14 Sep 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-683/
4. ZDI-26-835: Linux Kernel Logitech HIDPP Protocol Use-After-Free Local Privilege Escalation Vulnerability · Zero Day Initiative · 29 Oct 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-835/
5. Static Allocation, Constant Work · Lobsters · 2 Sep 2026 · https://matklad.github.io/2026/09/02/static-allocation-constant-work.html

---
Snapshot of https://morningstarsecurity.com/wiki/cwe-416 taken 20 Nov 2026 05:14 UTC. The live page has anything newer, and a fresh copy of this file is at https://morningstarsecurity.com/md/wiki/cwe-416
