From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 6222F9167; Mon, 31 Jul 2017 16:18:13 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0618520774; Mon, 31 Jul 2017 10:18:13 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 31 Jul 2017 10:18:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=xUJaHmRkDHjwD6A UbBj7lAIVWs5RAisKmK8UtaJXklM=; b=YaZCnNS4+kZ+lL1rHzCj3w5m98w5KYQ 8PFZcG/g5og9rxc+A8lX7Ya5XQsklAbqYRDADl8lWn1C7JqCpAWidhDl2AfY8sZG 6pnSnRDIEQ7DalzZxM5HfIMX6ThA5AI9xPjH8j13rO8WIv9hg+694kyMaYwVjq5T u6XPoTY+e/Ns= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=xUJaHmRkDHjwD6AUbBj7lAIVWs5RAisKmK8UtaJXklM=; b=fmRN9RnA g67+VsLIRPfrYFFy6K5G/pxglgd9cMGaCwwVpq/XWbV+NaxkDDkvhByXIxNoX7eB Z2Q5XEjI7ACA66GBhFKLWgjTl7vGLvysbblTOLb4adEZQDYYbYgmSymCAvPTqxKK 6iriqaEZMVU24PlL4GGWY0Nx32hJstfWCW3mQvitwVmn0oPeVAFeVQ1KInloO+LN 1kHYxIYkGCEjClfK3WNT/URu3vXEKxDzSQsil/JBvud1iLct04Koro++mPPDtR09 K5CodDiVKtij4sorL/ADQ0Uw+o9NZ6hRpQL1q2ZdbtMcFgObjthJcgNSEKYcOWb6 hkeABVluXv2bJw== X-ME-Sender: X-Sasl-enc: qtQVM1hW5ZvISfU6PodhdOs3/MTqIx+4EefKSv2I5pYT 1501510692 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7A56F24640; Mon, 31 Jul 2017 10:18:12 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: stable@dpdk.org, dev@dpdk.org, Ferruh Yigit Date: Mon, 31 Jul 2017 16:18:11 +0200 Message-ID: <3471108.DBEpgv82Pf@xps> In-Reply-To: References: <1757afd2673591a59ebd69cef7b569d344f20e7c.1501496827.git.gaetan.rivet@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH v2] ethdev: fix invalid length write on dev detach X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:18:13 -0000 31/07/2017 15:40, Gaetan Rivet: > The name of a device is copied in a provided buffer within > rte_eth_dev_detach(). The current sizeof is done on a pointer instead of > the intended array usually pointed to. > > The name field of an rte_device is not assured however to point an > rte_devargs name field. The almost correct length to base this copy over > is thus RTE_DEV_NAME_MAX_LEN. > > Almost correct, because unfortunately this function does not allow the > user to pass down a size parameter for the buffer it is meant to write. > This API should be fixed, it is broken by design. > > Fixes: a1e7c17555e8 ("ethdev: use device name from device structure") > Cc: stable@dpdk.org > Cc: Ferruh Yigit > > Signed-off-by: Gaetan Rivet Applied, thanks