From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id B405237B7 for ; Tue, 20 Jun 2017 13:38:27 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id s66so22257271pfs.2 for ; Tue, 20 Jun 2017 04:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qIuKZGWv1OYxVoA9o+YfgsMS11ElewTi2urGKKFdZeA=; b=lTHGDTJurpNagpLqO1li7eqyYeuHh+yyt6jRsJXJYRX+bFhtjef9efEj0yIh+/rI3x o1LhPJPJH5Z1fL2u469mLl9t8OJQ6wAC+P0XE7pks9+YI7vI2jPtT/E6vv6G56cZM8Hl WYxxNJQaTKz8Vh3dRRrlXzGQmswDQmYlRnr666XuADJmkMJzfTzfHzMuixO3sVmavKhf d2SbqqgojrPx1C9PGL98NcAAw81hkxKkcaVSHyAUo2wQkOSP34JaiEljyJVsmSUebHHy 4smZBBAxhdaIQAhrKcoPZ3cVfkjx74N31j8bRnk21z0ZwNUSAeGDkaI1e0uBGyJo0+GW yzuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qIuKZGWv1OYxVoA9o+YfgsMS11ElewTi2urGKKFdZeA=; b=jsNnyGrnew5x7E1Im38uX2MMphaBIXOz8NEJ1HpVH0tzok3P4bQWhzdk6Zq9pt+xnB NLokKq61Ypkx1mPdLLMvbM53hib9G6wMb+1lR6cCaZUeZUgJcOlTAs8L7QCA9u44ctgx ig7qey4rjKA/+MTRiKf4ZmmbkRDUZUd+L+f0pOyFVxBss5CoRoEchuJAl2rK7P9JeUT7 /j3jD1OZS/PJo7xsKdkPMyi8zkveWT1PYPNinUPoQ0lk6zNsipdpKn4Hw+i9/JrIdxGP MlK7TBOK3yTaLTqSAOEIoRFhtFQt1EtSr71gfyoN+/pLTUn9UeL7sa3LEEZAsOXOlLeu 3/ZQ== X-Gm-Message-State: AKS2vOxUj38uMiEoroMKBh1d/KIPcCM4b6YLR168MyrI6jeuMTfVcH+B EfzadSo5h7V6CGFR X-Received: by 10.84.233.204 with SMTP id m12mr16410550pln.292.1497958707072; Tue, 20 Jun 2017 04:38:27 -0700 (PDT) Received: from yliu-home.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 25sm6104783pfj.59.2017.06.20.04.38.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 04:38:26 -0700 (PDT) From: Yuanhan Liu To: Dariusz Stojaczyk Cc: Jens Freimann , Yuanhan Liu , dpdk stable Date: Tue, 20 Jun 2017 19:35:46 +0800 Message-Id: <1497958550-13600-34-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> References: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'vhost: fix malloc size too small' has been queued to stable release 17.05.1 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: Tue, 20 Jun 2017 11:38:28 -0000 Hi, FYI, your patch has been queued to stable release 17.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/22/17. So please shout if anyone has objections. Thanks. --yliu --- >>From ea282f659e2d16c16e47bd033640a96535fce6d8 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Fri, 26 May 2017 13:59:13 +0200 Subject: [PATCH] vhost: fix malloc size too small [ upstream commit d1b2842a9dcf1e7957a185be126f4af9885f9cf7 ] Amount of allocated memory was too small, causing buffer overflow. Fixes: eb32247457fe ("vhost: export guest memory regions") Signed-off-by: Dariusz Stojaczyk Reviewed-by: Jens Freimann Acked-by: Yuanhan Liu --- lib/librte_vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 0b19d2e..1f565fb 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -369,7 +369,7 @@ rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem) return -1; size = dev->mem->nregions * sizeof(struct rte_vhost_mem_region); - m = malloc(size); + m = malloc(sizeof(struct rte_vhost_memory) + size); if (!m) return -1; -- 2.7.4