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 628DEA0547; Mon, 21 Jun 2021 06:20:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4F0640040; Mon, 21 Jun 2021 06:20:18 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 24B5A4003F for ; Mon, 21 Jun 2021 06:20:16 +0200 (CEST) IronPort-SDR: fgb02jEFx/BKPdoxpSJ/JVFwEyoC7IrAcA9XiBNPKxjOHwYvrOgZaO4fBznz1c6w3J8tk+sG7m b5TRe1rapFdQ== X-IronPort-AV: E=McAfee;i="6200,9189,10021"; a="186465529" X-IronPort-AV: E=Sophos;i="5.83,288,1616482800"; d="scan'208";a="186465529" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2021 21:20:16 -0700 IronPort-SDR: Dq+cYDELVCrjvu7PhTsrchY7Aj+c8mogeJ8ymMsVbLeuJ0GgKDwCUEFAELrz3vgtx28paXEqfF 7RkO1pB4lHww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,288,1616482800"; d="scan'208";a="489742774" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 20 Jun 2021 21:20:16 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Sun, 20 Jun 2021 21:20:15 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 21 Jun 2021 12:20:13 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.008; Mon, 21 Jun 2021 12:20:13 +0800 From: "Zhang, Qi Z" To: Tudor Cornea , "Yang, Qiming" CC: "dev@dpdk.org" , Tudor Cornea Thread-Topic: [PATCH] net/ice: fix integer overflow when computing max_pkt_len Thread-Index: AQHXYdKmDKliMXPrpEasL8p9YY6bYasd5UjA Date: Mon, 21 Jun 2021 04:20:13 +0000 Message-ID: References: <1623753514-36187-1-git-send-email-tudor.cornea@keysight.com> In-Reply-To: <1623753514-36187-1-git-send-email-tudor.cornea@keysight.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ice: fix integer overflow when computing max_pkt_len 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 Sender: "dev" > -----Original Message----- > From: Tudor Cornea > Sent: Tuesday, June 15, 2021 6:39 PM > To: Yang, Qiming ; Zhang, Qi Z > > Cc: dev@dpdk.org; Tudor Cornea > Subject: [PATCH] net/ice: fix integer overflow when computing max_pkt_len >=20 > The len variable, used in the computation of max_pkt_len could overflow, = if > used to store the result of the following computation: >=20 > ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len >=20 > Since, we could define the mbuf size to have a large value (i.e 13312), a= nd > ICE_SUPPORT_CHAIN_NUM is defined as 5, the computation mentioned above > could potentially result in a value which might be bigger than MAX_USHORT= . >=20 > The result will be that Jumbo Frames will not work properly >=20 > Signed-off-by: Tudor Cornea Acked-by: Qi Zhang Applied to dpdk-next-net-intel after adding missing fixline and cc stable Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF") Cc: stable@dpdk.org Thanks Qi