All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	mlxsw@mellanox.com, Roman Kapl <code@rkapl.cz>
Subject: Re: [patch net-next] net: sched: fix use-after-free in tcf_block_put_ext
Date: Fri, 8 Dec 2017 12:05:47 -0800	[thread overview]
Message-ID: <CAM_iQpXAYvvn0t6QGo0eSAGJJg_mMF5oWef7rvXE-H0BwxPt0w@mail.gmail.com> (raw)
In-Reply-To: <20171208182727.4100-1-jiri@resnulli.us>

On Fri, Dec 8, 2017 at 10:27 AM, Jiri Pirko <jiri@resnulli.us> wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> Since the block is freed with last chain being put, once we reach the
> end of iteration of list_for_each_entry_safe, the block may be
> already freed. I'm hitting this only by creating and deleting clsact:

List is still too tricky to work with refcnt.

>
> [  202.171952] ==================================================================
> [  202.180182] BUG: KASAN: use-after-free in tcf_block_put_ext+0x240/0x390


I should enable KASAN now, otherwise can't catch this
even though I tested this code path for hundreds of times.

      parent reply	other threads:[~2017-12-08 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08 18:27 [patch net-next] net: sched: fix use-after-free in tcf_block_put_ext Jiri Pirko
2017-12-08 19:10 ` David Miller
2017-12-08 20:05 ` Cong Wang [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=CAM_iQpXAYvvn0t6QGo0eSAGJJg_mMF5oWef7rvXE-H0BwxPt0w@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=code@rkapl.cz \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=mlxsw@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.