Potential OOB ring access in netmap_bwrap_register for NICs with asymmetric TX/RX ring counts
Summary
netmap_bwrap_register(:1699-1706): ring cross-link iterates na->num_tx_rings accessing hwna->tx_rings[i]. But na->num_tx_rings=hwna->num_rx_rings (bwrap_attach:1866). If NIC num_rx_rings>num_tx_rings: accesses hwna->tx_rings past its allocation. Most NICs symmetric so unlikely; malicious/buggy driver config could exploit.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0404 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | source verification verdict | 739 B | β raw |
| fix.diff | suggested-fix | fix for oob-access bug | 451 B | view raw |
DF-0404 - Verification Verdict
Verdict: REPRODUCED (source-only confirmation)
Bug class: oob-access
Impact: dos
Source file: sys/net/netmap/netmap_vale.c
Mechanism
CONFIRMED: bwrap_register ring cross-link iterates na->num_tx_rings(=hwna->num_rx_rings) accessing hwna->tx_rings. OOB if NIC asymmetric. Fix: use min of both counts.
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
fixedVALIDATED: fix.diff compiles cleanly in combined kernel build (rc=0, -Werror). Source trace confirms bug at sys/net/netmap/netmap_vale.c:1699.
Combined build: 70 fix.diffs applied to /usr/src, nativekernel KERNCONF=X86_64_GENERIC rc=0 -Werror. All fixes compile.
Confirmed kernel references
- s
- y
- s
- /
- n
- e
- t
- /
- n
- e
- t
- m
- a
- p
- /
- n
- e
- t
- m
- a
- p
- _
- v
- a
- l
- e
- .
- c
- :
- 1
- 6
- 9
- 9
Detail
Exploit chain
none (non-corruption Low severity finding; source-only confirmation)
Evidence (decisive lines)
Source-traced at sys/net/netmap/netmap_vale.c:1699. Combined kernel build with all 70 fixes: rc=0, -Werror.
PoC changes
Created fix.diff for DF-0404. No PoC binary (source-only verification).
Verified recommended fix
Use min(na->num_tx_rings, hwna->num_tx_rings). Matches finding proposal.
Verdict
CONFIRMED source-only: bwrap_register cross-links using wrong ring count. OOB if NIC asymmetric.
No comments yet.