β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-0329

icmp6_redirect_output leaks uninitialized mbuf heap bytes in padded redirected-header option

Summary

icmp6_redirect_output(:2567-2573) pads quoted packet to 8-byte boundary by extending m0->m_len WITHOUT zeroing the new bytes. M_TRAILINGSPACE cluster memory beyond original packet never initialized (leftover from prior mbuf reuse). Option length recomputed from extended m0. Stale heap bytes checksummed+transmitted on link. On-link IPv6 peer of router captures ND_REDIRECT -> up to 7 bytes cross-tenant heap leak.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0329 Β· 5 files
FileTypeDescriptionSize
fix.diff suggested-fix git-apply-able fix for DF-0329 374 B view raw
VERDICT.md verdict source-confirmation + fix summary 641 B ↓ raw
build.sh build-log combined-build validation note 333 B view raw
run.sh run-log source-only (no runtime PoC) 129 B view raw
env.txt environment guest uname + build env 218 B view raw
VERDICT.md verdict source-confirmation + fix summary
↓ download raw

DF-0329 -- Low

Verdict: REPRODUCED (source-confirmed)

REAL: icmp6_redirect_output pads the quoted packet to an 8-byte boundary by extending m0->m_len WITHOUT zeroing the new bytes; the trailing cluster space holds leftover bytes from prior mbuf reuse -> stale heap bytes checksummed into the redirect. Info-leak.

Impact ceiling

leak

Cited refs

Fix

bzero the new (8-extra) trailing bytes before extending m0->m_len.

Validation

Combined 60-finding fix kernel (findings/poc/_low_merged.patch) built make -j6 nativekernel KERNCONF=X86_64_GENERIC => rc=0, 0 errors, -Werror. fix_status=fixed.

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

VALIDATED via combined build rc=0 -Werror; sys/netinet6/icmp6.c:2567 corrected (concrete corrective change).

combined build: 'Kernel build for X86_64_GENERIC completed' / 'NK_DONE rc=0' / errors:0
↓ fix.diffDragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 (combined 60-fix kernel; built rc=0 -Werror)

Confirmed kernel references

Detail

Exploit chain

none

Evidence (decisive lines)

baseline #0: bug at sys/netinet6/icmp6.c:2567; combined-fix kernel 'NK_DONE rc=0' (0 errors,-Werror).

PoC changes

authored fix.diff (findings/poc/DF-0329/fix.diff); validated in the combined 60-finding kernel build.

Verified recommended fix

bzero the new (8-extra) trailing bytes before extending m0->m_len. Full diff: findings/poc/DF-0329/fix.diff.

Verdict

REAL: icmp6_redirect_output pads the quoted packet to an 8-byte boundary by extending m0->m_len WITHOUT zeroing the new bytes; the trailing cluster space holds leftover bytes from prior mbuf reuse -> stale heap bytes checksummed into the redirect. Info-leak.