DragonFlyBSD Kernel Audit
DF-0670 / fix_run.log
← back to finding ↓ download raw
=== PATCHED-MODULE TEST START (single-fix ipfw3_basic.ko with DF-0669+DF-0670 fixes) ===
Sun Jul 19 06:00:55 UTC 2026
[+] kernel: DragonFly 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026
[+] ipfw3_basic.ko sha256: 5eac256bf52a1f11b2214e08f5fe8faef1feaaf8b40c4857a55ff8ec13b1517e
ipfw3 initialized, default to deny
kldload ipfw3 rc=0
ipfw3 module basic loaded
kldload ipfw3_basic rc=0
=== DF-0669 PoC (should NOT panic on patched module) ===
[+] DF-0669: setsockopt(IPPROTO_IP, IP_FW_X, opcode=74) on never-created table id=0
[!] setsockopt returned 0 errno=0 (Undefined error: 0)
DF0669_EXIT=0
=== DF-0669 PoC IP_FW_TABLE_FLUSH (also vulnerable originally) ===
[+] DF-0669: setsockopt(IPPROTO_IP, IP_FW_X, opcode=78) on never-created table id=0
[!] setsockopt returned 0 errno=0 (Undefined error: 0)
DF0669_FLUSH_EXIT=0
=== DF-0670 PoC (setsockopt should return EINVAL=22 on patched module) ===
=== RUN 0 ===
  create(valsize=4) rc=-1 errno=22
  list rc=0. table_ctx[0].id=0 type=0x00000000 count=0
  ...
=== RUN 1 ===
  create(valsize=4) rc=-1 errno=22
  ...
=== RUN 2 ===
  create(valsize=4) rc=-1 errno=22
  ...
DF0670_EXIT=0
=== PATCHED-MODULE TEST END ===

Fix-validation verdict:
- DF-0669: BASELINE panicked (Fatal trap 12 @ VA=0x28) on this exact PoC;
  PATCHED module returns setsockopt=0 cleanly with NO panic for both
  IP_FW_TABLE_DELETE (74) and IP_FW_TABLE_FLUSH (78). FIX CLOSED THE BUG.
- DF-0670: BASELINE accepted the short buffer (create rc=0); PATCHED module
  rejects it with EINVAL=22 (the new sopt_valsize check fires), so the OOB
  read dispatch is never reached. FIX CLOSED THE BUG.

Patched module: /boot/kernel/ipfw3_basic.ko
  sha256 = 5eac256bf52a1f11b2214e08f5fe8faef1feaaf8b40c4857a55ff8ec13b1517e
  (baseline was 3c3af7cf53174a43b09a4d8cd4d921fbc32838b4e2524ab21e043a93b39cf6ef)
Kernel unchanged (#0 master DEV baseline).