ANDROID: binder: remove waitqueue when thread exits.
binder_poll() passes the thread->wait waitqueue that can be slept on for work. When a thread that uses epoll explicitly exits using BINDER_THREAD_EXIT, the waitqueue is freed, but it is never removed from the corresponding epoll data structure. When the process subsequently exits, the epoll cleanup code tries to access the waitlist, which results in a use-after-free. Prevent this by using POLLFREE when the thread exits. Signed-off-by:Martijn Coenen <maco@android.com> Reported-by:
syzbot <syzkaller@googlegroups.com> Cc: stable <stable@vger.kernel.org> # 4.14 Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
-
mentioned in commit 20daceef
-
mentioned in commit 0bf138c0
-
mentioned in commit 026e4069
-
mentioned in commit 3dfde6d3
-
mentioned in commit 631f238a
-
mentioned in commit 82bd53b8
-
mentioned in commit d5f4847a
-
mentioned in commit f3c4f4ed
-
mentioned in commit fca84496
-
mentioned in commit 175d993a
-
mentioned in commit e5355489
-
mentioned in commit de80bc3f
-
mentioned in commit 556853b3
-
mentioned in commit 78d32a54
-
mentioned in commit 6dd3c297
-
mentioned in commit 413fba8e
Please sign in to comment