ax88172a: fix ax88172a_unbind() failures
authorGeorge Kennedy <george.kennedy@oracle.com>
Wed, 15 Jul 2020 13:59:31 +0000 (09:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 08:19:41 +0000 (10:19 +0200)
commite44f7bc1cfec80a701627e07ccc59075ddbf2b35
treeeec0a1f1c20a3608d84ea5d9165c362ab3bbbcf2
parenta0524b14222dd7eb446664e503d6e1b0ca9fdb9d
ax88172a: fix ax88172a_unbind() failures

[ Upstream commit c28d9a285668c799eeae2f7f93e929a6028a4d6d ]

If ax88172a_unbind() fails, make sure that the return code is
less than zero so that cleanup is done properly and avoid UAF.

Fixes: a9a51bd727d1 ("ax88172a: fix information leak on short answers")
Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reported-by: syzbot+4cd84f527bf4a10fc9c1@syzkaller.appspotmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/ax88172a.c