[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00000000000014e8ca06094d0ee2@google.com>
Date: Fri, 03 Nov 2023 22:40:13 -0700
From: syzbot <syzbot+1683f76f1b20b826de67@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] test uaf in hci_conn_drop
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: test uaf in hci_conn_drop
Author: lizhi.xu@...driver.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
Powered by blists - more mailing lists