numam-dpdk/lib/librte_net
Bruce Richardson 8743d499a5 net: fix underflow for checksum of invalid IPv4 packets
If we receive a packet with an invalid IP header, where the total packet
length is reported as less than the IP header length, we would end up
getting an underflow in the length subtraction.

This could cause us to checksum e.g. 4GB of data in the case where the
result of the subtraction was -1.

We fix this by having the function return 0 - an invalid sum - when
the length is less than the header length.

Fixes: af75078fec ("first public release")
Fixes: 6006818cfb ("net: new checksum functions")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-12-21 16:22:41 +01:00
..
Makefile net: add MPLS header structure 2018-10-26 22:14:06 +02:00
meson.build net: add MPLS header structure 2018-10-26 22:14:06 +02:00
net_crc_neon.h lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
net_crc_sse.h add missing static keyword to globals 2018-10-29 02:01:08 +01:00
rte_arp.c add experimental tag to appropriate functions 2018-01-29 23:35:29 +01:00
rte_arp.h net: use SPDX tags 2018-02-01 02:27:22 +01:00
rte_esp.h align SPDX Mellanox copyrights 2018-04-11 01:47:47 +02:00
rte_ether.h net: support MPLS in software packet type parser 2018-10-26 22:14:06 +02:00
rte_gre.h net: fix build with pedantic 2018-11-05 15:01:25 +01:00
rte_icmp.h net: update licence for network headers 2018-01-05 19:23:29 +01:00
rte_ip.h net: fix underflow for checksum of invalid IPv4 packets 2018-12-21 16:22:41 +01:00
rte_mpls.h net: add MPLS header structure 2018-10-26 22:14:06 +02:00
rte_net_crc.c lib: fix shifting 32-bit signed variable 31 times 2018-11-06 01:14:05 +01:00
rte_net_crc.h lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_net_version.map lib: clear experimental version tag in linker scripts 2018-05-14 03:37:28 +02:00
rte_net.c net: support MPLS in software packet type parser 2018-10-26 22:14:06 +02:00
rte_net.h net: fix Intel prepare function for IP checksum offload 2018-09-28 01:41:02 +02:00
rte_sctp.h net: update licence for network headers 2018-01-05 19:23:29 +01:00
rte_tcp.h net: update licence for network headers 2018-01-05 19:23:29 +01:00
rte_udp.h net: update licence for network headers 2018-01-05 19:23:29 +01:00