netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hoang.h.le@dektech.com.au
Cc: jon.maloy@ericsson.com, maloy@donjonn.com,
	ying.xue@windriver.com, tipc-discussion@lists.sourceforge.net,
	netdev@vger.kernel.org
Subject: Re: [net-next v1 1/2] tipc: fix use-after-free in tipc_sk_filter_rcv
Date: Thu, 21 Mar 2019 09:57:12 -0700 (PDT)	[thread overview]
Message-ID: <20190321.095712.792633629065636362.davem@davemloft.net> (raw)
In-Reply-To: <20190321102518.5048-1-hoang.h.le@dektech.com.au>

From: Hoang Le <hoang.h.le@dektech.com.au>
Date: Thu, 21 Mar 2019 17:25:17 +0700

> skb free-ed in:
>   1/ condition 1: tipc_sk_filter_rcv -> tipc_sk_proto_rcv
>   2/ condition 2: tipc_sk_filter_rcv -> tipc_group_filter_msg
> This leads to a "use-after-free" access in the next condition.
> 
> We fix this by intializing the variable at declaration, then it is safe
> to check this variable to continue processing if condition matches.
> 
> syzbot report:
 ...
> Reported-by: syzbot+e863893591cc7a622e40@syzkaller.appspotmail.com
> Fixes: c55c8eda ("tipc: smooth change between replicast and broadcast")
> Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>

Applied.

      parent reply	other threads:[~2019-03-21 16:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 10:25 [net-next v1 1/2] tipc: fix use-after-free in tipc_sk_filter_rcv Hoang Le
2019-03-21 10:25 ` [net-next v1 2/2] tipc: fix a null pointer deref Hoang Le
2019-03-21 16:57   ` David Miller
2019-03-21 16:57 ` David Miller [this message]

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=20190321.095712.792633629065636362.davem@davemloft.net \
    --to=davem@davemloft.net \
    --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).