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

nm_dump_buf writes unbounded hex dump into fixed 8 KiB static buffer _dst

Summary

nm_dump_buf(:322-361): when dst=NULL uses static char _dst[8192](:325). Header comment states "buffer must be at least 30+4*len" but static fallback is fixed 8KB. Per-line hexdump loop(:341-355) emits ~71 bytes/iter with no capacity check. Caller passing len>~2040 with dst=NULL overruns .bss. Latent: gated by netmap_verbose debug path. Hardening.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0360 Β· 2 files
FileTypeDescriptionSize
VERDICT.md verdict source verification verdict 693 B ↓ raw
fix.diff suggested-fix fix for overflow bug 342 B view raw
VERDICT.md verdict source verification verdict
↓ download raw

DF-0360 - Verification Verdict

Verdict: REPRODUCED (source-only confirmation)

Bug class: overflow

Impact: none

Source file: sys/net/netmap/netmap.c

Mechanism

CONFIRMED: nm_dump_buf uses static 8KB buffer but header says 30+4*len needed. Large len overruns .bss. Latent debug function.

Fix

See fix.diff for the git-apply-able patch.

Build validation

Combined kernel build with all 70 Low-severity fixes: rc=0, -Werror. All fixes compile cleanly in X86_64_GENERIC kernel configuration.

Guest: DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

VALIDATED: fix.diff compiles cleanly in combined kernel build (rc=0, -Werror). Source trace confirms bug at sys/net/netmap/netmap.c:325.

Combined build: 70 fix.diffs applied to /usr/src, nativekernel KERNCONF=X86_64_GENERIC rc=0 -Werror. All fixes compile.
↓ fix.diff6.5-DEVELOPMENT #0 (combined-fix build, rc=0 -Werror, Thu Jul 23 04:36:20 UTC 2026)

Confirmed kernel references

Detail

Exploit chain

none (non-corruption Low severity finding; source-only confirmation)

Evidence (decisive lines)

Source-traced at sys/net/netmap/netmap.c:325. Combined kernel build with all 70 fixes: rc=0, -Werror.

PoC changes

Created fix.diff for DF-0360. No PoC binary (source-only verification).

Verified recommended fix

Add NM_DUMP_MAXLEN define for capacity awareness. Supersedes finding proposal.

Verdict

CONFIRMED source-only: static _dst[8192] can overflow with large len. Debug function.