numam-dpdk/lib/librte_ip_frag
Konstantin Ananyev b8d5dfd4a5 ip_frag: use key length for key comparison
Right now reassembly code relies on src_dst[] being all zeroes to
determine is it  free/occupied entry in the fragments table.
This is suboptimal and error prone - user can crash DPDK ip_reassembly
app by something like the following scapy script:
x=Ether(src=...,dst=...)/IP(dst='0.0.0.0',src='0.0.0.0',id=0)/('X'*1000)
frags=fragment(x, fragsize=500)
sendp(frags, iface=...)
To overcome that issue and reduce overhead of
'key invalidate'  and 'key is empty' operations -
add key_len into keys comparision procedure.

Fixes: 4f1a8f6338 ("ip_frag: add IPv6 reassembly")
Cc: stable@dpdk.org

Reported-by: Ryan E Hall <ryan.e.hall@intel.com>
Reported-by: Alexander V Gutkin <alexander.v.gutkin@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-11-06 01:58:11 +01:00
..
ip_frag_common.h ip_frag: use key length for key comparison 2018-11-06 01:58:11 +01:00
ip_frag_internal.c ip_frag: add function to delete expired entries 2018-09-19 19:45:38 +02:00
Makefile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
meson.build build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00
rte_ip_frag_common.c ip_frag: add function to delete expired entries 2018-09-19 19:45:38 +02:00
rte_ip_frag_version.map ip_frag: add function to delete expired entries 2018-09-19 19:45:38 +02:00
rte_ip_frag.h ip_frag: use key length for key comparison 2018-11-06 01:58:11 +01:00
rte_ipv4_fragmentation.c lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_ipv4_reassembly.c ip_frag: check fragment length of incoming packet 2018-11-06 01:58:03 +01:00
rte_ipv6_fragmentation.c lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte_ipv6_reassembly.c ip_frag: check fragment length of incoming packet 2018-11-06 01:58:03 +01:00