Re: [PATCH] datapath.c: fix missing return value check of nla_nest_start()

2018-08-22 Thread Pravin Shelar
On Tue, Aug 21, 2018 at 4:38 PM David Miller wrote: > > From: Pravin Shelar > Date: Tue, 21 Aug 2018 15:38:28 -0700 > > > On Fri, Aug 17, 2018 at 1:15 AM Jiecheng Wu wrote: > >> > >> Function queue_userspace_packet() defined in net/openvswitch/datapath.c > >> calls nla_nest_start() to allocate

Re: [PATCH] datapath.c: fix missing return value check of nla_nest_start()

2018-08-21 Thread David Miller
From: Pravin Shelar Date: Tue, 21 Aug 2018 15:38:28 -0700 > On Fri, Aug 17, 2018 at 1:15 AM Jiecheng Wu wrote: >> >> Function queue_userspace_packet() defined in net/openvswitch/datapath.c >> calls nla_nest_start() to allocate memory for struct nlattr which is >> dereferenced immediately. As

Re: [PATCH] datapath.c: fix missing return value check of nla_nest_start()

2018-08-21 Thread Pravin Shelar
On Fri, Aug 17, 2018 at 1:15 AM Jiecheng Wu wrote: > > Function queue_userspace_packet() defined in net/openvswitch/datapath.c calls > nla_nest_start() to allocate memory for struct nlattr which is dereferenced > immediately. As nla_nest_start() may return NULL on failure, this code piece >

[PATCH] datapath.c: fix missing return value check of nla_nest_start()

2018-08-17 Thread Jiecheng Wu
Function queue_userspace_packet() defined in net/openvswitch/datapath.c calls nla_nest_start() to allocate memory for struct nlattr which is dereferenced immediately. As nla_nest_start() may return NULL on failure, this code piece may cause NULL pointer dereference bug. ---