From: David Miller <davem@davemloft.net>
To: dsahern@kernel.org
Cc: netdev@vger.kernel.org, dsahern@gmail.com, edumazet@google.com
Subject: Re: [PATCH net] net/ipv6: prevent use after free in ip6_route_mpath_notify
Date: Tue, 05 Jun 2018 09:57:03 -0400 (EDT) [thread overview]
Message-ID: <20180605.095703.1475527736109371832.davem@davemloft.net> (raw)
In-Reply-To: <20180604204142.8941-1-dsahern@kernel.org>
From: dsahern@kernel.org
Date: Mon, 4 Jun 2018 13:41:42 -0700
> From: David Ahern <dsahern@gmail.com>
>
> syzbot reported a use-after-free:
...
> The problem is that rt_last can point to a deleted route if the insert
> fails.
>
> One reproducer is to insert a route and then add a multipath route that
> has a duplicate nexthop.e.g,:
> $ ip -6 ro add vrf red 2001:db8:101::/64 nexthop via 2001:db8:1::2
> $ ip -6 ro append vrf red 2001:db8:101::/64 nexthop via 2001:db8:1::4 nexthop via 2001:db8:1::2
>
> Fix by not setting rt_last until the it is verified the insert succeeded.
>
> Fixes: 3b1137fe7482 ("net: ipv6: Change notifications for multipath add to RTA_MULTIPATH")
> Cc: Eric Dumazet <edumazet@google.com>
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Signed-off-by: David Ahern <dsahern@gmail.com>
Applied and queued up for -stable, thanks David.
prev parent reply other threads:[~2018-06-05 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 20:41 [PATCH net] net/ipv6: prevent use after free in ip6_route_mpath_notify dsahern
2018-06-04 20:45 ` Eric Dumazet
2018-06-05 13: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=20180605.095703.1475527736109371832.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.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).