lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 02 Nov 2023 22:13:10 -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_sysfs.c b/net/bluetooth/hci_sysfs.c
index 15b33579007c..3237ad0d0645 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -6,6 +6,8 @@
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
+static void sco_set_hci_cnn_null(struct hci_conn * conn);
+
 static const struct class bt_class = {
 	.name = "bluetooth",
 };
@@ -13,6 +15,7 @@ static const struct class bt_class = {
 static void bt_link_release(struct device *dev)
 {
 	struct hci_conn *conn = to_hci_conn(dev);
+	sco_set_hci_cnn_null(conn);
 	kfree(conn);
 }
 
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index c736186aba26..858de967ffd3 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -76,6 +76,12 @@ struct sco_pinfo {
 #define SCO_CONN_TIMEOUT	(HZ * 40)
 #define SCO_DISCONN_TIMEOUT	(HZ * 2)
 
+static void sco_set_hci_cnn_null(struct hci_conn * conn)
+{
+	struct sco_conn * scn = container_of(conn, struct sco_conn, hci_conn);
+	scn->hci_conn = NULL;
+}
+
 static void sco_sock_timeout(struct work_struct *work)
 {
 	struct sco_conn *conn = container_of(work, struct sco_conn,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ