Messages in this thread Patch in this message | | | Date | Fri, 03 Nov 2023 22:40:13 -0700 | Subject | Re: [syzbot] test uaf in hci_conn_drop | From | syzbot <> |
| |
For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org.
***
Subject: test uaf in hci_conn_drop Author: lizhi.xu@windriver.com
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 8de1e7afcc1c
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 9d5057cef30a..efcf8a560d6f 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1702,6 +1702,7 @@ struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst, hci_conn_drop(sco); return ERR_PTR(-ENOLINK); } + hci_conn_get(sco); sco->setting = setting; sco->codec = *codec; diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index c736186aba26..5cba9cfff8ec 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -442,6 +442,7 @@ static void __sco_sock_close(struct sock *sk) sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT); sco_conn_lock(sco_pi(sk)->conn); hci_conn_drop(sco_pi(sk)->conn->hcon); + hci_conn_put(sco_pi(sk)->conn->hcon); sco_pi(sk)->conn->hcon = NULL; sco_conn_unlock(sco_pi(sk)->conn); } else
| |