Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] ipv6: tcp: fix race in IPV6_2292PKTOPTIONS
Date: Mon, 26 Jan 2015 00:44:28 -0800 (PST)	[thread overview]
Message-ID: <20150126.004428.66350757054974030.davem@davemloft.net> (raw)
In-Reply-To: <1421840742.4832.24.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 21 Jan 2015 03:45:42 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> IPv6 TCP sockets store in np->pktoptions skbs, and use skb_set_owner_r()
> to charge the skb to socket.
> 
> It means that destructor must be called while socket is locked.
> 
> Therefore, we cannot use skb_get() or atomic_inc(&skb->users)
> to protect ourselves : kfree_skb() might race with other users
> manipulating sk->sk_forward_alloc
> 
> Fix this race by holding socket lock for the duration of
> ip6_datagram_recv_ctl()
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  Since this bug is very old, feel free to apply on net-next ;)

Applied to net-next, thanks Eric.

      reply	other threads:[~2015-01-26  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 11:45 [PATCH net] ipv6: tcp: fix race in IPV6_2292PKTOPTIONS Eric Dumazet
2015-01-26  8:44 ` 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=20150126.004428.66350757054974030.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.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