explaingit

sgkdev/ipv6_frag_escape

Analysis updated 2026-05-18

53CAudience · researcherComplexity · 5/5Setup · hard

TLDR

A proof-of-concept exploit that demonstrates escaping from a Linux container to get root access on the host system by leveraging a fixed IPv6 kernel bug on CentOS and RHEL 10.

Mindmap

mindmap
  root((repo))
    What it does
      Escapes Linux containers
      Gets root shell on host
      Bypasses SELinux silently
    How it works
      Exploits fixed IPv6 bug
      Triggers use-after-free
      Hijacks kernel page tables
    System Requirements
      CentOS or RHEL 10
      Kernel version 6.12.x
      5-level paging hardware
    Use cases
      Security research
      Container hardening tests
    Audience
      Security researchers
      Kernel developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Security researchers can study how kernel memory bugs are chained into full container escapes.

USE CASE 2

System administrators can test whether their CentOS or RHEL 10 systems are vulnerable to this specific exploit chain.

USE CASE 3

Kernel developers can understand how IPv6 packet assembly bugs lead to use-after-free conditions.

What is it built with?

CLinux KernelIPv6

How does it compare?

sgkdev/ipv6_frag_escapelibretro/bluemsx-libretroalphapixel/eric-graham-1987-juggler-raytracer-1.0
Stars535354
LanguageCCC
Last pushed2026-07-16
MaintenanceActive
Setup difficultyhardmoderatehard
Complexity5/53/52/5
Audienceresearchergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires CentOS or RHEL 10 with kernel 6.12.x, 5-level paging hardware support, and a specific kernel debugging file to be present.

In plain English

This repository is a proof of concept for escaping from a Linux container or jail, specifically targeting CentOS and RHEL 10 systems running kernel version 6.12.x. It demonstrates how an unprivileged process confined inside a network-isolated container can break out and obtain an interactive root shell on the host system. The exploit relies on a bug in the Linux kernel's IPv6 networking code that has already been fixed upstream, and it does not exploit an unpatched vulnerability. The bug involves a memory overflow in how the kernel assembles IPv6 network packets. The overflow writes into a specific byte that controls how packet fragments are tracked. By carefully manipulating kernel memory allocation, the exploit turns this overflow into a situation where a memory page is freed while the program still holds a reference to it. This creates a use-after-free condition, giving the attacker control over a piece of memory the kernel considers released. From there, the exploit chain builds up several layers of access. The freed memory page is reclaimed by the kernel as a page table, which maps virtual addresses to physical memory. Because the exploit still has a pipe reading and writing to that same page, it can forge page table entries, giving it the ability to read and write arbitrary physical memory. It then defeats kernel address space layout randomization by reading a fixed kernel memory location that is never relocated. This reveals where the kernel lives in memory. The final steps involve using this memory access to grant the running process full root privileges and all capabilities. It disables SELinux enforcement silently, so the system still reports it as active. To actually escape the container, the exploit overwrites a kernel setting that controls what program runs when a process crashes, points it at its own binary, and triggers a crash in a child process. The kernel then runs the attacker's program as root in the host's initial namespaces, bypassing the container entirely. The repository includes important limitations. It only works on systems where a specific kernel configuration option is left at its default off state, requires 5-level paging hardware support, and depends on a specific kernel debugging file being present. It is scoped to CentOS and RHEL 10 only.

Copy-paste prompts

Prompt 1
Using the sgkdev/ipv6_frag_escape repository as a reference, explain how an IPv6 packet assembly bug can be turned into a use-after-free condition in the Linux kernel.
Prompt 2
Based on the sgkdev/ipv6_frag_escape proof-of-concept, write a high-level explanation of how reclaiming a freed memory page as a kernel page table allows arbitrary physical memory read and write.
Prompt 3
Using the sgkdev/ipv6_frag_escape repository, describe the steps the exploit takes to disable SELinux enforcement silently and escape the container via a crash handler.

Frequently asked questions

What is ipv6_frag_escape?

A proof-of-concept exploit that demonstrates escaping from a Linux container to get root access on the host system by leveraging a fixed IPv6 kernel bug on CentOS and RHEL 10.

What language is ipv6_frag_escape written in?

Mainly C. The stack also includes C, Linux Kernel, IPv6.

How hard is ipv6_frag_escape to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is ipv6_frag_escape for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.