Re: [syzbot] [PATCH] Test uaf in sco_sock_timeout

From: syzbot
Date: Fri Nov 17 2023 - 22:26:00 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.

***

Subject: [PATCH] Test uaf in sco_sock_timeout
Author: eadavis@xxxxxx

please test 8de1e7afcc1c

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 8de1e7afcc1c

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index c736186aba26..c05fb9d41a63 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -300,7 +300,8 @@ static int sco_connect(struct sock *sk)

unlock:
hci_dev_unlock(hdev);
- hci_dev_put(hdev);
+ if (err)
+ hci_dev_put(hdev);
return err;
}