HomeFreeBSD

run(4): add more length checks in Rx path.

Description

run(4): add more length checks in Rx path.

  • Discard frames that are bigger than MCLBYTES (to prevent buffer overrun).
  • Check buffer length before accessing its contents.
  • Fix len <-> dmalen check - the last includes Rx Wireless information

structure size.

  • Fix out-of-bounds read during Rx node search for ACK / CTS frames

(monitor mode only).

While here:

  • Mark few suspicious places with comments.
  • Move common cleanup to the function end.

MFC after: 1 week

Details

Provenance
avosAuthored on
Parents
rS343233: cxgbe(4): Clear the reply-pending status of a hashfilter when the reply
Branches
Unknown
Tags
Unknown