summaryrefslogtreecommitdiff
path: root/lib/parser.c
diff options
context:
space:
mode:
authorMartijn Coenen <maco@android.com>2018-01-05 11:27:07 +0100
committerMartijn Coenen <maco@android.com>2018-02-06 12:51:39 +0100
commit810bdaf1dd747016fea5d5256530cf9ade05a4c9 (patch)
tree374a3b1b08100a85665faa3313acfdbf7506c114 /lib/parser.c
parent037d2374ce3ee79b7d1f8bed64dddbde0e18fc08 (diff)
UPSTREAM: 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. (cherry picked from commit f5cb779ba16334b45ba8946d6bfa6d9834d1527f) Change-Id: Ib34b1cbb8ab2192d78c3d9956b2f963a66ecad2e 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>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions