mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
binder: check for binder_thread allocation failure in binder_poll()
commitf88982679fupstream. If the kzalloc() in binder_get_thread() fails, binder_poll() dereferences the resulting NULL pointer. Fix it by returning POLLERR if the memory allocation failed. This bug was found by syzkaller using fault injection. Reported-by: syzbot <syzkaller@googlegroups.com> Fixes:457b9a6f09("Staging: android: add binder driver") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.16: - Drop the binder global lock before returning - Adjust filename] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
836dba5278
commit
24e54ffd43
1 changed files with 4 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue