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 5AB96436D3; Tue, 12 Dec 2023 16:23:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1952D40278; Tue, 12 Dec 2023 16:23:22 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2083.outbound.protection.outlook.com [40.107.220.83]) by mails.dpdk.org (Postfix) with ESMTP id 6937040270; Tue, 12 Dec 2023 16:23:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=acicX327c4yrGx0fHvpzhcm0iDqzpqveglYOuwE1D+/A3V8oOjqDoKC6GGIoFqBBcohZ37/1Zv81GW2RPADS9lf+JKA6uPfczZonbH5v/QpJpC9SPAgIH9/DecmCxSvadX5vRy5FGi+bpNAkOE8w303rXrfdz/L+aGY6quafmHn2DfKR6XjlimlnQfxhIaoI4Ekmzg9kVkd2eeT5rSbczUwmByxkbWOr8LLReVFJQHngOOgAS2+beYg+XTHsz55joivnm9FpMqElxwt0XuP3WnkEWqGGAt3e0vsNtd5+sCKaQAobGaFKFXZkkk6WDZUTxHL9ft5CjY6JvWAMkZNk1g== 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=FEIVxf79sPopGMlLl8rqUY6A2CDTn74ra/ixK0qaWdQ=; b=myYL9Vk1xzIzS9ujbcYN+RmtPwUbqhGZwRkqHg0ac3Hu7HomDsNQX1V1Uy4tF/3b5R0wmJt7r/rW2KRAHFdQguJRz0dtJeC6HdKW6EKzCQ/XMpPG5STcPO8HcCI2RQhMb3hZdXcB9EQPilkdyYrKuh4Q7STYfh2sdeX3H8Xo40OAa4hX/zIR637VN/m9n9X97bPDImcbxx3oVgXT/q8XcGbIh4ppN3i2C5jIaoGA+60D8SZ0EVjd987lW2N3bx81RplzYoPjQfnlJ4yRUL22x03b8vnYOWHhtpMIzPNgKGJfeE/3zWyS8LMzYQGxCm4+FICJxWBvjBb0fyj/MnZtPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FEIVxf79sPopGMlLl8rqUY6A2CDTn74ra/ixK0qaWdQ=; b=GD4la4YzEQNuWQe+ErA96+S0KxTft9HvREHPuG3VGb4azlEayG+gnLUZyFxnAnwbC3QSQnQL5oVBqU+z9Gq0Ybyxm1MMEI1LDQgVx8kyZ12at6t9q4KfoLQP8XIG4Mezmst6OOjRdFNo40f8mrJAe9oS1T0qfDIb4Yj5OQM4E/E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by MN2PR12MB4421.namprd12.prod.outlook.com (2603:10b6:208:26c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26; Tue, 12 Dec 2023 15:23:17 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.7068.033; Tue, 12 Dec 2023 15:23:17 +0000 Message-ID: Date: Tue, 12 Dec 2023 15:23:09 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] net/tap: fix buffer overflow for ptypes list Content-Language: en-US To: Sivaramakrishnan Venkat Cc: dev@dpdk.org, stable@dpdk.org, gakhil@marvell.com, Zyta Szpak , Liron Himi , Gagandeep Singh , Hemant Agrawal , Sachin Saxena , Chaoyong He References: <20231212143722.1803259-1-venkatx.sivaramakrishnan@intel.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE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tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20231212143722.1803259-1-venkatx.sivaramakrishnan@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0059.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::21) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MN2PR12MB4421:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a07bcb7-012e-46dc-8760-08dbfb264401 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ztVrVTb80PHQeYEJo6F6uQgidZPvE+NxQXc1WSdaPhqomFPfOUZhmFrT+peH78do+/SeHam4Gx0G3Li5YKRqNvE0ErwTWzyL1Z0g7P2rzCfCoHF+bSG9IMQfaY6CLagLthGULiaAbE9MrBPwOkkkGVSTDsrv7ztJYrmirNHE2Uia/3xHeBkLXDrvmi54p0iYu38jMr8Ydl0YfFm4P1TeXo2eS++8ZnBYNC9M2iyi2eonlLrFT/dAU9WJb2ROJVZz3SMj3kV6Xcy9oRXkIFBNvg5O9livrZwdtJkjW9AnVMjmw4R864RKmQre8X+iy5aNaG1P9EUCrTIcWUTqOfiMzu2UHr5cMbifLHXrk/ugJzxzR3NnxP3MnfxfmbqlGdAamkMtdE4xB1HRBQvWTRFpNWpUMgT4r6WXhamFOwKd94Eyjl4D9ARPM4Sv42y2Txq3BPvsuo205Bl6uYocwPVQGlfSRa31+iDOSLnkMs8+AAsa4AA6UZlHhMq87eHDm1CzqD+36vdxhkM5Fu5pNLmVkvnWVqmcNCHhU/aCLUOk/MxKLwFRxC1t9sb7rKTvlpU8GmQo+cGIHOkout2IjRJKi8xjwuS4sy2k9KZgkBg3BBBUcQn6smNK6jpLO9It5m3mTeSVtWKiCfxpd7UXdA+1Rw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(366004)(136003)(376002)(396003)(346002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(26005)(83380400001)(6512007)(6506007)(53546011)(2616005)(44832011)(8936002)(5660300002)(4326008)(41300700001)(7416002)(2906002)(6486002)(8676002)(6666004)(316002)(478600001)(6916009)(54906003)(38100700002)(66476007)(66556008)(31696002)(36756003)(86362001)(66946007)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YUttVUVhOXRLcG9hSUxoREgrN1gxeUU1eklNbG8ycC9WL09Tb3hLaVNCRXRN?= =?utf-8?B?Y29ubDYreXV3c2o5MjRrQlJnTVo5c3RPajE3RnlnVmhLL1RhQndxdWhSWUV0?= =?utf-8?B?RjBaZ2lPdXpyYUJycHJZMVVLTnNWa3NqcWVrVlExd0ZHSzB4RjNuWnRuNWxt?= =?utf-8?B?WmI3ZzVVaGZPRlc0dXhNTTJOQ3dBZ3ZHaCttb1lKZTVyM2xNNjRQR2tRVndS?= =?utf-8?B?RUVaUDBacDFydnFDelZaRVZZVEt0OGRZTWVHNEdzblgrOS83TDdZRVpBWDVw?= =?utf-8?B?dTVFemJxQU1LNGV4a2RSU0NWbEhyQy9ZT2luSTJIbVFsVHZYd3FXOUtFZVk5?= =?utf-8?B?OTdJVFh5VitUMXF2TlNPeTVVUU9RNkUwamMrZkJUd2JkUW9pLy9KQnFFcnV5?= =?utf-8?B?aGFiY1FMWlNDcHEyZkFvQkxlS2R3R1Y2WnpWSzBQYkJyNktsSFdTQWsrSXpV?= =?utf-8?B?TnhvV0VKbTdMV3pOZXdXMEUrMlZoZ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GxmaXZoYWF6NnN0ekliWXZYM0psdUQ5TDRkUHZ6cjNr?= =?utf-8?B?Sk83aEIvQldtMkpCMVZaYUlNTEFPU25YeXBOdWYvSVNhQXk2TStHeUhueW9X?= =?utf-8?B?eXFpVVBHc1EwUUJxdHJueUg2TUdqaWVaWTJyeVUvaXNPK1oxQkMrWElSS3J0?= =?utf-8?B?U2NrL3VGcmdSZDhGVXpQeHQrYW1vUU1WTEpLcElMdi9MRHFPU3MwajNQQ1Qr?= =?utf-8?B?V0VFYk5XOHE2cGM5YWM1anR5K2J4Y1RXTVJ3UVpJTkFRNXFZbVZQT1Azais4?= =?utf-8?B?S0hYSU9YaEwwYnhuNmp2WExWcEFJZVBqb1hNQ055bUNZVGE4dkxNT2dLc29U?= =?utf-8?B?cVdPc1hNeWJQb2xmQmFhTUprR29BR1FUdm54R2pJdWZ5M0pRaURLbVFqc1hy?= =?utf-8?B?V2FBRDBGaE1LdFhVNm5ycHhNcWliM2h1Q1pDZlpCTFNHY3Z4N0psa21rQ1Y0?= =?utf-8?B?R2xXMC8zZkVyUDVXSEplSlVuKzNRWWdBbUYzVmdrbVArSFdXV1lJSCswRDBG?= =?utf-8?B?bVhBb2syVndzVS9zSmdSS0dYUTBaUWFhR3RaRW56S29NTmNwS1I4VHFId21u?= =?utf-8?B?QVlzWmpOYVVMZ1FmT3NzUUNPaGFoQWdJd3NDRENxT0lONTY3UjZCSStTRTVa?= =?utf-8?B?d2V6VnM0OC9yRWdZcnp0UlR1WWZVZUxXRHlDczhZNUJESlN3WmZUNkIzS3pu?= =?utf-8?Q?SWCU=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a07bcb7-012e-46dc-8760-08dbfb264401 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2023 15:23:17.4868 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DBHm86tqayWoChxP1zdO1pkErs1Ib5wC7jN8EURASKruLHCpXRlVlSmtvmucCpk/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4421 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 12/12/2023 2:37 PM, Sivaramakrishnan Venkat wrote: > Incorrect ptypes list causes buffer overflow for Address Sanitizer > run and a tap device. The last element in the ptypes lists to be > to "RTE_PTYPE_UNKNOWN" for rte_eth_dev_get_supported_ptypes(). > In rte_eth_dev_get_supported_ptypes(), the loop iterates until it > finds "RTE_PTYPE_UNKNOWN" to detect last element of the ptypes array. > Fix tap_dev_supported_ptypes_get() method to return correct lists. > > Fixes: 0849ac3b6122 ("net/tap: add packet type management") > Cc: stable@dpdk.org > > Signed-off-by: Sivaramakrishnan Venkat > --- > drivers/net/tap/rte_eth_tap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index b41fa971cb..3fa03cdbee 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -1803,6 +1803,7 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused) > RTE_PTYPE_L4_UDP, > RTE_PTYPE_L4_TCP, > RTE_PTYPE_L4_SCTP, > + RTE_PTYPE_UNKNOWN > }; > > return ptypes; Hi Sivaramakrishnan, Patch looks good to me, thanks. But there are multiple drivers have same problem, at least following ones [1] (maintainers of them cc'ed). Can you please send a new version that fixes all? Also as we have already missed multiple ones, perhaps we can add a unit test to 'app/test/test_ethdev_api.c' for this API. I think there is no way to make sure if 'RTE_PTYPE_UNKNOWN' is added (unless you find a way), but we can call the 'rte_eth_dev_get_supported_ptypes()' API and detect any crash in advance. Can you add this kind of unit test as part of next patch? [1] mvneta mvpp2 pfe dpaa nfp