From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 27F211B252 for ; Mon, 30 Oct 2017 16:37:58 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id n74so9816233wmi.1 for ; Mon, 30 Oct 2017 08:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vNc4rJOEIeLMBwsNTP8mZb4JT9V/38AcZQCNTisptjs=; b=HC97tnlu5+VmuPu9LLzeud3rZWL7Nb+VF3GW/PsWGYLQHE27LQTCEavoYiL5A6xVRB Idx9nkO4zKYT1RLg+Th5kXDVqRHJczBi1zn0+YkT8T9zFdQCB9F9I/Plx2wu+/z6oEwi YKIBe9qcmzsY6vJAFls8XlP40BmEGjD1QIm1qK/aDnH8OlTdsZosp4pOCZ88s2W/4dr2 77tQq3YZ2tGoCPQs0+Kb2vsTvwuFRjhItSaO46DRSHRnNlYz4AMyyDK1fAgTsUprNsGR QK3FsynGPrRTGot0g/UBsBXLL4ofStOGDxfhpYNO+ASjOPTGeNRXIEXY5BJJ/N33f499 z9+w== 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=vNc4rJOEIeLMBwsNTP8mZb4JT9V/38AcZQCNTisptjs=; b=XiTdRGc7DRvLDUsaDcOkGNaXszS9WjSxM3cVyuL7prI/KTlWdT+uIdfuPnR7jywFnb IbF2O/fGBIthJ0OjphoQYqeoQ+k+hVxE3jqHq1CrOloF5g2xfIypf/ZanGcbck65su32 ieyvejjVhlkOb1Y7Adou70mt5Qh1yIasy+Q58dM1WouCJX7HC+JoGIH3tbrWOtQaAoQ6 aW4cy75eQ8J9verotoUSdSWr259zhlyhRatgdpFWibZHKETp7l8grEK3sDkpfIoMQtKg c1R6E9GthmjhQLqNELAinMdTmAMxr1Q5/Stioj0/7v7xkdoOGqGHVzrAzODoHYHWIC7k eBfA== X-Gm-Message-State: AMCzsaVwlBuzq9019GuOqFTDOY/u57oKxJTRh1dj8n6Pbpsr5yyG7Egp zaAaSQV1twsfatXrbTh3kBU= X-Google-Smtp-Source: ABhQp+RLsrbuDJH37VSLoHv+8TeJ0hNeqsofr8ywndO7S83O9aOI7KicNQIT6g+TaAO/wSRcxz8S7w== X-Received: by 10.28.138.12 with SMTP id m12mr4553991wmd.134.1509377877799; Mon, 30 Oct 2017 08:37:57 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id y29sm10035484wrd.3.2017.10.30.08.37.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Oct 2017 08:37:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Daniel Mrzyglod Cc: Jianfeng Tan , Yuanhan Liu , dpdk stable Date: Mon, 30 Oct 2017 15:34:47 +0000 Message-Id: <20171030153511.13322-44-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171030153511.13322-1-luca.boccassi@gmail.com> References: <20171030153511.13322-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/virtio: fix untrusted scalar value' has been queued to LTS release 16.11.4 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, 30 Oct 2017 15:37:58 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/01/17. So please shout if anyone has objections. Thanks. Kind regards, Luca Boccassi --- >>From 2048b2fac091653be9183cf788e7df26cf22cacf Mon Sep 17 00:00:00 2001 From: Daniel Mrzyglod Date: Fri, 22 Sep 2017 17:21:49 +0200 Subject: [PATCH] net/virtio: fix untrusted scalar value [ upstream commit 7b3249c56e29bec5f710624335bd4246c2a356fb ] The unscrutinized value may be incorrectly assumed to be within a certain range by later operations. In vhost_user_read: An unscrutinized value from an untrusted source used in a trusted context - the value of sz_payload may be harmfull and we need limit them to the max value of payload. Coverity issue: 139601 Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Signed-off-by: Daniel Mrzyglod Acked-by: Jianfeng Tan Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_user/vhost_user.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c index 082e8217e..6f4845b70 100644 --- a/drivers/net/virtio/virtio_user/vhost_user.c +++ b/drivers/net/virtio/virtio_user/vhost_user.c @@ -97,6 +97,10 @@ vhost_user_read(int fd, struct vhost_user_msg *msg) } sz_payload = msg->size; + + if ((size_t)sz_payload > sizeof(msg->payload)) + goto fail; + if (sz_payload) { ret = recv(fd, (void *)((char *)msg + sz_hdr), sz_payload, 0); if (ret < sz_payload) { -- 2.11.0