numam-dpdk/examples/ipsec-secgw
Tomasz Duszynski 3417350e7f examples/ipsec-secgw: fix IP version check
Since new_ip and ip4 are overlapping buffers copying ip4 over new_ip
using memmove() might overwrite memory at ip4. This could happen if
following condition holds:

ip_hdr_len > sizeof(struct esp_hdr) + sa->iv_len

Thus using ip4 to check ip version is wrong as it might not contain
proper value.

Fixes: f159e70b09 ("examples/ipsec-secgw: support transport mode")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Reviewed-by: Aviad Yehezkel <aviadye@mellanox.com>
2017-10-25 18:10:32 +02:00
..
ep0.cfg examples/ipsec-secgw: add sample configuration files 2016-10-04 20:41:09 +02:00
ep1.cfg examples/ipsec-secgw: add sample configuration files 2016-10-04 20:41:09 +02:00
esp.c examples/ipsec-secgw: fix IP version check 2017-10-25 18:10:32 +02:00
esp.h examples/ipsec-secgw: rework processing loop 2016-06-21 12:07:25 +02:00
ipip.h examples/ipsec-secgw: fix build with gcc 4.5 2016-07-22 11:53:32 +02:00
ipsec-secgw.c examples: fix port id type 2017-10-13 21:57:49 +02:00
ipsec.c cryptodev: support device independent sessions 2017-07-06 22:34:55 +02:00
ipsec.h cryptodev: do not create session mempool internally 2017-07-06 22:34:55 +02:00
Makefile examples/ipsec-secgw: support configuration file 2016-10-04 20:41:09 +02:00
parser.c examples/ipsec-secgw: fix configuration parsing 2016-11-07 21:44:42 +01:00
parser.h examples/ipsec-secgw: support configuration file 2016-10-04 20:41:09 +02:00
rt.c examples/ipsec-secgw: support configuration file 2016-10-04 20:41:09 +02:00
sa.c cryptodev: rename ADD field 2017-07-19 14:10:41 +03:00
sp4.c examples/ipsec-secgw: support configuration file 2016-10-04 20:41:09 +02:00
sp6.c examples/ipsec-secgw: support configuration file 2016-10-04 20:41:09 +02:00