⬢ DragonFlyBSD Kernel Audit
DF-3752 / verdict.json
← back to finding ↓ download raw
{
  "finding_id": "DF-3752",
  "status": "not_reproduced",
  "reproduced": 0,
  "impact": "none",
  "confidence": "certain",
  "verdict": "rt2860_drain_stats_fifo declares retrycnt (rt2860.c:1129) and assigns it only in the TXQ_OK branch (rt2860.c:1153-1156); the TX_FAILURE branch passes &retrycnt to ieee80211_ratectl_tx_complete (rt2860.c:1160-1161), and amrr_tx_complete dereferences arg1 unconditionally (ieee80211_amrr.c:364) doing amn->amn_retrycnt += garbage. Uninitialized stack read consumed by the rate controller on every failed-frame stat -- UB per the C standard, corrupts AMRR retry accounting with interrupt-path stack residue. Source-certain; runtime impact is wrong rate adaptation (observable behavior), no direct info leak. Not reproduced: guest has no Ralink NIC (env.txt).",
  "exploit_chain": "",
  "evidence": "README.md (the three code sites), fix.diff (retrycnt = 0 in else branch; git apply --check passes)",
  "kernel_refs": [
    "sys/dev/netif/ral/rt2860.c:1129",
    "sys/dev/netif/ral/rt2860.c:1153",
    "sys/dev/netif/ral/rt2860.c:1160",
    "sys/netproto/802_11/ieee80211_ratectl.h:99",
    "sys/netproto/802_11/wlan/ieee80211_amrr.c:364"
  ],
  "poc_changes": "Analysis-only (hardware precondition).",
  "attempts": 1,
  "guest_uname": "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",
  "runtime_sec": 6,
  "guest_dirty": 0,
  "build_cmd": "",
  "run_cmd": "dfbsd-qemu/vm.sh run_root pciconf -lv | grep ralink",
  "code_hash": "",
  "notes": "Contrast: rt2860_tx_raw validates its rate-table lookup (rt2860.c:1834) while rt2860_tx does not -- same pattern of half-maintained invariants in this driver.",
  "recommended_fix": "Initialize retrycnt = 0 before the TX_FAILURE ieee80211_ratectl_tx_complete call.",
  "fix_status": "not_testable",
  "fix_baseline_reproduced": 0,
  "fix_patched_reproduced": 0,
  "fix_verdict": "One-line initialization removes the UB; compile-consistent.",
  "fix_evidence": "fix.diff (git apply --check passes against pristine sys/)"
}