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]
Message-ID: <20250913040256.6972-1-hdanton@sina.com>
Date: Sat, 13 Sep 2025 12:02:51 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+0e4ebcc970728e056324@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: wild-memory-access Read in l2cap_connect_cfm

> Date: Fri, 12 Sep 2025 08:46:30 -0700	[thread overview]
> syzbot has found a reproducer for the following issue on:
> 
> HEAD commit:    590b221ed425 Add linux-next specific files for 20250912
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=161d1934580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=9134e501f17b95a4
> dashboard link: https://syzkaller.appspot.com/bug?extid=0e4ebcc970728e056324
> compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=111d1934580000

#syz test

--- x/include/net/bluetooth/l2cap.h
+++ y/include/net/bluetooth/l2cap.h
@@ -938,6 +938,7 @@ static inline long l2cap_chan_no_get_snd
 
 extern bool disable_ertm;
 extern bool enable_ecred;
+extern struct mutex cfm_mutex;
 
 int l2cap_init_sockets(void);
 void l2cap_cleanup_sockets(void);
--- x/net/bluetooth/l2cap_sock.c
+++ y/net/bluetooth/l2cap_sock.c
@@ -1411,6 +1411,7 @@ shutdown_already:
 	return err;
 }
 
+DEFINE_MUTEX(cfm_mutex);
 static int l2cap_sock_release(struct socket *sock)
 {
 	struct sock *sk = sock->sk;
@@ -1422,9 +1423,11 @@ static int l2cap_sock_release(struct soc
 	if (!sk)
 		return 0;
 
+	mutex_lock(&cfm_mutex);
 	lock_sock_nested(sk, L2CAP_NESTING_PARENT);
 	l2cap_sock_cleanup_listen(sk);
 	release_sock(sk);
+	mutex_unlock(&cfm_mutex);
 
 	bt_sock_unlink(&l2cap_sk_list, sk);
 
--- x/net/bluetooth/l2cap_core.c
+++ y/net/bluetooth/l2cap_core.c
@@ -7301,7 +7301,9 @@ next:
 		pchan = next;
 	}
 
+	mutex_lock(&cfm_mutex);
 	l2cap_conn_ready(conn);
+	mutex_unlock(&cfm_mutex);
 }
 
 int l2cap_disconn_ind(struct hci_conn *hcon)
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ