From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A24A45CE3 for ; Mon, 11 Nov 2024 07:30:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02F7A4067A; Mon, 11 Nov 2024 07:30:43 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2050.outbound.protection.outlook.com [40.107.237.50]) by mails.dpdk.org (Postfix) with ESMTP id 813174067A for ; Mon, 11 Nov 2024 07:30:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I6ufAFz2YyAyPkBto+Gjx1UnqxO9U76NB5opVxK3p4rzvFzpwodJdYNZPsHUGWC78lEzDK8I2D/mAyySh0HVIwW+aZLeC8wKfTpwHaxsNBwzlwn5p0AR7ZSUYAft3pY+kYGdEDy+Uo2bqieJsncnJ+oNulQ6BIRCUx4GBymLBvSKiolhSiXDjQWZskRkChTzeH/ziIhi28Wrj2EoB1rXntZfNU/yg1aWpRZ4DX8h3X7yh0z/JHar8O2aWbquvauZf8QfvqYd3TcPa7ItKUxjYTIGjmcZDeKAPsjX9Z8SYJOtGhgxMTWyGmts7d7wlVn5ctbgH55PcM9uhTY4zDAy0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=y82iAyfm0eGH+LxP2XtnDUlyzkWzJDing2PRxxmUzNg=; b=qZwSpR91cC6bOfIjnHh5iSnejLJrPrfLbJMUb2cLmkUvwK4S1PR49hrAAXkUVv7jF7whUFc9rsE6ebi/sp6c7Du0MUsee8eLzOuM7TkElzKle/DVUlFyM2F3/9Kdj2QIP2bKQRHqrOSymR0zpnYDPLFx2VD3fNnU9rpFU4WERt5K1m5z1ldztvoECNuro3IDLFOks0D/IyzdGDEe8bh4MK1340JT2SHzBQk4HvX2SYPN2fCyxpG1mUUV0qAN76/5PCjskAqLn318N4zUhCpf/J7ZMeK3wn2v8mcyEJB0xshpskf0z3aHMlSV7XJroEtmhxGgrN43JRKtGg6Vg506Ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=networkplumber.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y82iAyfm0eGH+LxP2XtnDUlyzkWzJDing2PRxxmUzNg=; b=i4pGL2HHZtGYxLKiJxhTP2GQ5uBFty2rGWVpMScBYf2lIsBgFu1qk7vaSlEtu7WPtBA0qLef8JSv2OaIJqTZCG+/f9FASki+TLSvsB8YbUh4SEXwedFD2Thn5qoeSNGVyByuNsfw9/SyNZIeN7KQi3X7GfzAO+p12tdLRyP5yeBOnl57IUwegfYgHzhw9Uc2TSwaZvhVhcgABEL9WkA4tBqeed1C6MpjaxaBSMwYIksfsaxXdsaJWDoj1jpE/u7AhygGx5LfijAsw6eT099w6HFB6hVHJ5UpkrhNKMvlDotk69keq6MWyHZdKpJuDK1QCiXZ5IJdemVTWSvArneumA== Received: from BN9PR03CA0342.namprd03.prod.outlook.com (2603:10b6:408:f6::17) by CY8PR12MB7414.namprd12.prod.outlook.com (2603:10b6:930:5e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:30:38 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:408:f6:cafe::7a) by BN9PR03CA0342.outlook.office365.com (2603:10b6:408:f6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25 via Frontend Transport; Mon, 11 Nov 2024 06:30:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Mon, 11 Nov 2024 06:30:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:30:21 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:30:18 -0800 From: Xueming Li To: Stephen Hemminger CC: , Hemant Agrawal , =?UTF-8?q?Morten=20Br=C3=B8rup?= , "Konstantin Ananyev" , Wathsala Vithanage , dpdk stable Subject: patch 'baseband/la12xx: fix use after free in modem config' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:00 +0800 Message-ID: <20241111062847.216344-15-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DB:EE_|CY8PR12MB7414:EE_ X-MS-Office365-Filtering-Correlation-Id: 33c5bf59-d69f-4dc1-df11-08dd021a5af2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dk5OWiszRld6RkpHYkdzM3hDQVR5Kzh2ZzEydU1TYlJuaTRxZkltQzc2NnU4?= =?utf-8?B?b0hFMnZEOTBrWXVFTjNTTHM4SGhaM2t6Z1h3UzlqeGtqbXM0WFA0TUlGNHBE?= =?utf-8?B?SjdYU0dEa0FFcTNpNS9MV01Fd2tmVm5TenZYckdXVjd3MWptRzdtNi9ESG9i?= =?utf-8?B?dmpUTGhKeXFaQm9ob3lUR2gxTS9uM2V4ZVhoc3JUSVRFNVhnMjFYUnA5TC9V?= =?utf-8?B?TkE0M2UraHJxQTFwdXc1d21aTmFWTHlVbHg2YnR0MnJnM05xNXdzbnRsbGVK?= =?utf-8?B?bnBwMW5qQ01vQzhwZVVGK1JKbmFGYmRjSm5kYlJVZ2x6SGJkaTgzWFlvc1l4?= =?utf-8?B?OUJTdzhzaE9heVdVUDg1RXV3a0tmZUN1K2o1aWRzUGhuVVhlc0Fvb0owOWFs?= =?utf-8?B?WlpTYlVrcE1RdTExVmNkUWpBWGNQV0t5Skk4ODdjQklhaE1ZK2pUSTFIazly?= =?utf-8?B?emJiZzhhYnd5V0tES2Y1dkVqOG8yWk5Ic2FQRFNDSytuckZIV3VLQ2s5RWU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3VnJPcHVXaWxiUWlrWkVH?= =?utf-8?B?SkoxdUtzTkpBRkhGS1pJTWNmR3R4SFlXME5rc3R0S1ZsNDRscFJObnVkdG5V?= =?utf-8?B?UGMvQzAwSVFlVFJXa3BPZnp4L1dXTXlPNmNiTDVzc2djOW4wRng1N1JYdnRG?= =?utf-8?B?OWc4WlZ1eVVNb1owOFhHbm9FVXB1NlgwaFBlb05vQWRoc1pRQzB6S1FYazFz?= =?utf-8?B?d0pSSENxbXh2NXJnenNncDd1MGFlUDM5MlVKNkpXaXZKMjY3endaMUdvRTZp?= =?utf-8?B?aFBDWmRFblA0TTJTSUtpektEZDlXbkh2NSs2UUg5Q0ZDS1dDZmYrN1B6SGdD?= =?utf-8?B?QTFwUGllVlAzeEpaMkVIUEttTVdTbzBBdDFGOGJldFF5UkphbVkxZEZOM2lq?= =?utf-8?B?aUNrTkxzczhkRmFZZW41M2hnS3NVTG41VW9QczdWZnZsa3lYYnY0VmhlYzJQ?= =?utf-8?B?SitTR2h4L0dOc2wycy9CRWxFYWVCWW9Sd0t0L2JaWU1xNFE9PQ==?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:30:37.2718 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 33c5bf59-d69f-4dc1-df11-08dd021a5af2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7414 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e90be36798669790e22e49aa3db399630e8a4f48 Thanks. Xueming Li --- >From e90be36798669790e22e49aa3db399630e8a4f48 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:19 -0700 Subject: [PATCH] baseband/la12xx: fix use after free in modem config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 6ffb34498913f84713e98d6a2a21d2a86028a604 ] The info pointer (hp) could get freed twice. Fix by nulling after free. In function 'setup_la12xx_dev', inlined from 'la12xx_bbdev_create' at ../drivers/baseband/la12xx/bbdev_la12xx.c:1029:8, inlined from 'la12xx_bbdev_probe' at ../drivers/baseband/la12xx/bbdev_la12xx.c:1075:9: ../drivers/baseband/la12xx/bbdev_la12xx.c:901:9: error: pointer 'hp_info' may be used after 'rte_free' [-Werror=use-after-free] 901 | rte_free(hp); | ^~~~~~~~~~~~ ../drivers/baseband/la12xx/bbdev_la12xx.c:791:17: note: call to 'rte_free' here 791 | rte_free(hp); | ^~~~~~~~~~~~ Fixes: 24d0ba22546e ("baseband/la12xx: add queue and modem config") Signed-off-by: Stephen Hemminger Reviewed-by: Hemant Agrawal Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/baseband/la12xx/bbdev_la12xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c index af4b4f1e9a..2432cdf884 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.c +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -789,6 +789,7 @@ setup_la12xx_dev(struct rte_bbdev *dev) ipc_priv->hugepg_start.size = hp->len; rte_free(hp); + hp = NULL; } dev_ipc = open_ipc_dev(priv->modem_id); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:06.104682320 +0800 +++ 0014-baseband-la12xx-fix-use-after-free-in-modem-config.patch 2024-11-11 14:23:05.032192841 +0800 @@ -1 +1 @@ -From 6ffb34498913f84713e98d6a2a21d2a86028a604 Mon Sep 17 00:00:00 2001 +From e90be36798669790e22e49aa3db399630e8a4f48 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 6ffb34498913f84713e98d6a2a21d2a86028a604 ] @@ -28 +30,0 @@ -Cc: stable@dpdk.org