[ovs-build] Broken: ovn-org/ovn#492 (branch-20.06 - 3e5bc9a)

Travis CI builds at travis-ci.org
Wed Oct 21 21:02:15 UTC 2020


Build Update for ovn-org/ovn
-------------------------------------

Build: #492
Status: Broken

Duration: 48 mins and 20 secs
Commit: 3e5bc9a (branch-20.06)
Author: Han Zhou
Message: ovn-ic: Fix route hash.

The 'nexthop' that passed to ic_route_hash() is not fully initialized in
get_nexthop_from_lport_addresses(). 'nexthop' has type of 'struct v46_ip' which
contains a union to share space for ipv4 and ipv6 address.  If only ipv4
initialized where is a plenty of uninitialized space that goes to
hash_bytes(nexthop, sizeof *nexthop, basis).

Impact: there are two places where this function is called.

1. In add_to_routes_ad(), the nexthop is initialized in parse_route() before
   calling get_nexthop_from_lport_addresses(), luckily.

2. In add_network_to_routes_ad(), we are unlucky.  When a directly connected
network of a router is found to be advertised, if the route already existed in
the global IC-SB, it may not be found due to the hash difference, and results
in the existing route being deleted and the same one recreated, unnecessarily.

This patch fixes the problem by initializing the struct to zero before setting
the fields.

>From Ilya's report:
> Report from MemorySanitizer:
>
> ==3074629==WARNING: MemorySanitizer: use-of-uninitialized-value
>     #0 0x67177e in mhash_add__ ovs/./lib/hash.h:66:9
>     #1 0x671668 in mhash_add ovs/./lib/hash.h:78:12
>     #2 0x6701e9 in hash_bytes ovs/lib/hash.c:38:16
>     #3 0x524b4a in add_network_to_routes_ad ic/ovn-ic.c:1095:5
>     #4 0x51eea3 in route_run ic/ovn-ic.c:1424:21
>     #5 0x51887b in main ic/ovn-ic.c:1674:17
>     #6 0x7fd4ce7871a2 in __libc_start_main
>     #7 0x49c90d in _start (ic/ovn-ic+0x49c90d)
>
>   Uninitialized value was created by an allocation of 'nexthop' in the
>   stack frame of function 'add_network_to_routes_ad'
>     #0 0x5245f0 in add_network_to_routes_ad ic/ovn-ic.c:1069

Reported-by: Ilya Maximets <i.maximets at ovn.org>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2020-October/376160.html
Fixes: 57b347c55 ("ovn-ic: Route advertisement.")
Acked-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Han Zhou <hzhou at ovn.org>

View the changeset: https://github.com/ovn-org/ovn/compare/a66d71469849...3e5bc9a1655e

View the full build log and details: https://travis-ci.org/github/ovn-org/ovn/builds/737771565?utm_medium=notification&utm_source=email


--

You can unsubscribe from build emails from the ovn-org/ovn repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=24187664&utm_medium=notification&utm_source=email.
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email.
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-build/attachments/20201021/2b9f59fb/attachment.html>


More information about the build mailing list