[ovs-dev] [PATCH v2] dpif-netlink: Fix dumping uninitialized netdev flow stats.

Simon Horman simon.horman at netronome.com
Tue Jan 7 14:29:20 UTC 2020


On Mon, Jan 06, 2020 at 12:33:21PM +0000, Roi Dayan wrote:
> 
> 
> On 2020-01-06 12:23 PM, Ilya Maximets wrote:
> > dpif logging functions expects to be called after the operation.
> > log_flow_del_message() dumps flow stats on success which are not
> > initialized before the actual call to netdev_flow_del():
> > 
> >  Conditional jump or move depends on uninitialised value(s)
> >     at 0x6090875: _itoa_word (_itoa.c:179)
> >     by 0x6093F0D: vfprintf (vfprintf.c:1642)
> >     by 0x60C090F: vsnprintf (vsnprintf.c:114)
> >     by 0xE5E7EC: ds_put_format_valist (dynamic-string.c:155)
> >     by 0xE5E755: ds_put_format (dynamic-string.c:142)
> >     by 0xE5A5E6: dpif_flow_stats_format (dpif.c:903)
> >     by 0xE5B708: log_flow_message (dpif.c:1763)
> >     by 0xE5BCA4: log_flow_del_message (dpif.c:1809)
> >     by 0xFA6076: try_send_to_netdev (dpif-netlink.c:2190)
> >     by 0xFA0D3C: dpif_netlink_operate (dpif-netlink.c:2248)
> >     by 0xE5AFAC: dpif_operate (dpif.c:1376)
> >     by 0xDF176E: push_dp_ops (ofproto-dpif-upcall.c:2367)
> >     by 0xDF04C8: push_ukey_ops (ofproto-dpif-upcall.c:2447)
> >     by 0xDF008F: revalidator_sweep__ (ofproto-dpif-upcall.c:2805)
> >     by 0xDF5DC6: revalidator_sweep (ofproto-dpif-upcall.c:2816)
> >     by 0xDF1E83: udpif_revalidator (ofproto-dpif-upcall.c:949)
> >     by 0xF3A3FE: ovsthread_wrapper (ovs-thread.c:383)
> >     by 0x565F6DA: start_thread (pthread_create.c:463)
> >     by 0x615988E: clone (clone.S:95)
> >   Uninitialised value was created by a stack allocation
> >     at 0xDEFC24: revalidator_sweep__ (ofproto-dpif-upcall.c:2733)
> > 
> > CC: Roi Dayan <roid at mellanox.com>
> > Fixes: 3cd99886191e ("dpif-netlink: Use dpif logging functions")
> > Signed-off-by: Ilya Maximets <i.maximets at ovn.org>

...

> Acked-by: Roi Dayan <roid at mellanox.com>

Thanks, applied to master.


More information about the dev mailing list