Crash-Style Kernel Forensics Without the Debuginfo

TL;DR — On an enterprise distro the kernel debuginfo is behind a paid subscription, so crash — the tool you’d normally reach for — won’t load. This post does crash-style post-mortem forensics without any vendor debuginfo: the guest’s own /boot/System.map for symbols, pahole on a self-built kernel for the handful of struct offsets you actually need, and a hypervisor read channel for memory. Then it uses that to root-cause why CVE-2024-1086 (“Flipping Pages”) only DoSes a SLES 15 SP2 / 5.3.18 kernel instead of rooting it.

The real problem: your debugger is paywalled

A public kernel LPE that reliably roots Ubuntu/GKE can reliably fail on an enterprise backport, and the interesting question is always why. Normally you answer it post-mortem: take a crash dump, open it in crash with the matching vmlinux, and walk the structures.

On RHEL/SUSE that workflow has a hole in it: crash needs DWARF debuginfo, and the vendor debuginfo is gated behind a paid subscription (SCC for SUSE, RHSM for Red Hat). The vmlinux that ships in /boot has a symbol table but no .debug_info — check it yourself:

Terminal window
readelf -S /boot/vmlinux-$(uname -r) | grep debug_info # (nothing)

Feed that to crash and you get crash: ... no debugging data available. No subscription, no crash. That’s the wall this post walks around.

Why not just build the debuginfo?

The obvious retort: build a vmlinux with CONFIG_DEBUG_INFO from the public source and point crash at that. It doesn’t cleanly work, for two reasons:

  1. crash wants a byte-matching kernel. The vendor kernel is upstream + a large vendor patch series + a specific config. A stock kernel.org build of the same x.y.z is not that; crash either rejects the mismatch or silently resolves struct offsets against the wrong layout — the worst outcome in forensics. Reproducing the exact vendor build is a project in itself.
  2. The memory source fights you too. crash wants /proc/kcore (in-guest — useless when the guest is wedged, see below) or a full dump. On a locked-down hypervisor dump-guest-memory lands a root-owned file on the node that a scoped API token can’t retrieve.

So instead of forcing the whole crash + matching-debuginfo + dump pipeline, take the two things crash actually needs and get them cheaply and separately.

The one insight: access and symbols are separate problems

Needcrash’s wayOur way (no debuginfo)
Symbols (name → address)DWARF in a matching vmlinuxthe guest’s own /boot/System.map (ships unprivileged)
Struct offsets (field → byte)DWARFpahole on a self-built kernel, for the few structs you touch
Memory (read the guest)a crash dump or /proc/kcorea hypervisor read channel (gdbstub / monitor), live

The key realization is that you never need the whole debuginfo. You need symbol addresses (in the System.map already on disk) and the offsets of maybe five structs (which pahole prints from a couple of objects you compile yourself). Core net/mm layouts match the vendor build closely enough; validate any offset you depend on against a live read before you trust it.

And the guest can’t talk back

There’s a second wall specific to this bug. CVE-2024-1086 is a nf_tables double-free (KEV-listed); the public exploit by Notselwyn roots v5.14–6.6 with a cross-cache technique. On SLES 15 SP2 / 5.3.18-22 it doesn’t root — it livelocks CPU 0 forever inside rb_first(). The exploit pins itself to CPU 0, and a corrupted red-black tree sends while (n->rb_left) n = n->rb_left; into an infinite, non-yielding softirq loop.

That kills the obvious in-guest fallback. A prior effort found that with the livelock active, every in-guest trace-extraction hangs — cat .../trace, streaming trace_pipe, a detached snapshot buffer, even echo 0 > tracing_on. The reason is structural: ftrace’s buffer read needs an RCU grace period, and a CPU stuck in a non-yielding loop never reaches a quiescent state, so the barrier never completes. On this class of bug, in-guest tracing is architecturally dead — regardless of debuginfo. /proc/kcore is out for the same reason.

So the memory source has to come from outside the guest.

The read channel: the hypervisor

The VM is an owned guest on an isolated Proxmox lab. QEMU’s gdbstub gives host-side access that is invisible to the guest and survives a livelocked CPU — one root-only config line, then reboot:

args: -s # gdbstub on tcp::1234, node-local

KASLR re-randomizes each boot, so compute the slide from _text and load the stripped image at it:

slide = (runtime _text, /proc/kallsyms) − (link-time _text, System.map)
(gdb) add-symbol-file vmlinux-5.3.18-22-default -o 0x<slide>
(gdb) target remote 127.0.0.1:1234

The gdbstub part is nothing new — kernel devs debug VMs this way all the time. The point isn’t “you can gdb a VM”; it’s that gdbstub + System.map + pahole reconstructs what crash gives you, minus the debuginfo requirement. Two pieces carry the analysis.

Recovering the splat from a dead guest

The printk ring buffer is just memory. With the slide, dump __log_buf over the stub and parse the struct printk_log records client-side:

(gdb) dump binary memory logbuf.bin &__log_buf ((char*)&__log_buf + 0x40000)

That reconstructs the entire dmesg — panic splat and call trace — from a guest whose qemu-guest-agent and sshd are both dead. Exactly the trace the in-guest tracers refused to hand over.

Naming the SLUB cache that owns an address

This is the part crash’s kmem -s would normally do for you. By hand it’s three steps — translate the address, walk vmemmap to its struct page, read the cache name (offsets from pahole):

gpa = gva2gpa(addr) # Proxmox monitor
page = vmemmap_base + (gpa >> 12) * sizeof(struct page)
name = page->slab_cache->name

Being able to ask “what cache does this corrupted pointer live in?” is what turns a register dump into a root-cause.

Root-causing CVE-2024-1086 on 5.3.18

With the channel open, both failure branches of the exploit became directly observable.

The panic branch. With one build config, free #2 hits kfree+0x1c5 with RAX = dead000000000100 (SLUB freelist-hardening catching a poisoned object — a detected double free), via sendto → raw_sendmsg → … → ip_defrag → inet_frag_destroy → inet_frag_rbtree_purge → kfree_skb → kfree. The kernel’s own Kernel Offset: line in the recovered splat confirmed our computed slide — a free sanity check that the symbols line up.

The livelock branch. With the other config, the same teardown reaches rb_first+0x11 and never returns. Attaching the stub while CPU 0 was still spinning, the stuck node’s tree fields were all identical — parent_color == rb_right == rb_left — a corrupted cycle, so while (n->rb_left) loops forever. One page in the cycle even held the ASCII "lo" (the loopback device name) beside live kernel pointers.

The question the prior effort couldn’t answer — what repopulates the freed page? — fell straight out of the slab-cache lookup: the cyclic node lived in kmalloc-64 (a live, general allocation), while the adjacent node sat in a page marked 0xdead000000000400 (SLUB poison — still free). So the freed fragment-queue memory is reclaimed into the general kmalloc-64 cache by the free-#2 path’s own skb/network allocations, and the teardown then walks a tree spanning one reclaimed-live page and one still-poisoned page — a dereferenceable cycle.

Why it DoSes instead of roots. Notselwyn’s cross-cache technique targets the v5.14–6.6 kmalloc-cg split and a specific freelist layout. 5.3.18 predates kmalloc-cg; the freed page gets consumed by the inet_frag teardown (or reclaimed into kmalloc-64) before any controllable reclaim can win the race. The result is a reliable DoS — livelock or panic depending on which branch the race takes — but never root. The honest dual read for this build: vendor-vulnerable, empirically DoS-only.

Takeaways

For offense: “the exploit works on Ubuntu” tells you little about an enterprise backport, and the standard way to find out why — crash + vendor debuginfo — is exactly what the subscription wall and the livelock take off the table. System.map + pahole + a hypervisor read channel gets you crash-style forensics anyway, with nothing but public source. It turned a 71-iteration dead end into a named mechanism in an afternoon.

For defense on RHEL/SUSE, the inverse is the point: the mitigations that make these exploits miss — SLAB_FREELIST_RANDOM, SLAB_FREELIST_HARDENED, SHUFFLE_PAGE_ALLOCATOR, the pre-kmalloc-cg allocator shape — are doing real work. The public PoC’s determinism is their casualty.

Credits & scope

CVE-2024-1086 exploit: Notselwyn. All work was on owned lab VMs on an isolated segment; kernel triggers ran on disposable snapshots and were rolled back. No exploit or working weaponization is released here — this is methodology and root-cause analysis.