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

Fragment overlap trim uses non-8-aligned shifts for last-fragment overlaps: inconsistent reassembly metadata

Summary

pf_reassemble overlap trim(:412-413,434-436): updates ip_off via (precut>>3) and (aftercut>>3). Non-final fragments guaranteed 8-byte aligned (checked :943). LAST fragment (MF=0) ip_len need not be 8-aligned -> precut/aftercut non-aligned -> >>3 truncation produces incorrect ip_off inconsistent with actual m_adj byte trim. Subtle payload corruption or normalization bypass. Not memory safety: all lengths bounded by IP_MAXPACKET checks.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0392 Β· 2 files
FileTypeDescriptionSize
VERDICT.md verdict source verification verdict 750 B ↓ raw
fix.diff suggested-fix fix for logic bug 377 B view raw
VERDICT.md verdict source verification verdict
↓ download raw

DF-0392 - Verification Verdict

Verdict: REPRODUCED (source-only confirmation)

Bug class: logic

Impact: none

Source file: sys/net/pf/pf_norm.c

Mechanism

CONFIRMED: pf_reassemble overlap trim uses (precut>>3) for last fragment (MF=0) which need not be 8-aligned. Truncation produces incorrect ip_off. Fix: round precut down to 8-byte boundary.

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/pf/pf_norm.c:412.

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/pf/pf_norm.c:412. Combined kernel build with all 70 fixes: rc=0, -Werror.

PoC changes

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

Verified recommended fix

Round precut down to 8-byte boundary before >>3. Matches finding proposal.

Verdict

CONFIRMED source-only: overlap trim (precut>>3) incorrect for non-8-aligned last fragment.