DragonFlyBSD Kernel Audit
← dashboard
DF-0372

Undefined behavior shift 1 << if_dunit for member NIC unit numbers >= 32

Summary

RX-test bitmap check(:310) and TX-test(:1835) perform 1<<lp->lp_ifp->if_dunit where if_dunit is member NIC unit. For unit>=32 this is UB (shift >= width of int). u_int32_t bitmap cannot represent bits >=32 anyway. Debug facility misbehaves on dense NICs. No security impact.