Isolated caches, slab_nomerge and SLAB_ACCOUNT keep your buggy object away from useful victims. The way out is to go one layer down: empty an entire slab so its pages return to the page allocator, then make a different cache (msg_msg, pipe_buffer, cred_jar, ...) take those pages.

What you will learn

  • How slabs are released to and reclaimed from the buddy allocator (orders, per-CPU partial lists)
  • Grooming the page allocator reliably
  • Cross-cache overflows and cross-cache UAF into msg_msg, pipe_buffer and cred_jar
  • Leakless, data-only finishing moves (cred overwrite)

Prerequisites

Modules 05-07.

References



Challenges

D^3CTF 2025 · difficulty ★★★☆☆ · module: Cross-Cache Attacks

A custom heap module whose object lifetime accounting is off by one; turn it into a write on something you should not be able to touch.

Mitigations: SMEP, SMAP, KASLR, KPTI, SMP 4 vCPU

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. /home/hacker/exploit is not copied into this VM. The root filesystem is a qcow2 disk, so there is no initramfs to add files to: transfer your exploit over the console (for example base64). The flag is /flag (copied from a second disk at boot); disk changes are discarded when the VM stops.

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, rootfs.qcow2, run.sh.

Original challenge

Description

"Once I was seven years old my arttnba3 told me"

"go make yourself some d3kheap or you'll be lonely"

"Soon I'll be 60 years old will I think the kernel pwn is cold"

"Or will I have a lot of baby heap who can sign me in"

Copyright(c) 2025 <ディーキューブ・シーティーエフ カーネル Pwn 製作委員会>

Points

N/A

Solves

6

Credits

  • Challenge author(s): arttnba3 @ L-team x Ele3tronic x D^3CTF, for D^3CTF 2025
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

bi0sCTF 2024 · difficulty ★★★☆☆ · module: Cross-Cache Attacks

A palindrome-checking driver with a dedicated cache; escape that cache to reach objects that matter.

Mitigations: SMEP, SMAP, KASLR, KPTI (kernel default; depends on the host CPU)

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. Put your payload at /home/hacker/exploit first; it is attached to the VM as a raw disk, as in the original challenge. /init copies it to /bin/pwn (padded with zeros to whole 512-byte sectors). The flag is /root/flag; disk changes are discarded when the VM stops.

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, config, palindromatic.ko, rootfs.ext3, run.sh, src/palindromatic.c, src/palindromatic.h, src/palindromatic_util.c.

Original challenge

Description

An unnecessarily complex palindrome checker, implemented as a kernel driver. What could possibly go wrong?

Points

991

Solves

5

Credits

  • Challenge author(s): k1R4, for bi0sCTF 2024
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

D^3CTF 2026 · difficulty ★★★★☆ · module: Cross-Cache Attacks

The pro sequel to d3kheap2 with a hardened allocator; the cross-cache ideas still apply, the finishing move does not.

Mitigations: SMEP, SMAP, KASLR, KPTI, SMP 4 vCPU

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. /home/hacker/exploit is not copied into this VM. The root filesystem is a qcow2 disk, so there is no initramfs to add files to: transfer your exploit over the console (for example base64). The flag is /flag (copied from a second disk at boot); disk changes are discarded when the VM stops.

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, kernel_config, rootfs.qcow2, run.sh.

Original challenge

Description

「  我把退役当世人说谎

你把复出当自我逞强

都把选择当命运的嘉奖

我选反方向 」

Copyright(c) 2026 <ディーキューブ・シーティーエフ カーネル Pwn 製作委員会>

Points

928

Solves

34

Credits

  • Challenge author(s): arttnba3 @ L-team x El3ctronic x D^3CTF, for D^3CTF 2026
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

Full Weak Engineer CTF 2025 · difficulty ★★★★☆ · module: Cross-Cache Attacks

A tiny note object in its own cache is reachable after free; freeing its whole slab page and reclaiming it for cred_jar (cross-cache) is the core skill here.

Mitigations: SMEP, SMAP, KASLR, KPTI

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. Put your payload at /home/hacker/exploit first; it is attached to the VM as a raw disk, as in the original challenge. /init copies it to /home/ctf/exploit (padded with zeros to whole 512-byte sectors). The flag is the raw disk /dev/sda (root only).

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, note.c, rootfs.cpio, run.sh.

Original challenge

Description

Yeah… I know the source looks cursed.

Unlock Hint for 0 points

Hint

  • Calling setuid() a large number of times will allocate a large number of creds with little noise and they will be automatically freed. If you then call fork() a lot immediately afterwards, some of the child process's creds will be placed in pages allocated from the buddy allocator.

  • Place the note's page and the cred's page next to each other and overwrite the cred.

Points

497

Solves

2

Credits

  • Challenge author(s): ryhtbsh, for Full Weak Engineer CTF 2025
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

corCTF 2022 · difficulty ★★★★★ · module: Cross-Cache Attacks

A tiny overflow inside a private slab cache with no leaks; you must reach objects in a different cache entirely.

Mitigations: SMEP, SMAP, KPTI, KASLR (kernel default), oops=panic

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. Put a statically linked exploit at /home/hacker/exploit first; it appears in the VM as /exploit. Memory is 1 GiB here (the original used 4 GiB), and the VM has no network card.

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, initramfs.cpio.gz, kconfig, run.sh.

Original challenge

Description

After repeated attacks on poor kernel objects, I've decided to place pwners in a special isolated place - a marooned region of memory. Good luck escaping out of here :^) 

Points

481

Solves

2

Credits

  • Challenge author(s): FizzBuzz101, for corCTF 2022
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

bi0sCTF 2025 · difficulty ★★★★★ · module: Cross-Cache Attacks

A kernel mailing list where broadcast mail is not quite initialized; slab_nomerge means you have to go across caches.

Mitigations: SMEP, SMAP, KASLR, KPTI (kernel default; depends on the host CPU), slab_nomerge, SMP 2

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. Put a statically linked exploit at /home/hacker/exploit first; it appears in the VM as /exploit.

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, initrd.cpio.gz, mailinglist.ko, run.sh, src/mail_utils.c, src/mailinglist.c, src/mailinglist.h.

Original challenge

Description

Linus cannot stop me from writing bad code into the kernel :D LKM FTW, evil laugh Hopefully the kernel doesn't burn to ashes.

Points

1000

Solves

1

Credits

  • Challenge author(s): r0r1, for bi0sCTF 2025
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

CrewCTF 2025 · difficulty ★★★★★ · module: Cross-Cache Attacks

A user database with its own slab cache and a lock that is taken barely too late; win the race, then leave the cache.

Mitigations: SMEP, KASLR, KPTI, nosmap, oops=panic, unprivileged userfaultfd on

Also uses techniques from: Races: Double Fetch, userfaultfd and FUSE (08-races).

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. Put a statically linked exploit at /home/hacker/exploit first; it appears in the VM as /exploit.

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, initrd.cpio.gz, pwn.c, run.sh.

Original challenge

Description

author too busy giving a description

Points

489

Solves

3

Credits

  • Challenge author(s): itayB, for CrewCTF 2025
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

DiceCTF 2026 Quals · difficulty ★★★★★ · module: Cross-Cache Attacks

An RCU-protected object is freed too early; exploiting it takes timing, cross-cache work and a creative final step.

Mitigations: -cpu host + KVM (SMEP/SMAP from host), KPTI, KASLR, no5lvl

Running it

Run /challenge/run. It boots the original kernel and root filesystem in QEMU with the serial console on your terminal. Quit with Ctrl-A then X. Put a statically linked exploit at /home/hacker/exploit first; it appears in the VM as /exploit. The original uses -cpu host (KVM); without KVM the max CPU model is used. Memory is 1 GiB here (the original used 4 GiB).

The flag is put where the original challenge kept it, readable only by root in the VM (unless a note above says otherwise). Files in /challenge (kernel, initramfs, sources and the original launcher, where the CTF shipped them): bzImage, config, cornelslop.c, initramfs.cpio.gz, run.sh.

Original challenge

Description

CoR's love for kernel slop comes to... DiceCTF!

The CoR tribunal will determine your fate based on whether you can pwn their process integrity verifier.

Remember, in the AI era, when execution is cheap and correctness is abundant, kernel pwnage is the moat.

Download vmlinux with debug symbols here.

Connection

Points

318

Solves

6

Credits

  • Challenge author(s): fizzbuzz101, for DiceCTF 2026 Quals
  • Compiled by: mito753 in Kernel-Exploit-Dojo, which also has the original handout and writeups

30-Day Scoreboard:

This scoreboard reflects solves for challenges in this module after the module launched in this dojo.

Rank Hacker Badges Score