Meta Bug Bounty — Fuzzing "netconsd" for Fun and Profit — Part 2
Understanding your target is the key to finding bugs. While the fuzzer ran in the
background, deeper research into netconsole's fragmented message
format — specifically the ncfrag header field — revealed the
critical flaw in the original harness and led directly to a heap overflow vulnerability.
Researching the Message Format
netconsd stands for "The Netconsole Daemon" — it parses kernel messages transmitted over UDP. The Linux kernel documentation reveals an extended console format where messages can contain a sequence number and be split into fragments:
The Problem: Single-Message Harness
The original harness creates a new ncrx instance, calls
ncrx_process() once, then destroys it. This means the fuzzer never exercises the
fragment reassembly code — the exact code that contains the heap overflow vulnerability:
Key Insight: The ncfrag handling code in
ncrx_process() maintains state across multiple messages, tracking byte
offsets and total lengths. By destroying the ncrx instance after every single message, the
fragmentation code path was never reached.
Looking at the ncfrag parsing logic in the source shows the
dangerous operations:
The Improved Harness
The fix was straightforward: instead of calling ncrx_process() once
per AFL loop iteration, split the input on newlines and call it once per line — simulating a real
stream of kernel log messages with potential fragmentation:
Result: Heap Overflow Found!
With the updated harness processing multiple messages per ncrx lifecycle, AFL++ quickly discovered crash-inducing inputs that triggered a heap overflow in netconsd's fragment reassembly code. The crash was reproducible against the actual netconsd daemon — confirming a real, exploitable vulnerability in a Meta production system.
The fuzz harness source code is publicly available: github.com/fadyosman/netconsd_ncrx_fuzz
Continue Reading
Part 3 covers corpus generation techniques — using /dev/kmsg
and symbolic execution with Klee — plus the full fuzzing setup with multiple AFL++ instances and
custom mutators.
Written by Fady Othman, Co-founder and Director of R&D at ZINAD.
