Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2776155lqt; Tue, 23 Apr 2024 00:45:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzYe/lp1+DCMJFCyhzswt+OdGoCKkKaPnrKaW4VCu0jmO9tQEIdQbA97QgTQCgR8Jk7Wu+KhHfBT7P+h8mNH3ca7HiXuc0nlXTc7sIyw== X-Google-Smtp-Source: AGHT+IGHOIx76YsPcgxrhIkfAurdRL0Tz/qQTOu1HjjkFhICW/xpRhcqVwc8Gqr8dir0i5o7e9zs X-Received: by 2002:a05:622a:8a:b0:436:a43d:890e with SMTP id o10-20020a05622a008a00b00436a43d890emr17487640qtw.32.1713858309016; Tue, 23 Apr 2024 00:45:09 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dj22-20020a05622a4e9600b0042aaa53f36dsi11183934qtb.573.2024.04.23.00.45.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 00:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PyLQHHdM; arc=fail (signature failed); spf=pass (google.com: domain of linux-bluetooth+bounces-3902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3902-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 468A01C22137 for ; Tue, 23 Apr 2024 07:45:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D03647F58; Tue, 23 Apr 2024 07:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PyLQHHdM" X-Original-To: linux-bluetooth@vger.kernel.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2062.outbound.protection.outlook.com [40.107.247.62]) (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 CDCAB47F51 for ; Tue, 23 Apr 2024 07:45:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.62 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713858303; cv=fail; b=FbryYWc5jTiloYk4ua6GZwrplh37tBuDKMA5ENmtHKplbmJNWUL8YHL6U+pVBY6cmlOiRQTG0DFxVjtRVdd2TAijmNaOrEwZa9yS16lr4v/h57/jTfGcgOiRpgvWfOO+ihfWk9KD3DR3gcan3gIzPDZK/p+3mOl+Ld8u5Aia+S8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713858303; c=relaxed/simple; bh=psaemDF53KHX9C1QepdPklXtoOqitukjw5t6itPzx50=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=QaNMZVBi8DnFV5XZus/BEdWE0KbJ5oqJMraH5r7Lq9kaVYdbN5spkJMtkJ6K7ri9uKutZE0+wz1I/E7LoIXKQgaBiOQhTDjf9BpEz6CD3VAi29StX5J07smYamp5fZTgMm8MZbkomB5aPvwxMsyci8xqARcSs0T5tC+RbCpBmc4= 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=PyLQHHdM; arc=fail smtp.client-ip=40.107.247.62 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=CtSCLqbQKa4GpK3RJL4k6DQHLh8lAAQE0I1kamO57gQmbnJLGy4m05JdEYEa1af19KcOUwUOcFvW9+qoNxCZguC3Gu75I8Q3ns0sRweuT4ZE29o1EJs9jiUZAVpnJDwwaUYEVnomraZ7z/bC+ecV3b1J5P3j7MSr/mRIXGaccfj+k7rq+bL5vtn1kSE17djurVyPYPFaZtvRWxXoTkaNCG4HUZHcB7CLRZg/aAomwSDTH1G05usgxJpdCGP0yTcoqgNr+qONEVU/lxEnycS5QDIatkxTpPsBgmmcMkHCSjg9j8EQG4g1HvgHQCmZNvAuY9P5cPgZvH0DV8JIYfMcfg== 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=vtddCRq0m2G7fHm+OhmIx09pvZBO7iHZWKoFmAXxkfo=; b=WBZUtyDh81X09UOfwag8TSbEf4FX9M8JfVOhxSlTcLEzhlumxZwKSF27gE0pvFWwoxtW4U4tL6iX+7UtUuQ19lfmXDiEC2zU9OGk/diL6w6dv4YOqSaBKenThwtZBCl/o/y60WgzA47/fl+R68S5eQEUpjepK9ldrusqn+DTyRZ0s9LBggXA79/Z09XTtP9zdw+vTpUo+KmZ8g7Y9SopO4/JpllF+hGDy/40HN7h+OcA6Ew9OuNlKT4ar5vNoBIwpsNmTD1oZ/zBw1IuvVtcyj70pgTXuB+HrTsFCGTWg4rxZAHCRolCO7FabO58coy34UXNm+QcIbaPa/6+jQGN0w== 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=vtddCRq0m2G7fHm+OhmIx09pvZBO7iHZWKoFmAXxkfo=; b=PyLQHHdM1uq32HW3BAzO6rsanjzNuxNl9SCwcxeRPwJx95qJhkH2ROjhUun0LDn3Vc5WM2jMQHwl12FBvWDG5vYTczfvWA3v6v7DJivAJk2JC92FBmw/VZFwnTfcO+WEX925pzbCnUpNqPI88SJMWcgGglQDMAfQzB9U2/3pJxU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS1PR04MB9630.eurprd04.prod.outlook.com (2603:10a6:20b:475::16) by PAXPR04MB8269.eurprd04.prod.outlook.com (2603:10a6:102:1c4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Tue, 23 Apr 2024 07:44:59 +0000 Received: from AS1PR04MB9630.eurprd04.prod.outlook.com ([fe80::b627:61b5:39c1:91c0]) by AS1PR04MB9630.eurprd04.prod.outlook.com ([fe80::b627:61b5:39c1:91c0%3]) with mapi id 15.20.7472.044; Tue, 23 Apr 2024 07:44:59 +0000 From: Sarveshwar Bajaj To: linux-bluetooth@vger.kernel.org Cc: vinit.mehta@nxp.com, devyani.godbole@nxp.com, mahesh.talewad@nxp.com Subject: [PATCH BlueZ v1 0/1] Fix null pointer deference in bap_get_ascs() Date: Tue, 23 Apr 2024 13:14:26 +0530 Message-Id: <20240423074426.62480-2-sarveshwar.bajaj@nxp.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20240423074426.62480-1-sarveshwar.bajaj@nxp.com> References: <20240423074426.62480-1-sarveshwar.bajaj@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0040.apcprd02.prod.outlook.com (2603:1096:3:18::28) To AS1PR04MB9630.eurprd04.prod.outlook.com (2603:10a6:20b:475::16) 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: AS1PR04MB9630:EE_|PAXPR04MB8269:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c66ff50-d411-46fe-4090-08dc636946a5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?XE8x6MqbsI3EHcguw8l1xilzOPm6np0MMPrRukWyzfzRHm+BLva7OnRndas8?= =?us-ascii?Q?+JhMitg8IZAaLFIzkLDoHAgT4LslDu4igvcBqZyz09/A0GXMAHGPmEqdRF3d?= =?us-ascii?Q?+lTQVP7K4EzbuzvI9FtGTXuLZB0Cxf7izY9ky03hu1cxwr+gjdndg+YVYBZ0?= =?us-ascii?Q?8pu2Qicj8BMQVg+VB5fFYjdfhIunJPSjZGLm0X03SturOfNhS+/uV2amgaYT?= =?us-ascii?Q?/eD8LFvbSb+h2qXACwUIBPcby8n/rXKgiSJ335onS1wLqUaJgDrkAwFlcgAA?= =?us-ascii?Q?uAuT1wUdT9AY0pYo/M+IL5KZW8PW5gMlExAG5KiC7K9xUSjGRP/ooJcsp3/5?= =?us-ascii?Q?/FnjXXK1bMXKgCifwFddUk+cv2raPFtWnzWAx7s/hpGN0Dk8jcJ82oWJcRoW?= =?us-ascii?Q?tNf9CySpWVstuind7PXlj10L08YWWZ4egMuhgBo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VAvZslSVeC9Z+TSKUCGpKmDBuUsfqGRDo+1+w=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR04MB9630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(52116005)(1800799015)(376005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bFqYCGE+mGotF7DQvIGF7+oCrD7gWfOPkvWiSwIi7gm+tatRSflT89Pxt3Sb?= =?us-ascii?Q?XhBptHeu5sJHhefdvNnJEcRPT80C0WI79+pEEpb6C/jis0XgH3F8fZSac1Gc?= =?us-ascii?Q?itPi1PMzdYwffnjLAA5SsYVlod9vnJvGCo1oZBWlo1DN8J24NkSAnqa2S9rw?= =?us-ascii?Q?TBzMc5Iyek1rnItDxAG2YSfhy5HtF+5IIcD7WTsetNtDAKkyI94bU8MFA2ki?= =?us-ascii?Q?AL5Q78rt+jYsPDdkuduoAVOuNqo2M8dT1AGXffbVlnkWJC+PYSZHhLx/Zriv?= =?us-ascii?Q?BSWtw2Qo5Fsed0GDJqyM+2xGt0hXRPAlXT2GsKsobWFnW2p4U5aM8JTR2Dug?= =?us-ascii?Q?L0732tCLBWyXcoejGVcmIrIMdybYjeN4VmqKzPOANgZGud+fQFUFU0pHMvtx?= =?us-ascii?Q?nI01Orh5aoi1UlWtAReH8oCywr3LsyOEV/TGtzu4q0GVdQeP2AUN9r+siM6J?= =?us-ascii?Q?bAUy6Br7P3cA4UtSyAcH3VUjV5tH+h0vmVDt81FpWVOAX3m9HYnrVpBS8bsf?= =?us-ascii?Q?k5FcSeWe2zVmNHhxBIkbGfE37nVQRht/qoEZ1QVakG0acCNTsIxUmcMdnX2H?= =?us-ascii?Q?tWKF2F3DG1fLG7zinguUafkqr43dMedVsLQIG9kJTjkM7Tp9n58Fa5goY4sx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Pj2SHhYXWOFLivWazKBv4MgLy9OWvDw/8BUMP60O74wWrZ87Vbs?= =?us-ascii?Q?Lniav9YtZSSM1xnuh6u1kOVtcI9qJ2dCqL6v2cTzo9bwltNVJ7ThYm1HiyDp?= =?us-ascii?Q?ow=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c66ff50-d411-46fe-4090-08dc636946a5 X-MS-Exchange-CrossTenant-AuthSource: AS1PR04MB9630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2024 07:44:59.1356 (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: LRo1thBemoGMzsm22hd3iKfIZQUCppC5LVd0HtCgthji6/TwaRCxZPK45PbjDurLMYB0rJZv02OP2BCTuN/jpClA8y3FUBvS+VwJ6giWgMk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8269 Hi team, This is the fix for preventing crash for null pointer dereference. Ensure that bap and rdb pointers are valid before accessing or allocating memory for ascs. Added null check to prevent potential crash Sarveshwar Bajaj (1): Fix null pointer deference in bap_get_ascs() src/shared/bap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0.windows.1