netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: loyou85@gmail.com
Cc: edumazet@google.com, dsterba@suse.com, dbanerje@akamai.com,
	fw@strlen.de, davej@codemonkey.org.uk, tglx@linutronix.de,
	matwey@sai.msu.ru, sakari.ailus@linux.intel.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	xiaojunzhao141@gmail.com
Subject: Re: [PATCH v3] net: fix skb use after free in netpoll
Date: Tue, 27 Aug 2019 20:52:54 -0700 (PDT)	[thread overview]
Message-ID: <20190827.205254.561639753689757462.davem@davemloft.net> (raw)
In-Reply-To: <1566801964-14691-1-git-send-email-loyou85@gmail.com>

From: Feng Sun <loyou85@gmail.com>
Date: Mon, 26 Aug 2019 14:46:04 +0800

> After commit baeababb5b85d5c4e6c917efe2a1504179438d3b
> ("tun: return NET_XMIT_DROP for dropped packets"),
> when tun_net_xmit drop packets, it will free skb and return NET_XMIT_DROP,
> netpoll_send_skb_on_dev will run into following use after free cases:
> 1. retry netpoll_start_xmit with freed skb;
> 2. queue freed skb in npinfo->txq.
> queue_process will also run into use after free case.
> 
> hit netpoll_send_skb_on_dev first case with following kernel log:
 ...
> Signed-off-by: Feng Sun <loyou85@gmail.com>
> Signed-off-by: Xiaojun Zhao <xiaojunzhao141@gmail.com>

Applied and queued up for -stable.

      reply	other threads:[~2019-08-28  3:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 16:32 [PATCH] net: fix skb use after free in netpoll_send_skb_on_dev Feng Sun
2019-08-26  2:48 ` David Miller
2019-08-26  6:13 ` [PATCH v2] net: fix skb use after free in netpoll Feng Sun
2019-08-26  6:20   ` David Miller
2019-08-26  6:46     ` [PATCH v3] " Feng Sun
2019-08-28  3:52       ` 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=20190827.205254.561639753689757462.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=davej@codemonkey.org.uk \
    --cc=dbanerje@akamai.com \
    --cc=dsterba@suse.com \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loyou85@gmail.com \
    --cc=matwey@sai.msu.ru \
    --cc=netdev@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=xiaojunzhao141@gmail.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).