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

parse_beacon VENDOR branch stores pre-draft HT-info IE into scan->htcap instead of scan->htinfo (copy-paste typo)

Summary

ieee80211_input.c:652-655: the ishtinfooui branch assigns frm to scan->htcap although its own guard tests scan->htinfo - the cross-file lead from the scan_sta pass-2 audit, confirmed. Effects: (1) beacons with a vendor HTINFO IE and no standard HTINFO leave scan->htinfo NULL, and every consumer gates on htcap&&htinfo, so STAs associate without 802.11n - remote unauthenticated feature DoS of pre-draft/vendor HT networks; (2) with a standard HTINFO also present, scan->htcap points at htinfo bytes and HT-capability negotiation is fed mis-typed data (wrong MCS/AMPDU config) if the vendor IE is padded to pass the >=30-byte gate - no OOB (the gate bounds later reads); (3) a genuine vendor HTCAP arriving after a vendor HTINFO is silently dropped. FreeBSD fixed this same typo in wlan years ago. Fix: 'scan->htinfo = frm;'.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-3404 Β· 2 files
FileTypeDescriptionSize
README.md β€” 2.6 KB ↓ raw
verdict.json β€” 1.9 KB view raw

DF-3404 β€” ieee80211_parse_beacon VENDOR branch stores pre-draft HT-info IE into scan->htcap (copy-paste typo)

What

sys/netproto/802_11/wlan/ieee80211_input.c:644-656:

} else if (vap->iv_flags_ht & IEEE80211_FHT_HTCOMPAT) {
        if (ishtcapoui(frm)) {
                if (scan->htcap == NULL)
                        scan->htcap = frm;
        } else if (ishtinfooui(frm)) {
                if (scan->htinfo == NULL)
                        scan->htcap = frm;      /* <-- TYPO: should be scan->htinfo */
        }
}

The ishtinfooui branch assigns to scan->htcap instead of scan->htinfo (the guard even tests scan->htinfo, proving the intent). This is the lead noted in the pass-2 task_log from the ieee80211_scan_sta audit; verified present in this tree.

Consequences (characterized):

  1. Pre-draft/vendor HT networks lose HT entirely (feature DoS). A beacon carrying a Broadcom-OUI HTINFO vendor IE (and no standard HTINFO, id 61) leaves scan->htinfo == NULL; every consumer gates on htcap != NULL && htinfo != NULL (ieee80211_sta.c:1397-1404, :1701-1705: ieee80211_ht_updateparams/ieee80211_setup_htrates never run) β€” the STA associates without 802.11n. Remote, unauthenticated (beacon-driven), but only degrades throughput/feature, no memory unsafety.

  2. Mis-typed IE feeds HT negotiation. If a standard HTINFO (id 61) is also present, scan->htcap ends up pointing at the htinfo vendor IE. The post-loop gate (:733-738) then demands the vendor-HTCAP length (β‰₯ 4+26 = 30) of it, so a padded vendor htinfo IE passes and consumers parse HT-info bytes (MCS/rate fields at htcap offsets) as HT capabilities β€” corrupt HT capability negotiation (sta.c:1398-1404 / :1704-1713). No OOB: the β‰₯30-byte length check bounds every later fixed-offset read, and consumers re-derive from the same IE.

If the vendor htinfo IE is its natural length (26), the :733 check nulls scan->htcap β€” both HT IEs lost (same DoS as (1)).

  1. Vendor HTCAP IE silently dropped whenever a vendor HTINFO was seen first (if (scan->htcap == NULL) guard fails) β€” real capabilities lost.

FreeBSD fixed this same typo in wlan (r209365-era "fix HT IE parsing copy/paste bug"); the DFly tree retains it.

Impact

Low / certain (typo proven; effects characterized above: remote feature-level DoS of pre-draft HT + mis-typed IE into HT negotiation; no memory unsafety). Phase V skipped (Low, logic bug β€” per contract).

Fix

        } else if (ishtinfooui(frm)) {
            if (scan->htinfo == NULL)
-               scan->htcap = frm;
+               scan->htinfo = frm;
        }

Fix verification

not_testable
per-fix-DF-3404

Confirmed kernel references

Detail

Evidence (decisive lines)

['findings/poc/DF-3404/README.md']

PoC changes

n/a (Phase V skipped for this Low finding per batch contract)

Verified recommended fix

Change scan->htcap = frm to scan->htinfo = frm in the ishtinfooui branch (one line)

Verdict

ieee80211_parse_beacon VENDOR branch (ieee80211_input.c:652-655): the ishtinfooui case assigns frm to scan->htcap instead of scan->htinfo (copy-paste typo; the guard tests scan->htinfo, proving intent). Verified present and characterized: (1) beacons carrying pre-draft vendor HTINFO without standard HTINFO leave scan->htinfo NULL, and every consumer gates on htcap&&htinfo (sta.c:1397-1404/:1701-1705), so the STA associates without 802.11n -- remote unauthenticated feature DoS; (2) with a standard HTINFO also present, scan->htcap points at htinfo bytes and HT-capability negotiation is fed mis-typed data (wrong MCS config) if the vendor IE is padded to pass the >=30-byte length gate at :733-738 -- no OOB (the gate bounds all later reads); (3) a genuine vendor HTCAP seen after a vendor HTINFO is silently dropped. Logic/interop bug, certain; Phase V skipped (Low).