Skip to content
Commit e5a498e9 authored by Ben Hutchings's avatar Ben Hutchings
Browse files

sfc: Add length checks to efx_xmit_with_hwtstamp() and efx_ptp_is_ptp_tx()

efx_ptp_is_ptp_tx() must be robust against skbs from raw sockets that
have invalid IPv4 and UDP headers.

Add checks that:
- the transport header has been found
- there is enough space between network and transport header offset
  for an IPv4 header
- there is enough space after the transport header offset for a
  UDP header

Fixes: 7c236c43

 ('sfc: Add support for IEEE-1588 PTP')
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent e1ca87bb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment