diff options
author | Konstantin Khlebnikov <koct9i@gmail.com> | 2014-06-17 06:58:05 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-30 20:12:02 -0700 |
commit | b0d3f527adbe90799e10000a0c59e88f0174bfaf (patch) | |
tree | cfe6fdb21570db8c056c097f936c309ce1d1753f /net/wimax/Kconfig | |
parent | b83627d417975fa8681344384ac55a1c4751f55f (diff) |
epoll: fix use-after-free in eventpoll_release_file
commit ebe06187bf2aec10d537ce4595e416035367d703 upstream.
This fixes use-after-free of epi->fllink.next inside list loop macro.
This loop actually releases elements in the body. The list is
rcu-protected but here we cannot hold rcu_read_lock because we need to
lock mutex inside.
The obvious solution is to use list_for_each_entry_safe(). RCU-ness
isn't essential because nobody can change this list under us, it's final
fput for this file.
The bug was introduced by ae10b2b4eb01 ("epoll: optimize EPOLL_CTL_DEL
using rcu")
Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Jason Baron <jbaron@akamai.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/wimax/Kconfig')
0 files changed, 0 insertions, 0 deletions