All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+1683f76f1b20b826de67@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] test uaf in hci_conn_drop
Date: Fri, 03 Nov 2023 21:47:33 -0700	[thread overview]
Message-ID: <000000000000c0526e06094c5121@google.com> (raw)
In-Reply-To: <000000000000e69b5a06093287ec@google.com>

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..bb02f1ca8cd0 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1719,6 +1719,7 @@ struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst,
 
 		hci_sco_setup(acl, 0x00);
 	}
+	hci_conn_get(sco);
 
 	return sco;
 }
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

  parent reply	other threads:[~2023-11-04  4:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 22:01 [syzbot] [bluetooth?] KASAN: slab-use-after-free Write in hci_conn_drop (2) syzbot
2023-11-03  1:01 ` [syzbot] test uaf in hci_conn_drop syzbot
2023-11-03  5:13 ` syzbot
2023-11-03  7:01 ` syzbot
2023-11-03  8:00 ` syzbot
2023-11-04  3:23 ` syzbot
2023-11-04  4:47 ` syzbot [this message]
2023-11-04  5:40 ` syzbot
2024-02-17  2:09 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Write in hci_conn_drop (2) syzbot
2024-02-17 10:57   ` Hillf Danton
2024-02-17 11:23     ` syzbot
2024-02-18  8:44   ` Hillf Danton
2024-02-18  8:46     ` syzbot
2024-02-17 19:33 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=000000000000c0526e06094c5121@google.com \
    --to=syzbot+1683f76f1b20b826de67@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.