netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: maheshb@google.com
Cc: netdev@vger.kernel.org, edumazet@google.com, weiwan@google.com,
	mahesh@bandewar.net
Subject: Re: [PATCHv3 next] blackhole_netdev: fix syzkaller reported issue
Date: Tue, 15 Oct 2019 10:36:09 -0700 (PDT)	[thread overview]
Message-ID: <20191015.103609.86962935874616520.davem@davemloft.net> (raw)
In-Reply-To: <20191012011455.211242-1-maheshb@google.com>

From: Mahesh Bandewar <maheshb@google.com>
Date: Fri, 11 Oct 2019 18:14:55 -0700

> While invalidating the dst, we assign backhole_netdev instead of
> loopback device. However, this device does not have idev pointer
> and hence no ip6_ptr even if IPv6 is enabled. Possibly this has
> triggered the syzbot reported crash.
> 
> The syzbot report does not have reproducer, however, this is the
> only device that doesn't have matching idev created.
> 
> Crash instruction is :
> 
> static inline bool ip6_ignore_linkdown(const struct net_device *dev)
> {
>         const struct inet6_dev *idev = __in6_dev_get(dev);
> 
>         return !!idev->cnf.ignore_routes_with_linkdown; <= crash
> }
> 
> Also ipv6 always assumes presence of idev and never checks for it
> being NULL (as does the above referenced code). So adding a idev
> for the blackhole_netdev to avoid this class of crashes in the future.
> 
> ---
 ...
> Fixes: 8d7017fd621d ("blackhole_netdev: use blackhole_netdev to invalidate dst entries")
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>

Applied and queued up for -stable, thanks.

  reply	other threads:[~2019-10-15 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12  1:14 [PATCHv3 next] blackhole_netdev: fix syzkaller reported issue Mahesh Bandewar
2019-10-15 17:36 ` David Miller [this message]
2019-10-16  7:01   ` Mahesh Bandewar (महेश बंडेवार)

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=20191015.103609.86962935874616520.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=mahesh@bandewar.net \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=weiwan@google.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).