From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B808A0093 for ; Fri, 22 May 2020 11:41:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2348D1D966; Fri, 22 May 2020 11:41:18 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 794B81D966 for ; Fri, 22 May 2020 11:41:17 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id x14so4143113wrp.2 for ; Fri, 22 May 2020 02:41:17 -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 :mime-version:content-transfer-encoding; bh=Z7819JogBWCArLdVjSLM9/cuJZi/Ohinx2iAI7NEwjQ=; b=uskqpQCj/lveYz19XgSXl/5LcTu+b0ZJ5c/31h5OTMVQDL0d9kNFlHLi43D3XURhco Cc9NICWeQouw49iEF5x3NWLsSV6Iy5BZ47vBklzlrryXOPUtE5C6H3twbMnPClh5vrxf XEC3avH7JneuEHCPAWb78O2GXGsLv1f5ffdGZYUI968vJq3OX1gj9xl4cqZRMhQf38VD O3GR3wEKNRd+HdumoVfz8wOerNFU28BI6UXKNEUH55GMnOWsP+SCXpZkxaXeH2akewY0 MInYfrm5G7YDHf7UQt5ChYECsNFqyx7ngIOEivSwN4QjaIsxjHIuQIbsj2tOEwbv6ZlA RTaA== 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:mime-version:content-transfer-encoding; bh=Z7819JogBWCArLdVjSLM9/cuJZi/Ohinx2iAI7NEwjQ=; b=EGxZZ2wboNF0AkEORQoHCMl9QZtdMff1acR4v9peaIZnKFH0zA1kZc2P+aJJOUSWp4 BpmmGIyegM/jalOetDVDyHJPStz8qh/FvC8NhijZMaY5HrewPvzGvqYqQZfBjxD6xLM3 3gvNdWL2oJJkP8/I2wDYkXZ7SLJKmeE9ItvENj3qKnzVG1/Ou/8UkMhafeANgWtdHLwG haA/hCvqC4Qj3oqtQAiHP249WHhGNz2Frs+pw/mcuBqoReefU8MBDFO+lztlhFmZxB2e cVF/4NQs6AONjZE5DFZgbvFoLnVFEQsmjDGVOQXVM2a/vU1HaYz593WdSC6Rv0Mjw4Zn utmQ== X-Gm-Message-State: AOAM532jKMDX62FR5jIT2UcwlnmDyaTJGghOJHJramMBS7BA0oGxwK83 oSYWELkV30JOhAhZlQziEz0= X-Google-Smtp-Source: ABdhPJzFCsAJZV5INmVrsOTe3l6shfX79pFa/z1e7yl5F+w0QLVgSSeqFu+nY2O6AraU8ka0G/PX7Q== X-Received: by 2002:a5d:4dc9:: with SMTP id f9mr2627642wru.407.1590140477171; Fri, 22 May 2020 02:41:17 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q4sm9284526wma.9.2020.05.22.02.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 02:41:16 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Yong Wang , dpdk stable Date: Fri, 22 May 2020 10:39:55 +0100 Message-Id: <20200522094022.1025696-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522094022.1025696-1-luca.boccassi@gmail.com> References: <20200519130549.112823-214-luca.boccassi@gmail.com> <20200522094022.1025696-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/vmxnet3: handle bad host framing' has been queued to stable release 19.11.3 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/24/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 733bc3f6391f89972e7c088785d7494de2dc80cd Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 12 May 2020 13:40:03 -0700 Subject: [PATCH] net/vmxnet3: handle bad host framing [ upstream commit eb49f1671f30ede5121373e633c529b75993a6b2 ] The VMXNet3 protocol has a start-of-packet (SOP) and end-of-packet (EOP) marker. If there was a bug where mbuf arrived without SOP the code that chains the mbuf would dereference a null pointer. Also, record any mbuf's dropped in statistics. Although did the initial code no longer have access to VMware. Compile tested only! Coverity issue: 124563 Fixes: 8ee787ce80a8 ("vmxnet3: remove asserts that confuse coverity") Signed-off-by: Stephen Hemminger Acked-by: Yong Wang --- drivers/net/vmxnet3/vmxnet3_rxtx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index dd99684bee..73e270f30f 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -950,13 +950,17 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) RTE_ASSERT(rxd->btype == VMXNET3_RXD_BTYPE_BODY); - if (rxm->data_len) { + if (likely(start && rxm->data_len > 0)) { start->pkt_len += rxm->data_len; start->nb_segs++; rxq->last_seg->next = rxm; rxq->last_seg = rxm; } else { + PMD_RX_LOG(ERR, "Error received empty or out of order frame."); + rxq->stats.drop_total++; + rxq->stats.drop_err++; + rte_pktmbuf_free_seg(rxm); } } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-22 10:37:39.845391541 +0100 +++ 0016-net-vmxnet3-handle-bad-host-framing.patch 2020-05-22 10:37:39.100412212 +0100 @@ -1,8 +1,10 @@ -From eb49f1671f30ede5121373e633c529b75993a6b2 Mon Sep 17 00:00:00 2001 +From 733bc3f6391f89972e7c088785d7494de2dc80cd Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 12 May 2020 13:40:03 -0700 Subject: [PATCH] net/vmxnet3: handle bad host framing +[ upstream commit eb49f1671f30ede5121373e633c529b75993a6b2 ] + The VMXNet3 protocol has a start-of-packet (SOP) and end-of-packet (EOP) marker. If there was a bug where mbuf arrived without SOP the code that chains the mbuf would dereference a null pointer. @@ -13,7 +15,6 @@ Coverity issue: 124563 Fixes: 8ee787ce80a8 ("vmxnet3: remove asserts that confuse coverity") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Yong Wang