This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 42184679185ce0c979e065349360167e3fce6ca0 (commit)
from 120e914768f731f18083afd950fba6a6793cca45 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 42184679185ce0c979e065349360167e3fce6ca0
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Wed Aug 30 10:47:45 2017 +0300
helper: chksum: add few guarding conditions
Add few guarding conditions, otherwise bad packet can hang up ODP code.
Noted by one of the corner case tests for IPsec.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h
index e0d5c3bf..fb7e5ddc 100644
--- a/helper/include/odp/helper/ip.h
+++ b/helper/include/odp/helper/ip.h
@@ -100,10 +100,12 @@ static inline int odph_ipv4_csum(odp_packet_t pkt,
odph_ipv4hdr_t *ip,
odp_u16sum_t *chksum)
{
- int nleft = ODPH_IPV4HDR_IHL(ip->ver_ihl) * 4;
+ unsigned nleft = ODPH_IPV4HDR_IHL(ip->ver_ihl) * 4;
uint16_t buf[nleft / 2];
int res;
+ if (odp_unlikely(nleft < sizeof(*ip)))
+ return -1;
ip->chksum = 0;
memcpy(buf, ip, sizeof(*ip));
res = odp_packet_copy_to_mem(pkt, offset + sizeof(*ip),
@@ -135,7 +137,9 @@ static inline int odph_ipv4_csum_valid(odp_packet_t pkt)
if (offset == ODP_PACKET_OFFSET_INVALID)
return 0;
- odp_packet_copy_to_mem(pkt, offset, sizeof(odph_ipv4hdr_t), &ip);
+ res = odp_packet_copy_to_mem(pkt, offset, sizeof(odph_ipv4hdr_t), &ip);
+ if (odp_unlikely(res < 0))
+ return 0;
chksum = ip.chksum;
-----------------------------------------------------------------------
Summary of changes:
helper/include/odp/helper/ip.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 11fed684507a320fbb79dc86769c8f1755d0276f (commit)
from 6a360e61978d03d12dbfff8c34c20cf95170a1c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 11fed684507a320fbb79dc86769c8f1755d0276f
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Mon Aug 28 15:55:34 2017 +0300
helper: move include files to helper/include
Repair build with --enable-helper-linux option.
https://bugs.linaro.org/show_bug.cgi?id=3216
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/helper/Makefile.am b/helper/Makefile.am
index 2c5452dc..c69fd678 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -42,8 +42,8 @@ helperlinuxinclude_HEADERS = \
endif
noinst_HEADERS = \
- $(srcdir)/odph_debug.h \
- $(srcdir)/odph_list_internal.h
+ $(srcdir)/include/odph_debug.h \
+ $(srcdir)/include/odph_list_internal.h
__LIB__libodphelper_la_SOURCES = \
eth.c \
diff --git a/helper/odph_debug.h b/helper/include/odph_debug.h
similarity index 100%
rename from helper/odph_debug.h
rename to helper/include/odph_debug.h
diff --git a/helper/odph_list_internal.h b/helper/include/odph_list_internal.h
similarity index 100%
rename from helper/odph_list_internal.h
rename to helper/include/odph_list_internal.h
-----------------------------------------------------------------------
Summary of changes:
helper/Makefile.am | 4 ++--
helper/{ => include}/odph_debug.h | 0
helper/{ => include}/odph_list_internal.h | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename helper/{ => include}/odph_debug.h (100%)
rename helper/{ => include}/odph_list_internal.h (100%)
hooks/post-receive
--