[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171208.141031.2301375886294498593.davem@davemloft.net>
Date: Fri, 08 Dec 2017 14:10:31 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: jiri@...nulli.us
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
mlxsw@...lanox.com, code@...pl.cz
Subject: Re: [patch net-next] net: sched: fix use-after-free in
tcf_block_put_ext
From: Jiri Pirko <jiri@...nulli.us>
Date: Fri, 8 Dec 2017 19:27:27 +0100
> From: Jiri Pirko <jiri@...lanox.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:
...
> Fix this by holding the block also by chain 0 and put chain 0
> explicitly, out of the list_for_each_entry_safe loop at the very
> end of tcf_block_put_ext.
>
> Fixes: efbf78973978 ("net_sched: get rid of rcu_barrier() in tcf_block_put_ext()")
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
Applied, thanks Jiri.
Powered by blists - more mailing lists