Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp398851lqp; Sat, 13 Apr 2024 01:56:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNaks9K7chGXDuLfi2xDl/1r4GMl8xLimbmcAUzJriSe/oEHQYBYkN/vguzl7IbSEZoKygxWTa+l2CpGI71AZXlxe4jgIDsImjQCIHEg== X-Google-Smtp-Source: AGHT+IEz21lLUAAVMSXeDDiGIbKxiN3o8/VvaA7ZEmqew4NX67fnXX36zdP784rSBgmcxDHE0izS X-Received: by 2002:a17:907:94c1:b0:a4e:6f0d:c53b with SMTP id dn1-20020a17090794c100b00a4e6f0dc53bmr3390789ejc.35.1712998570166; Sat, 13 Apr 2024 01:56:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712998570; cv=pass; d=google.com; s=arc-20160816; b=PcRwvKUwQjZX8b78PGIknrOMN/4/SwREzJVTK5eYhlwxL7Sn8SWFvvO0JiN58lNMty 9E3/LSeViO6OozUDq7elXu3YJIWDlhLWgz2n6GYq//T36G4I6M7kYfWiArVN+htligt2 ljmATSA4eTX61G/EDzA93+4WQlvSx+DyOh5oOnNnkzGQgnbnneQsX2FdP27TWQJSHzdW Ih4cEigwuqGINvoJ4aI/8YlxuGUUS0rjaw2odjgk2BhGJFLmHW5R18KxXhIEnWvTgipn tpiODCr47RXokNrW3HstliHPQZUi+K+ObEliqnymUShHqBsfnippIVyWjxEN5lgCZfNX BVtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=feAIkWToydkSwFcj3DAhLh/z7ZyCmoq02/JP/Z23hRg=; fh=D1GEPBt/J/faEDdyMWZ2g5PDosFeVwDrEPbIQ4pbAbE=; b=Z+bcmUTIPrb3g7JcZ3a8NQHcMgdw4qnIYJwjLPdANGgNOjQXsFOlZxaAWUEf8KO2gW Ai0bZBxBhiy787MFjfMksHZ3tJ4CrBCXuMw1Iq8LDksiaj31IM11igZlVoh66wB64JmH pVAX9NGG6O1RChegpiQwrTTy5LBFywpySzU/g+vpd8vYC+aeHqqqHesa+vFjuBvVvf2g zX0jHm3/i8vdrdd56Hy7eOoRsCQvgeM14oW80RboG5EPdAmyu4koilJZ7ISMSUEzWsdl zbfgwzTgMAuf//BjdGKKKV/mCpdcR2AJWRhY1QqG2gSAoETnh3ij3lJAHyROgAD8qi+J xtMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-143639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143639-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fx12-20020a170906b74c00b00a522c0f6d30si1866142ejb.651.2024.04.13.01.56.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 01:56:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-143639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143639-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D41E71F2231F for ; Sat, 13 Apr 2024 08:56:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9F38208B6; Sat, 13 Apr 2024 08:56:03 +0000 (UTC) Received: from mail78-36.sinamail.sina.com.cn (mail78-36.sinamail.sina.com.cn [219.142.78.36]) (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 7C698F9D4 for ; Sat, 13 Apr 2024 08:55:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712998563; cv=none; b=cnBefbDFkvusmvd3fpCsk9W7qIavVVb3KbqGdi02TajVvEJhH5UhMIx89pxxJvg02fK5hxYRBstyOh7qFSDQE5k8ihEUqpm5gtGlB6u/w3AQvkVSrJQ8ydFwmbWA88mMF1AKDF/MR2GrwqoJpJNJmXmfQAhf++SKnzoZbXiWL7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712998563; c=relaxed/simple; bh=FkKWQjItjpe2kZpO3M/4BDhqIfxnrFz73LhNMpvGh7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B4Sji+KPcMBxOhaQ52xSVN5S1E4SNyQmBj/8ivlk6Ev21zrtOh56oq+MZrwgeJC0SKr0Kjy8gSI8yUTZYBDzaLhwSk5yMKUb9vuFgLaiGunc7rFXjrj2ehsZXzw/l1ibbsPKojV7Oxte7A0j6kwA38qG1evu+rD7AHnHh/l+UIc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=219.142.78.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.51.22]) by sina.com (172.16.235.25) with ESMTP id 661A489200002096; Sat, 13 Apr 2024 16:55:48 +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: 70657634210238 X-SMAIL-UIID: 4A984F3758DE4559811232CB97AEF650-20240413-165548-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 __hci_req_sync Date: Sat, 13 Apr 2024 16:55:42 +0800 Message-Id: <20240413085542.1836-1-hdanton@sina.com> In-Reply-To: <0000000000009e80a40615f5c189@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 On Sat, 13 Apr 2024 00:58:39 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 8f2c057754b2 Merge tag 'arm64-fixes' of git://git.kernel.o.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=171da243180000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8f2c057754b2 --- x/net/bluetooth/hci_request.c +++ y/net/bluetooth/hci_request.c @@ -102,6 +102,7 @@ void hci_req_sync_complete(struct hci_de { bt_dev_dbg(hdev, "result 0x%2.2x", result); + hci_req_sync_lock(hdev); if (hdev->req_status == HCI_REQ_PEND) { hdev->req_result = result; hdev->req_status = HCI_REQ_DONE; @@ -111,6 +112,7 @@ void hci_req_sync_complete(struct hci_de } wake_up_interruptible(&hdev->req_wait_q); } + hci_req_sync_unlock(hdev); } /* Execute request and wait for completion. */ --