# Tcpdump before 4.9.3 has a buffer over-read in print-802_11.c (CVE-2018-16227)

Heap buffer over-read in tcpdump's 802.11 control-frame printer (ctrl_body_print) triggered by a malformed pcap, causing ASAN heap-buffer-overflow when parsing a ReAssoc Request.

- Payout: $500
- Severity: critical
- Program: Internet Bug Bounty
- Found by: bugbasher
- Disclosed: 2020-02-13
- CVE: CVE-2018-16227
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/724243
- Library page: https://bugbountylibrary.com/r/h1%3A724243
- Tags: area:devices domain:network impact:dos kind:bounty platform:hackerone sev:critical tech:linux technique:fuzzing vuln:dos vuln:memory-corruption

**Target:** tcpdump print-802_11.c ctrl_body_print (802.11 radiotap pcap parsing)
**Root cause:** ctrl_body_print reads one byte past the end of the 64-byte packet buffer when printing a truncated 802.11 control frame body, lacking a length check before the read.
**Steps:**
1. Compile tcpdump 4.9.2 with AddressSanitizer support
2. Fuzz with mutated 802.11 radiotap packets to produce a crashing pcap
3. Run `tcpdump -e -vvvv -H -u -nn -r fuzzer06:id:000021,sig:11,src:008627,op:havoc,rep:2`
4. ASAN reports heap-buffer-overflow READ of size 1 at print-802_11.c:1676 in ctrl_body_print
**How found:** Compiled tcpdump with ASAN and fuzzed with mutated packets; a havoc-mutated 802.11 radiotap capture produced a one-byte over-read in the control-frame body printer.
**Insight:** Fuzzing packet dissectors with ASAN and radiotap/802.11 link-type inputs surfaces off-by-one reads in per-frame-type body printers that trust the captured length; target the ctrl_body_print path with truncated control frames.

## Proof of concept (copied exactly from the original report)

**Tcpdump command triggering the over-read**

```
tcpdump -e -vvvv -H -u -nn -r fuzzer06:id:000021,sig:11,src:008627,op:havoc,rep:2
```

