netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Wei Yongjun <weiyongjun1@huawei.com>,
	hulkci@huawei.com, Eric Dumazet <eric.dumazet@gmail.com>,
	Taehee Yoo <ap420073@gmail.com>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ip6_gre: fix null-ptr-deref in ip6gre_init_net()
Date: Mon, 13 Jul 2020 09:31:54 -0700	[thread overview]
Message-ID: <214b051c-c669-61c4-cd3e-5794334c7522@gmail.com> (raw)
In-Reply-To: <20200713155950.71793-1-weiyongjun1@huawei.com>



On 7/13/20 8:59 AM, Wei Yongjun wrote:
> KASAN report null-ptr-deref error when register_netdev() failed:
> 
>
> 
> ip6gre_tunnel_uninit() has set 'ign->fb_tunnel_dev' to NULL, later
> access to ign->fb_tunnel_dev cause null-ptr-deref. Fix it by saving
> 'ign->fb_tunnel_dev' to local variable ndev.
> 
> Fixes: dafabb6590cb ("ip6_gre: fix use-after-free in ip6gre_tunnel_lookup()")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>

Reviewed-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2020-07-13 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 15:59 [PATCH] ip6_gre: fix null-ptr-deref in ip6gre_init_net() Wei Yongjun
2020-07-13 16:31 ` Eric Dumazet [this message]
2020-07-14  0:33 ` 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=214b051c-c669-61c4-cd3e-5794334c7522@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=ap420073@gmail.com \
    --cc=hulkci@huawei.com \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=weiyongjun1@huawei.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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).