[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000000000000c3e53a060a4eae0a@google.com>
Date: Thu, 16 Nov 2023 17:01:55 -0800
From: syzbot <syzbot+4c0d0c4cde787116d465@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] [PATCH] test uaf in sco_sock_timeout
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: [PATCH] test uaf in sco_sock_timeout
Author: lizhi.xu@...driver.com
#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..515b52e14b5f 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -415,6 +415,8 @@ static void sco_sock_cleanup_listen(struct sock *parent)
*/
static void sco_sock_kill(struct sock *sk)
{
+ struct sco_conn *conn = container_of(sk, struct sco_conn, sk);
+
if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket)
return;
@@ -423,6 +425,9 @@ static void sco_sock_kill(struct sock *sk)
/* Kill poor orphan */
bt_sock_unlink(&sco_sk_list, sk);
sock_set_flag(sk, SOCK_DEAD);
+ sco_conn_lock(conn);
+ conn->sk = NULL;
+ sco_conn_unlock(conn);
sock_put(sk);
}
Powered by blists - more mailing lists