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

RX return-ring buffer index validated only by KKASSERT (compiled out without INVARIANTS)

Summary

bnx_rxeof at if_bnx.c:2812-2842: rxidx=cur_rx->bge_idx (NIC-controlled uint16) used to index bnx_rx_std_buf[BGE_STD_RX_RING_CNT=512]. Sole guard is KKASSERT(rxidx<512) which compiles to nothing without INVARIANTS. On INVARIANTS-less kernels OOB read/write of bnx_rx_std_ring trailing fields (DMA tag, ring map). Not directly network-exploitable (NIC firmware controls bge_idx not frame bytes); requires NIC bug or malicious PCIe device. On stock kernel (INVARIANTS on): panic. Fix: replace KKASSERT with hard runtime check.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-1148 Β· 1 files
FileTypeDescriptionSize
manifest.json file 392 B view raw

Fix verification

not_testable
baseline reproduced→ patch + rebuild →patched clean

recommended fix identified; fix.diff not authored/validated in this batch

recommended fix identified; fix.diff not authored/validated in this batch
combined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none (Info severity)

Evidence (decisive lines)

Source-confirmed at sys/dev/netif/bnx/if_bnx.c:2812: RX return-ring buffer index validated only by KKASSERT (compiled out)

Verified recommended fix

Source-confirmed at sys/dev/netif/bnx/if_bnx.c:2812: RX return-ring buffer index validated only by KKASSERT (compiled out)

Verdict

Source-confirmed at sys/dev/netif/bnx/if_bnx.c:2812: RX return-ring buffer index validated only by KKASSERT (compiled out)