From: David Ahern <dsa@cumulusnetworks.com>
To: Nikolay Aleksandrov <razor@blackwall.org>, netdev@vger.kernel.org
Cc: shm@cumulusnetworks.com, davem@davemloft.net,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: Re: [PATCH net] vrf: fix double free and memory corruption on register_netdevice failure
Date: Sat, 21 Nov 2015 15:55:36 -0700 [thread overview]
Message-ID: <5650F668.8020502@cumulusnetworks.com> (raw)
In-Reply-To: <1448131579-20525-1-git-send-email-razor@blackwall.org>
On 11/21/15 11:46 AM, Nikolay Aleksandrov wrote:
> From: Nikolay Aleksandrov<nikolay@cumulusnetworks.com>
>
> When vrf's ->newlink is called, if register_netdevice() fails then it
> does free_netdev(), but that's also done by rtnl_newlink() so a second
> free happens and memory gets corrupted, to reproduce execute the
> following line a couple of times (1 - 5 usually is enough):
> $ for i in `seq 1 5`; do ip link add vrf: type vrf table 1; done;
> This works because we fail in register_netdevice() because of the wrong
> name "vrf:".
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Thanks, Nik.
next prev parent reply other threads:[~2015-11-21 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-21 18:46 [PATCH net] vrf: fix double free and memory corruption on register_netdevice failure Nikolay Aleksandrov
2015-11-21 22:55 ` David Ahern [this message]
2015-11-23 22:53 ` 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=5650F668.8020502@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=razor@blackwall.org \
--cc=shm@cumulusnetworks.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).