public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech•com>
To: Daniel Borkmann <dborkman@redhat•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org,
	Salam Noureddine <noureddine@aristanetworks•com>,
	Eric Dumazet <eric.dumazet@gmail•com>
Subject: Re: [PATCH v3] packet: fix use after free race in send path when dev is released
Date: Thu, 21 Nov 2013 14:40:22 -0800	[thread overview]
Message-ID: <528E8BD6.3060200@candelatech.com> (raw)
In-Reply-To: <1385049058-1946-1-git-send-email-dborkman@redhat.com>

On 11/21/2013 07:50 AM, Daniel Borkmann wrote:
> Salam reported a use after free bug in PF_PACKET that occurs when
> we're sending out frames on a socket bound device and suddenly the
> net device is being unregistered. It appears that commit 827d9780
> introduced a possible race condition between {t,}packet_snd() and
> packet_notifier(). In the case of a bound socket, packet_notifier()
> can drop the last reference to the net_device and {t,}packet_snd()
> might end up suddenly sending a packet over a freed net_device.


Thank you all for finding and fixing this!

Ben

-- 
Ben Greear <greearb@candelatech•com>
Candela Technologies Inc  http://www.candelatech.com

      parent reply	other threads:[~2013-11-21 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21 15:50 [PATCH v3] packet: fix use after free race in send path when dev is released Daniel Borkmann
2013-11-21 18:18 ` David Miller
2013-11-21 22:40 ` Ben Greear [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=528E8BD6.3060200@candelatech.com \
    --to=greearb@candelatech$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=dborkman@redhat$(echo .)com \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=noureddine@aristanetworks$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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