Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix ip version check

2017-10-16 Thread Aviad Yehezkel
Reviewed-by: Aviad Yehezkel On 10/16/2017 12:56 PM, Sergio Gonzalez Monroy wrote: On 13/10/2017 13:50, Tomasz Duszynski wrote: 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: i

Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix ip version check

2017-10-16 Thread Sergio Gonzalez Monroy
On 13/10/2017 13:50, Tomasz Duszynski wrote: 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

[dpdk-dev] [PATCH] examples/ipsec-secgw: fix ip version check

2017-10-13 Thread Tomasz Duszynski
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. F