All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Deep Dive: The Rewritten AF_UNIX Garbage Collector and CVE-2025-40214

By

@AcherirMoe

13d ago· 13 min readenInsight

Summary

A detailed technical walkthrough of the rewritten AF_UNIX garbage collector in the Linux kernel. The article explains how the GC handles unreachable sockets sent via SCM_RIGHTS, describes the new graph/Strongly-Connected-Components model, and analyzes a Use-After-Free bug (CVE-2025-40214) caused by an uninitialized scc_index field. Includes two reproducers for the bug.

Source

Hacker NewsDeep Dive: The Rewritten AF_UNIX Garbage Collector and CVE-2025-40214mohandacherir.github.io

Key quotes

· 4 pulled
The AF_UNIX garbage collector is an interesting piece of the kernel.
It exists because sockets can be sent with SCM_RIGHTS but they can become unreachable from user-space while still being kept alive by the kernel, which is not memory efficient.
Not long ago, the subsystem was rewritten from scratch on top of a graph/Strongly-Connected-Components model; but it is still bug prone.
This post walks the rewrite end-to-end, and discusses a Use-After-Free bug.
Snippet from the RSS feed
A walkthrough of the rewritten AF_UNIX garbage collector, the CVE-2025-40214 scc_index uninitialised-field bug, and two reproducers.

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.