binder: fix handling of misaligned binder object
authorTodd Kjos <tkjos@android.com>
Thu, 14 Feb 2019 23:22:57 +0000 (15:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 07:40:31 +0000 (09:40 +0200)
commit33c6b9ca70a8b066a613e2a3d0331ae8f82aa31a
tree607c223e97e794456be97b65dd278d62cd558852
parent44579653c9ab9bb1be04888f285ba4c20c924217
binder: fix handling of misaligned binder object

commit 26528be6720bb40bc8844e97ee73a37e530e9c5e upstream.

Fixes crash found by syzbot:
kernel BUG at drivers/android/binder_alloc.c:LINE! (2)

Reported-and-tested-by: syzbot+55de1eb4975dec156d8f@syzkaller.appspotmail.com
Signed-off-by: Todd Kjos <tkjos@google.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: stable <stable@vger.kernel.org> # 5.0, 4.19, 4.14
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder_alloc.c