Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp425951lqs; Tue, 5 Mar 2024 06:15:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWoVTZUbhlOC0Ovr+Qn3fhqxRTapkObG8OxzGL34p2+8rycr8j9dErSuQ8jpqCHgtCZNqqHNdMAz0WIzmw5SselrCLBCxM0tya7B4xyoQ== X-Google-Smtp-Source: AGHT+IE2bX3AOHPLkJuiQGypMxlsDl+Dc+W+NI4/fISB94yB0wSfsM4PxrFFjnqGQpg0g3Z9StvX X-Received: by 2002:a67:af17:0:b0:472:de19:182 with SMTP id v23-20020a67af17000000b00472de190182mr1366799vsl.30.1709648135413; Tue, 05 Mar 2024 06:15:35 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id hv26-20020a67e69a000000b0047271d89135si1689302vsb.614.2024.03.05.06.15.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 06:15:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=EjP4rfHK; arc=fail (signature failed); spf=pass (google.com: domain of linux-bluetooth+bounces-2310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 75D081C22B50 for ; Tue, 5 Mar 2024 14:15:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5242986628; Tue, 5 Mar 2024 14:15:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="EjP4rfHK" X-Original-To: linux-bluetooth@vger.kernel.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2063.outbound.protection.outlook.com [40.107.247.63]) (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 EDFEB86122 for ; Tue, 5 Mar 2024 14:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.63 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709648131; cv=fail; b=Vvn1f7U2oL2yDPercvJCv57uxtKabblZda1YIayf+AxLccfviT+iBsxJkCdx0MKS+o9DlL4/zSiSfpUhizjyuxY9bHGp/RuKCb1HqGECl51YRisruk48YhSCiHKdZYd68WZYXl5B3SOIa27nDXFzr6iRAifuhBiH5ZTNprVuBPk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709648131; c=relaxed/simple; bh=n19i6W5s1NEtcvEj9a3T25I7AFAyNI+eaYdh/87yOa8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=g3cNqwD6fMAp1zOxhgXeBNdD2KZi4syUB8DECXE5ggx90wp0y4JClxr1obcVfPKa1quSNSd7UZOnfCuXSKVXDPvXX7LPnPdX5/YMgf2XHvP5btJL3RxIT2bNWckLSQBqZswXTpCbBxVWzN0Sy4X8cgdts6R+uMESgKznuLOOuig= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=EjP4rfHK; arc=fail smtp.client-ip=40.107.247.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=brjDsbr+sPz0SfSjfxLx76rOoUla+DYZwdrCpvAJxhR/5s1LT3bj8amT0bw0rv73uTP6axbAdRpTHdkGFTPzZMYMZ6QPu0snCbzYawcSa4AdlzoFHEvgXDmhDwTNaa7Oz6cbuOjVDYOm+eGiPS/jpTMXhiZQ+4Wb+Geu7LYQREAAhMAGmVar3kvulRPgqufgbvasPlMN7ywpnbEsUzz31fyF79JX+yVAX0THAO6Ig5pHmLaO0kl+9jDOZJaWxSmf+iVKRKzyptKchSlVFO3s6rtSXtvd687z2revuW8hF0dnrQiJgud7NBXPuRgviZ0Sl99kT9DGg7Nz+f+yhQM8EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q4wOefkJfZzupYVrp8sgsBIwtD4rB5FKWWPNtIwzKvY=; b=TBhNgO2pfK8izpQltQekLK8zz6GVXfmLWmgYQaQC0WljcbW6HaLblOeC6SxO5kJhQJR3YKvu5QVEfO0fXjPPbXFNcpyaBh/HlKxk1WmjlS9rWJRzwAFWejNHy1hRtHTmi7n6lkbIyP6YoQz7Om/1T+KA/xTCSKpPzwXpGQFNhdMZvnqGKKEROcc49oy/UVA4UqIzsq66koddpXcP2Kn+NmIbWg/GJfGfQCL22VPJhQVwAvA5ZuEUt9NojaqJuXUPK2nI16bYfCPFsQb43W3JMHc6g80tprcKEvyShG/5nemn9pL2naMIBoZbjwxZ7h9DsCFcOe/lNgKfBJrqzjJGhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q4wOefkJfZzupYVrp8sgsBIwtD4rB5FKWWPNtIwzKvY=; b=EjP4rfHKSiTlKTdVWweMm8eA6pYQyd8lYOLt7dmBQJEFfGxC67WCehWxU26v5/35NFp9cbT61sKyYaNhp8QCYz7txBloxa5p4hlctyiGy+2+pHJLVN1O8xVEygWWvIpVaNOHw/LlHTy8swI2+DGu5+qWx6RjaRHIEpsnJ8Ww1yc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8938.eurprd04.prod.outlook.com (2603:10a6:20b:409::20) by AM9PR04MB8620.eurprd04.prod.outlook.com (2603:10a6:20b:43b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 14:15:26 +0000 Received: from AM9PR04MB8938.eurprd04.prod.outlook.com ([fe80::83af:c10f:9f30:43f]) by AM9PR04MB8938.eurprd04.prod.outlook.com ([fe80::83af:c10f:9f30:43f%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 14:15:26 +0000 From: Andrei Istodorescu To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, iulia.tanasescu@nxp.com, Andrei Istodorescu Subject: [PATCH BlueZ 0/1] Fix crash in bluetoothctl exit Date: Tue, 5 Mar 2024 16:15:20 +0200 Message-Id: <20240305141521.132865-1-andrei.istodorescu@nxp.com> X-Mailer: git-send-email 2.40.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P190CA0039.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5d1::12) To AM9PR04MB8938.eurprd04.prod.outlook.com (2603:10a6:20b:409::20) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8938:EE_|AM9PR04MB8620:EE_ X-MS-Office365-Filtering-Correlation-Id: 01d7cbbe-b015-41ad-67ad-08dc3d1eb457 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AWol6tgA6Aos10LONNDjrLJ/34CPdKmW5kNJjbxqUWLM8ZEBnAKuIh9rNGfbIiu0ecZwf0D42Z9olohMrskVkchzFbQtmhSRbqIDpBxN0URQHCuFMBTARsepX3L+NfalpjRh5hv1Nq6ampNgDKCHdevBjBp4ZR3OTdOWoFIJTx3vi117TXR0yuhaN48od3xm3O3HPG+412T6siVh+VS3Kyajv234erjcVi02mmZMcx5zxPo32xwhP6iFNqv+Do4arGSYr9TmdYVOD4depwNJcC2xxILvywmIhmtSikdPh6T/ubMjdUNItGlwqx/G5q4il6uLH3sZXN7jvXfbSSaZGfdpn4T8nJdVSw4avHQeQ6sesrIC0jN/rIlE3oDMPJzZigh30loevVUqzEm6SwPUTMiZDyzlYWLtn2tHiW6Q5psfwvnLxFt32+NShVm5+rhTPFatg6fHMV1DI4ZpQ5yCe/DxBYFDi9wvN1SfGuBojUhpRPcOslsjs9P7Poq5mt0+DOMMtakc2pvIFCNNnthuDC1OOrHrric+IJ/l2/h716gBM2yMGJrW6Un7gRTt9WwFhRUeDEbSGm5fDIaCJ6eViNcpvYnALc3ZE3jtQB/tQ4NhfUTjWOKLzM1IeFR/2CZjwQcvLNqWs5i8ZRm+tbMeIRM23Ka55enKeOIqwszZsOo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8938.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?D7vXq3IAUfckOXceRR+dbM/fxx8Hq3ijFg46eN3lzWeel3PAp5w5V7hvsc/U?= =?us-ascii?Q?Ga4iEI7uu9wChAEehdHYSf+XBDkkWxqEzNvrdIhbHJ8cGyrRi4wgXHWobzBo?= =?us-ascii?Q?/IiDpj60bYjqUXri4RKbb9HdKbsTsETnZrLziqn1y6YnIDC/6P5+sk0RBNtr?= =?us-ascii?Q?3VIZC3J5fQsUsoyWHlPtRrvZpvQdl8xBnK/ZMRnde0AXqtumFb9T70hrmpqQ?= =?us-ascii?Q?Mc5GZmn9gH2Fc3C9ksK0gB2jxjBksfS22ITNlUlXF/HzkZ2qNniHXYsochtA?= =?us-ascii?Q?4UUPM3d3TojPpzsk2+mtmBSy4FFcsYQ2q8EFWgSKA1V6a9kn0wb4UQATcl/2?= =?us-ascii?Q?Cfq79s+RHzlTTyEy4evxzrbtBq/3wvYp2qShev+6Belv+8V3P1pt16bFoFNP?= =?us-ascii?Q?I7keAZUx6kwnCxH7G7DYHB2DxJeyPbj0SHZLJPHQc3td4MPfyzjFZL2Y20Ct?= =?us-ascii?Q?F5nXT52XDx/MDf/5BxW1+sfjJa3MIHl6MVlbTuCv1xAS4InNSuGXsWA4crov?= =?us-ascii?Q?mwiKlQtBgkTdUTYDMdez3b43KBaSRJTKKCLmFzR0fO7AREcxxwMBOwWdxjC/?= =?us-ascii?Q?0iYz6nIvqQkwVw1FUsvLBZWDKXblblPOZsMRPLPvrBBF84HBAlfAfjd5Ege9?= =?us-ascii?Q?P0CXqgSX5yncnL9zyhrX/P4vTuPG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Q?s0wZFooB+S1bpfs5fi7O8dmmKR1juNPmCUK3iIObFEHUOSuGHBFOz7e71tS8?= =?us-ascii?Q?hA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01d7cbbe-b015-41ad-67ad-08dc3d1eb457 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8938.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 14:15:26.5040 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: USsC0bePlsrzKfdB0/pVO0SYwV4Ju04yUDx+p6KMfJOHd9SLZl2938Ftd7DeoN6LkHA/fxXzCHAArN443hJc2MpJtTigjyMcWYKBT6kdPMc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8620 This patch sets the data.inputs and ata.queue to NULL after being freed. This is needed so that further use of these queues won't access already freed memory. Andrei Istodorescu (1): shared/shell: Fix heap use after free on exit src/shared/shell.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.40.1