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 0FA1CA00C4; Sun, 27 Feb 2022 19:15:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 621EF41143; Sun, 27 Feb 2022 19:15:10 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id F0F0340683; Sun, 27 Feb 2022 19:15:08 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 781E75C016D; Sun, 27 Feb 2022 13:15:08 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 27 Feb 2022 13:15:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=QtzgvJl63AVy29 WvlbIGt4n8KEBp9pShqfS99KBRH+E=; b=eT4Frvy2whq3pR2P84/uy0e6MpxuMT vgYHrOAb6HqLv08hfGnxfZDFrl9psf3jM7P29MdrBbm4DioR+T/vXxvXuAsBFsQq D8tL8iTDoV7CIOTYZdyWojBV2/pKMeu1BAlCFkNbSYcIIg8wlKoxvp6EVOdaZQ6I 6Fu5yfYTzOjR68Ebf5WCVUGTcVA04wOPZcfrTO1rRRz8xJwSxF0cOHU7SMeVdDd0 W+V0toSNVTJ68uDpehQr2GdQCkn5pdDoNuK9Q05gEAkbWNzbWGcefTZiPcXGUI27 1yuJgYxay+xwtrevigvFcejWZVOibHXjAVJWdBfXiRBEUZ32e1EtHIkA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=QtzgvJl63AVy29WvlbIGt4n8KEBp9pShqfS99KBRH +E=; b=DuoJ89mfEFHr0LFxaStTveHrbcDgfWjAINl/rstbe1FCrqmAv3vOa2i9f zw6s7WAo5voAitNdhlnj6LFYNtLpqh42rQyBLBs3mzHg2JkvLsYIEZqO85WAVULI xG8YCdikpFr88inWACHao456U+hbwtyDP4HLW1YX5PuCEVJPBoXcdD0zOVkB0jED 86eVsTWKrgWxPQ6Gb57Zl5TrZLrelPLV4tDWfS4Afet2/AfIZJ4cKvAImVIpd1qF ibV8NqFibRJ7kbyDB2VDUEhCxiA3LOWSaPg40oD++xJtOmnRX0nLgb3fGe1cBigL J4WafWDm3ZaY0AlpYqdRaogxj9dlw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleekgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 27 Feb 2022 13:15:07 -0500 (EST) From: Thomas Monjalon To: Steve Yang Cc: dev@dpdk.org, stable@dpdk.org, Ferruh Yigit Subject: Re: [PATCH v1] eal/linux: fix memory illegal accesses Date: Sun, 27 Feb 2022 19:15:06 +0100 Message-ID: <5583356.iIbC2pHGDl@thomas> In-Reply-To: <6a18f1f6-2651-a659-5229-0aa8e367a4ee@intel.com> References: <20220223084950.3572178-1-stevex.yang@intel.com> <6a18f1f6-2651-a659-5229-0aa8e367a4ee@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 23/02/2022 12:26, Ferruh Yigit: > On 2/23/2022 8:49 AM, Steve Yang wrote: > > 'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer. > > But as coverity warns 'recv()' doesn't guarantee that 'buf' is > > null-terminated, but 'strlcpy()' requires it. > > > > Enlarge 'buf' size to 'EAL_UEV_MSG_LEN + 1' and ensure the last one can > > be set to 0 when received buffer size is EAL_UEV_MSG_LEN. > > > > CID 375864: Memory - illegal accesses (STRING_NULL) > > Passing unterminated string "buf" to "dev_uev_parse", which expects > > a null-terminated string. > > > > Coverity issue: 375864 > > Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process") > > Cc: stable@dpdk.org > > > > Signed-off-by: Steve Yang > > Acked-by: Ferruh Yigit Applied, thanks.