From: Ben Hutchings Date: Fri, 6 Dec 2013 19:26:40 +0000 (+0000) Subject: sfc: Add length checks to efx_xmit_with_hwtstamp() and efx_ptp_is_ptp_tx() X-Git-Tag: v3.13-rc4~3^2~32^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5a498e943fbc497f236ab8cf31366c75f337ce6;p=pandora-kernel.git 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: 7c236c43b838 ('sfc: Add support for IEEE-1588 PTP') Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed