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 3B19343700; Fri, 15 Dec 2023 18:21:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21CFA42EE5; Fri, 15 Dec 2023 18:21:19 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2053.outbound.protection.outlook.com [40.107.92.53]) by mails.dpdk.org (Postfix) with ESMTP id 2492A402DA; Fri, 15 Dec 2023 18:21:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R8A++jTZmQvGivS7gcmh/sT+ouXNos8yDqm/rj476cWew2yn2so8Vi79Qv7eoX0wg6ndyttw8t4cEWPmACkZ5FC+qmAlNcNZcXjFwdFKbSal81E5fl7MSmR0bCMrDAXMeCkJkjgW8azYnyCdZdPFHkH8hkAVZt19fzddSMTREXlsNrr+oAd5MEuMeHWzqFSW4kMaLqbhN40tGR2yLa78EPcHRS64319zOiq/C++WY4ggFcFYWBCNTjDe5OElOhlrJ2GE3rWY56ahdjvpgS8QW+SOuOBx8e6Kj1UqkzWySKegSJ/rlRjnHAg7ViCu6WGVryiMfy/K2vMHb9RoKM7viw== 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=mZr8AWfhrTt2iM7VIyCzixqNhJxDRdIPZe+dGqk6UCA=; b=lN3TD5tB4Qx61evjo0UaRrPveOtk2z77T8yvGOEkH3lkM5LhMqY58Wn0KKpf2Na9h3xF2HVd3bRZYi8IR0lj984j6aVQKBIdIaYyQFDR4IrW/2RUybtopqzgAql1iFJhrptMcYv1MFeF7Bc6DnuOhFhTfnsMQyVzU0Y8K5E5x691qBoRqfPcFPamXf21FC1cMbAoJx5OqQ1gywdbnSAtI27t1JnAHBuzLniLBqdeLJI6vCGoj0COAQU4pU+QawB0QzspE+BkIKX3W/SssgLNBCz7+dRYfcOWhrP+nfXDTM3XKPPTKfySiUA9rc8q1j26UgqPggFFaOJGu0ohCB+quw== 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=mZr8AWfhrTt2iM7VIyCzixqNhJxDRdIPZe+dGqk6UCA=; b=3IREiF4XzBQl0si+y4P23LsO0XdrmIjlvCZHBwXUvAvnf27/ngMeNi9BxJr6IGCZs8mC8KEjVou3m+D5vsqwtg8p7AlFwUB9cvFvlUPGSdYKbPf9nG0oB1PaWumvRlDaTJvDb3Rooldyea3PoR51HbGOAXaFawrZkElBmwNuMgw= 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 MN0PR12MB6245.namprd12.prod.outlook.com (2603:10b6:208:3c3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Fri, 15 Dec 2023 17:21:14 +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.7091.030; Fri, 15 Dec 2023 17:21:14 +0000 Message-ID: <402fd6c2-3665-4c9c-b135-510f88fe8ad4@amd.com> Date: Fri, 15 Dec 2023 17:21:05 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] net/tap: fix buffer overflow for ptypes list Content-Language: en-US To: "Sivaramakrishnan, VenkatX" , Hemant Agrawal , Sachin Saxena , Zyta Szpak , Liron Himi , Chaoyong He , Gagandeep Singh , Jerin Jacob , Maciej Czekaj Cc: "dev@dpdk.org" , "Power, Ciara" , "pascal.mazon@6wind.com" , "tdu@semihalf.com" , "jianfeng.tan@intel.com" , "jerin.jacob@caviumnetworks.com" , "stable@dpdk.org" References: <20231212143722.1803259-1-venkatx.sivaramakrishnan@intel.com> <20231215133858.207911-1-venkatx.sivaramakrishnan@intel.com> <4640ed41-6225-4040-8d3f-0b7fdae6f9d8@amd.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+huVv3jyhzoAUO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yF0LfXcsQs SFVZE6igdvkjfYmh+QOrHGZvpWXLTmffVf/AQ81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0058.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:93::9) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MN0PR12MB6245:EE_ X-MS-Office365-Filtering-Correlation-Id: 28be1565-536e-4a03-d6cd-08dbfd923d69 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Nrst6l+5/C15yt6eGkMvB2aQvkAlyppJj4tfZvbXdQ7RcrjOCMWFohbK38Lo+YSWaVqazjvCGRkb7yMzYNQLU8+T+vbC/7HHe/Owm5+wpHWyXMHUsz6ocICKBZzky1KLb38fFBMCiEQfdl/qArBMw1BWib15MGliULKU2shYJMVtaRW9o9TNsBxg0r7D2y+QCX1aFkSfX6v4P2tZzaKHQhtcy/jDfzdOsF4w+GuxptX7gmGWZrqXX7uEV2mtr8aoyItNcm2AfcNmGwgNj+BWzuEb/bDOcDx8EflvC2mDYquUK4FL4yiNvJMIWIRyzPUV21ZAJzcZSCYEmdN2xBI/cdslpELdO69e5ufIwU1wZX/4umUG5/bfQXBihgBGN2NHupgq/47EA7GYdF7Z5EnI/IIsNiFzx7aoqhnEK0HDicafONoGW2dCgN8yye7k/p37bcdkZ5TgDOL0aqfF/dFffPctM3yE3FkiCwAdusD7usBewCOo9LXLOmtYPcjJCF9vIN5tY7cV5YX6JqwL/tzuarPfOjAKdUgL71N2Uvl8fyoR6ceGChdxMjEoLiRk8F4n7pDkJB+jqTz/DOm3FBBhS2Yjrk4/298FZuTtUQzsxf6dWID/m3nXkluxzUjyIZOhhNToDNE6QoSVfAsrfA3bEktl63ozZMQ8dnvD6FqB12g= 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)(346002)(136003)(366004)(376002)(396003)(39860400002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(66556008)(316002)(66946007)(66476007)(31686004)(83380400001)(54906003)(6512007)(110136005)(26005)(53546011)(6506007)(8936002)(4326008)(44832011)(8676002)(6486002)(2616005)(6666004)(478600001)(7416002)(2906002)(36756003)(38100700002)(5660300002)(921008)(31696002)(86362001)(41300700001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ald3NlRLYTZWaUR2SkNqY3RSdCtmTTB0bTgxQWpoTjZzb1F2R25JV2lEYlNs?= =?utf-8?B?QzQwblVVRTZuZ1NKUUMvR3JRN3B4Q1ZtbWdQOGJHUnVDWHhPUUszdFJkTUV3?= =?utf-8?B?d3VGQ3htNlZtdEJTa1dWcDJ3VnJlRXdTK1JEbHhHVnBndXJWeDVqbk1TV3lu?= =?utf-8?B?TkY3VXhWM2NNTFFBaXNZNFhFVWx3M1V4VkpueXgrNHlheFFvQVdMRncrZVo1?= =?utf-8?B?WFRFQTJBZXBiMHVsd1JVdDhDd1RoMVJTejZBYjhzQVRROWNCaEZNdC9Oenl5?= =?utf-8?B?NFNVbE56RmZHWEZ4TURkb1B5ZE5lOVlnd0RnbEJmSmZXSXRkMVhWWnpselNS?= =?utf-8?B?RF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enant-Network-Message-Id: 28be1565-536e-4a03-d6cd-08dbfd923d69 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2023 17:21:14.7658 (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: A633OPc7oBYORZnkAMmo4tnq33wjVWjGvPYuBYKSzr9xGGFyZf75JN3o/H8nI/HE X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6245 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/15/2023 1:55 PM, Sivaramakrishnan, VenkatX wrote: > Hi Ferruh, > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Friday, December 15, 2023 7:22 PM >> To: Sivaramakrishnan, VenkatX ; Hemant >> Agrawal ; Sachin Saxena >> ; Zyta Szpak ; Liron Himi >> ; Chaoyong He ; Gagandeep >> Singh ; Jerin Jacob ; Maciej Czekaj >> >> Cc: dev@dpdk.org; Power, Ciara ; >> pascal.mazon@6wind.com; tdu@semihalf.com; jianfeng.tan@intel.com; >> jerin.jacob@caviumnetworks.com; stable@dpdk.org >> Subject: Re: [PATCH v2] net/tap: fix buffer overflow for ptypes list >> >> On 12/15/2023 1:38 PM, Sivaramakrishnan Venkat wrote: >>> Incorrect ptypes list causes buffer overflow for Address Sanitizer >>> run. The last element in the ptypes lists to be "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 the ptypes list for drivers. >>> >>> Fixes: 0849ac3b6122 ("net/tap: add packet type management") >>> Fixes: a7bdc3bd4244 ("net/dpaa: support packet type parsing") >>> Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton") >>> Fixes: f3f0d77db6b0 ("net/mrvl: support packet type parsing") >>> Fixes: 78a38edf66de ("ethdev: query supported packet types") >>> Fixes: 659b494d3d88 ("net/pfe: add packet types and basic statistics") >>> Fixes: 398a1be14168 ("net/thunderx: remove generic passX references") >>> Cc: pascal.mazon@6wind.com >>> Cc: zr@semihalf.com >>> Cc: tdu@semihalf.com >>> Cc: jianfeng.tan@intel.com >>> Cc: g.singh@nxp.com >>> Cc: jerin.jacob@caviumnetworks.com >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Sivaramakrishnan Venkat >>> >>> >> >> Thanks Sivaramakrishnan for fixing all drivers. >> >> Acked-by: Ferruh Yigit >> >> >> >> Is there any chance you can add relevant unit test to >> 'app/test/test_ethdev_api.c', this way it helps us prevent doing same mistake in >> the future? >> > Currently, the application didn't crash for an invalid ptypes list. > It is a silent buffer overflow that was only detected by running ASAN. > Could you please provide your inputs/ideas to implement a unit test for invalid ptypes list. > I was thinking just call the API and detect the crash, but if it doesn't cause crash it won't help much. This is .dev_supported_ptypes_get() design problem, it is relying on driver set array ending with 'RTE_PTYPE_UNKNOWN' but there is no way to verify it. Also this requirement is not documented very well. Please scratch the ask to add unit test. Perhaps we can change the '.dev_supported_ptypes_get()', this should be possible without impacting the user, just by updating drivers. '.dev_supported_ptypes_get()' can be updated as: typedef const uint32_t * (*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev, uint32_t num); 'num' is simply size of returned 'ptypes' array. This eliminates need to have 'RTE_PTYPE_UNKNOWN' as last item, and overall change is not so big. What do you think, does new dev_ops fingerprint make sense to you?