From: David Miller <davem@davemloft.net>
To: subashab@codeaurora.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: ipv4: Fix incorrect free in ICMP receive
Date: Fri, 16 Jan 2015 03:09:20 -0500 (EST)	[thread overview]
Message-ID: <20150116.030920.1013449869229821602.davem@davemloft.net> (raw)
In-Reply-To: <05e337f44c7a71ac317194cfa3dcdf62.squirrel@www.codeaurora.org>
From: subashab@codeaurora.org
Date: Fri, 16 Jan 2015 07:48:36 -0000
> An exception is seen in ICMP ping receive path where the skb
> destructor sock_rfree() tries to access a freed socket. This happens
> because ping_rcv() releases socket reference with sock_put() and this
> internally frees up the socket. Later icmp_rcv() will try to free the
> skb and as part of this, skb destructor is called and panics as the
> socket is freed already in ping_rcv().
At the point in which foo_sock_destruct() is called, the 'sk' is not
freed.  We're operating on it inside of the destruct function itself.
next prev parent reply	other threads:[~2015-01-16  8:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16  7:48 [PATCH] net: ipv4: Fix incorrect free in ICMP receive subashab
2015-01-16  8:09 ` David Miller [this message]
2015-01-16 12:52 ` Eric Dumazet
2015-01-16 20:59   ` subashab
2015-01-16 21:48     ` Eric Dumazet
2015-01-16 21:48     ` David Miller
2015-01-20  2:34       ` subashab
2015-01-20  3:50         ` Eric Dumazet
2015-01-20 19:42           ` Cong Wang
2015-01-20 21:35             ` Eric Dumazet
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=20150116.030920.1013449869229821602.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=subashab@codeaurora.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).