netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pabeni@redhat.com
Cc: netdev@vger.kernel.org, dsa@cumulusnetworks.com
Subject: Re: [PATCH net v2] ipv4/route: fail early when inet dev is missing
Date: Wed, 06 Mar 2019 10:37:57 -0800 (PST)	[thread overview]
Message-ID: <20190306.103757.1493556167593143047.davem@davemloft.net> (raw)
In-Reply-To: <e072f8896f934e4c20c53abbd2c2f8a4ff67a415.1551864955.git.pabeni@redhat.com>

From: Paolo Abeni <pabeni@redhat.com>
Date: Wed,  6 Mar 2019 10:42:53 +0100

> If a non local multicast packet reaches ip_route_input_rcu() while
> the ingress device IPv4 private data (in_dev) is NULL, we end up
> doing a NULL pointer dereference in IN_DEV_MFORWARD().
> 
> Since the later call to ip_route_input_mc() is going to fail if
> !in_dev, we can fail early in such scenario and avoid the dangerous
> code path.
> 
> v1 -> v2:
>  - clarified the commit message, no code changes
> 
> Reported-by: Tianhao Zhao <tizhao@redhat.com>
> Fixes: e58e41596811 ("net: Enable support for VRF with ipv4 multicast")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> Reviewed-by: David Ahern <dsahern@gmail.com>

Applied and queued up for -stable.

      reply	other threads:[~2019-03-06 18:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06  9:42 [PATCH net v2] ipv4/route: fail early when inet dev is missing Paolo Abeni
2019-03-06 18:37 ` 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=20190306.103757.1493556167593143047.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).