]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
binder: fix memory leak in error path
authorTodd Kjos <tkjos@android.com>
Fri, 21 Jun 2019 17:54:15 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Jul 2019 06:09:51 +0000 (08:09 +0200)
commit93a260f17e29beadb7b4f4c6f95c305f0e73bcae
tree525c6fa052e7bdeb3af5e36a71558f60e80f4729
parentcd05fb747726f7e2292ca3b6e654b3938ecc59b5
binder: fix memory leak in error path

commit 1909a671dbc3606685b1daf8b22a16f65ea7edda upstream.

syzkallar found a 32-byte memory leak in a rarely executed error
case. The transaction complete work item was not freed if put_user()
failed when writing the BR_TRANSACTION_COMPLETE to the user command
buffer. Fixed by freeing it before put_user() is called.

Reported-by: syzbot+182ce46596c3f2e1eb24@syzkaller.appspotmail.com
Signed-off-by: Todd Kjos <tkjos@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c