From: Jon M. <jon...@er...> - 2019-04-03 15:21:36
|
> -----Original Message----- > From: Bo YU <tsu...@gm...> > Sent: 3-Apr-19 09:10 > To: Jon Maloy <jon...@er...> > Cc: Hoang Huu Le <hoa...@de...>; ma...@do...; > yin...@wi...; tip...@li...; > ne...@vg... > Subject: Re: [net-next] tipc: add NULL pointer check > > On Wed, Apr 3, 2019 at 8:55 PM Jon Maloy <jon...@er...> > wrote: > > > > Acked-by: Jon Maloy <jon...@er...> > > > > Although "somehow" is not the good term here,- the reason is obvious > when looking into tipc_sk_proto_rcv(). > If so,skb_peek in tipc_mcast_xmit() maybe alert? Don't understand your question. tipc_mcast_xmit() is on the send path, we are on the receive path here. Besides, this is a completely normal occurrence, so no need for any warning. ///jon > > > > > > > -----Original Message----- > > > From: net...@vg... <netdev- > ow...@vg...> On > > > Behalf Of Hoang Le > > > Sent: 3-Apr-19 02:05 > > > To: Jon Maloy <jon...@er...>; ma...@do...; > > > yin...@wi...; tip...@li...; > > > ne...@vg... > > > Subject: [net-next] tipc: add NULL pointer check > > > > > > skb somehow dequeued out of inputq before processing, it causes to > > > NULL pointer and kernel crashed. > > > > > > Add checking skb valid before using. > > > > > > Fixes: c55c8edafa9 ("tipc: smooth change between replicast and > > > broadcast") > > > Reported-by: Tuong Lien Tong <tuo...@de...> > > > Acked-by: Ying Xue <yin...@wi...> > > > Signed-off-by: Hoang Le <hoa...@de...> > > > --- > > > net/tipc/bcast.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index > > > 76e14dc08bb9..6c997d4a6218 100644 > > > --- a/net/tipc/bcast.c > > > +++ b/net/tipc/bcast.c > > > @@ -769,6 +769,9 @@ void tipc_mcast_filter_msg(struct net *net, > > > struct sk_buff_head *defq, > > > u32 node, port; > > > > > > skb = skb_peek(inputq); > > > + if (!skb) > > > + return; > > > + > > > hdr = buf_msg(skb); > > > > > > if (likely(!msg_is_syn(hdr) && skb_queue_empty(defq))) > > > -- > > > 2.17.1 > > |