[ovs-dev] [PATCH 2/5] odp-util: Fix use of uninitialized erspan metadata.
Ilya Maximets
i.maximets at ovn.org
Tue Apr 20 10:09:04 UTC 2021
On 4/5/21 4:31 PM, William Tu wrote:
> On Sun, Apr 4, 2021 at 10:31 AM Ilya Maximets <i.maximets at ovn.org> wrote:
>>
>> 'struct erspan_metadata' contains union with fields of different
>> sizes, hence not all the memory initiliazed. This memory goes
>> to syscalls and also used to compare ukeys with memcmp which may
>> cause unexpected behavior.
>>
>> Thread 15 revalidator13:
>> Conditional jump or move depends on uninitialised value(s)
>> at 0x4C377B6: bcmp (vg_replace_strmem.c:1111)
>> by 0x43F844: ofpbuf_equal (ofpbuf.h:273)
>> by 0x43F844: revalidate_ukey__ (ofproto-dpif-upcall.c:2227)
>> by 0x43F9C9: revalidate_ukey (ofproto-dpif-upcall.c:2294)
>> by 0x4425C2: revalidate.isra.33 (ofproto-dpif-upcall.c:2734)
>> by 0x4434B8: udpif_revalidator (ofproto-dpif-upcall.c:943)
>> by 0x4FDE2C: ovsthread_wrapper (ovs-thread.c:383)
>> by 0x5E19159: start_thread (in /usr/lib64/libpthread-2.28.so)
>> by 0x69ECF72: clone (in /usr/lib64/libc-2.28.so)
>> Uninitialised value was created by a stack allocation
>> at 0x4B1CE0: tun_key_to_attr (odp-util.c:3129)
>>
>> CC: William Tu <u9012063 at gmail.com>
>> Fixes: 98514eea21f4 ("erspan: add kernel datapath support")
>> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
>> ---
>
> LGTM, Thanks.
> Acked-by: William Tu <u9012063 at gmail.com>
>
Thanks! Applied to master and backported down to 2.12.
Best regards, Ilya Maximets.
More information about the dev
mailing list