netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bo YU <tsu.yubo@gmail.com>
To: Jon Maloy <jon.maloy@ericsson.com>
Cc: Hoang Huu Le <hoang.h.le@dektech.com.au>,
	"maloy@donjonn.com" <maloy@donjonn.com>,
	"ying.xue@windriver.com" <ying.xue@windriver.com>,
	"tipc-discussion@lists.sourceforge.net" 
	<tipc-discussion@lists.sourceforge.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [net-next] tipc: add NULL pointer check
Date: Thu, 4 Apr 2019 08:35:45 +0800	[thread overview]
Message-ID: <CAKq8=3JK6kX-GxU4TpUVby7V2DWvrk7f4wGOiiGmXYwCAjYGnQ@mail.gmail.com> (raw)
In-Reply-To: <BL0PR1501MB2003F99F437BCBD9BFAD8C1A9A570@BL0PR1501MB2003.namprd15.prod.outlook.com>

On Wed, Apr 3, 2019 at 10:27 PM Jon Maloy <jon.maloy@ericsson.com> wrote:
>
> > -----Original Message-----
> > From: Bo YU <tsu.yubo@gmail.com>
> > Sent: 3-Apr-19 09:10
> > To: Jon Maloy <jon.maloy@ericsson.com>
> > Cc: Hoang Huu Le <hoang.h.le@dektech.com.au>; maloy@donjonn.com;
> > ying.xue@windriver.com; tipc-discussion@lists.sourceforge.net;
> > netdev@vger.kernel.org
> > Subject: Re: [net-next] tipc: add NULL pointer check
> >
> > On Wed, Apr 3, 2019 at 8:55 PM Jon Maloy <jon.maloy@ericsson.com>
> > wrote:
> > >
> > > Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> > >
> > > 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.
Ok, thank you for explation.
>
> ///jon
>
> > >
> > >
> > > > -----Original Message-----
> > > > From: netdev-owner@vger.kernel.org <netdev-
> > owner@vger.kernel.org> On
> > > > Behalf Of Hoang Le
> > > > Sent: 3-Apr-19 02:05
> > > > To: Jon Maloy <jon.maloy@ericsson.com>; maloy@donjonn.com;
> > > > ying.xue@windriver.com; tipc-discussion@lists.sourceforge.net;
> > > > netdev@vger.kernel.org
> > > > 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 <tuong.t.lien@dektech.com.au>
> > > > Acked-by: Ying Xue <ying.xue@windriver.com>
> > > > Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
> > > > ---
> > > >  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
> > >

  reply	other threads:[~2019-04-04  0:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  6:05 [net-next] tipc: add NULL pointer check Hoang Le
2019-04-03 12:52 ` Jon Maloy
2019-04-03 13:09   ` Bo YU
2019-04-03 14:27     ` Jon Maloy
2019-04-04  0:35       ` Bo YU [this message]
2019-04-05  0:34 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKq8=3JK6kX-GxU4TpUVby7V2DWvrk7f4wGOiiGmXYwCAjYGnQ@mail.gmail.com' \
    --to=tsu.yubo@gmail.com \
    --cc=hoang.h.le@dektech.com.au \
    --cc=jon.maloy@ericsson.com \
    --cc=maloy@donjonn.com \
    --cc=netdev@vger.kernel.org \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=ying.xue@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).