From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp153-162.sina.com.cn (smtp153-162.sina.com.cn [61.135.153.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DE3C21ABC1 for ; Fri, 23 Jan 2026 22:24:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=61.135.153.162 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769207069; cv=none; b=ORhh9kLVU4pw5/ovpn1faiX/Dsoj0k31PRKH8j+Z0OEDhniXBdhWWhdD37IEU/SBNCx4D0jRB/lmpxNJJyfED4oMoAWyAa1lcGnabrFuY8TgKsyNQdOfkIhhV661p2SHwSY6L7R7BGuJ20IGlueCD6GS8z0e7OXrQv0nYr6XzpA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769207069; c=relaxed/simple; bh=VlvdyyD+AiB4EY+7/xpWlz2k2pOFA63j97BojLY6zLY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=McsSrRkjjtMcOtbkUwWmNKL25Gzr7ADc2s9j+oco2VTu0P2RATA0MMERYR3Csc5k/xrNNlHBeZKwxa6I8KM9uBmUH2H9rrXAo+FvwghV1T7B6I85W3RUNt2OnwAlSJ6ywRi5B+vs5NrCnoEfJZnSoMuYvCEfnc7MKgzfv7xTDhA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=YN8tiRP0; arc=none smtp.client-ip=61.135.153.162 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="YN8tiRP0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1769207062; bh=dMfOxTjaHm4LxQ+6rpwj223Ki8UULVxfmBxwhgYzdaw=; h=From:Subject:Date:Message-ID; b=YN8tiRP0chRyg4VFomel2dHf+fTro+HG10ceT4SdcGsZz3mDXaar30/8zZ6JrgyPb GCF6fZB+OXEHWVtDtXNofEgTpVZJqomlFvBgixWzw8yDAI8NYpzfswauLKQj61UMGS w7iZbJ17Ww+KeeKPAORrhFB8RaMfhw7YJYs3iBlM= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.58.160]) by sina.com (10.54.253.31) with ESMTP id 6973F4810000437F; Fri, 24 Jan 2026 06:21:54 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 6646736816282 X-SMAIL-UIID: BC72C2D0A1F948D48DB55D65F13BA138-20260124-062154-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_sock_ready_cb (2) Date: Sat, 24 Jan 2026 06:21:42 +0800 Message-ID: <20260123222143.2339-1-hdanton@sina.com> In-Reply-To: <69729a7e.a00a0220.2cf64e.0003.GAE@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > Date: Thu, 22 Jan 2026 13:45:34 -0800 > syzbot has found a reproducer for the following issue on: > > HEAD commit: a66191c590b3 Merge tag 'hyperv-fixes-signed-20260121' of g.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=11b467fc580000 > kernel config: https://syzkaller.appspot.com/x/.config?x=f1fac0919970b671 > dashboard link: https://syzkaller.appspot.com/bug?extid=9265e754091c2d27ea29 > compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=143e7f9a580000 #syz test --- x/net/bluetooth/af_bluetooth.c +++ y/net/bluetooth/af_bluetooth.c @@ -226,6 +226,7 @@ void bt_accept_enqueue(struct sock *pare list_add_tail(&bt_sk(sk)->accept_q, &bt_sk(parent)->accept_q); bt_sk(sk)->parent = parent; + sock_hold(parent); /* Copy credentials from parent since for incoming connections the * socket is allocated by the kernel. @@ -258,6 +259,7 @@ void bt_accept_unlink(struct sock *sk) list_del_init(&bt_sk(sk)->accept_q); sk_acceptq_removed(bt_sk(sk)->parent); + sock_put(bt_sk(sk)->parent); bt_sk(sk)->parent = NULL; sock_put(sk); } --- x/net/bluetooth/l2cap_sock.c +++ y/net/bluetooth/l2cap_sock.c @@ -1473,6 +1473,8 @@ static struct l2cap_chan *l2cap_sock_new { struct sock *sk, *parent = chan->data; + if (!parent) + return NULL; lock_sock(parent); /* Check for backlog size */ @@ -1674,6 +1676,8 @@ static void l2cap_sock_ready_cb(struct l struct sock *sk = chan->data; struct sock *parent; + if (!sk) + return; lock_sock(sk); parent = bt_sk(sk)->parent; --