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 398884624E for ; Mon, 17 Feb 2025 18:05:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33AC1402BC; Mon, 17 Feb 2025 18:05:03 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id B97C8402BC for ; Mon, 17 Feb 2025 18:05:02 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4397dff185fso13625515e9.2 for ; Mon, 17 Feb 2025 09:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739811902; x=1740416702; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5k6aATcIZTmasV57f/g3LrsqTp66X6g3N60ewECFDI8=; b=JeedmbY5CI8I2eWfcHXB03Zn/azDMEpK3YtFSKPTwtNsiafRlRUHrMUMbjMYNJrywI 2dTtx+iDkisrs5lN/xzOeEk7ZI2Kr7JvqdGdfOKJab5pcvUKOV0PzOnCiJdtXalYS0j4 /KvUbxE6z4936Ft3HfE6rcWzEJSXmiSmDPRbyBbUesS/VH/Y+wXDCzkUNuFgCN0k1Awi CCydGrq1jd0/6bo/vI1e0NghwVERK6cmQ9kMb/g06tdMsiBm/k6PqbX6vY+Rw9nmm9OP D9DjDmD+SDnor6irChYaktNHbCTau7ZJd3qLhfh6J/vm11hUKeVdLP9xK5v8liPp/XgK DkMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739811902; x=1740416702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5k6aATcIZTmasV57f/g3LrsqTp66X6g3N60ewECFDI8=; b=N3boAlirBy8nV2gPK2OccYMjvy2pEdF6ySff9wcujEqcUVkZC1FUhECUM+doByutBE vFO4FcDDAup49btbo7Anl9W4aWJRJssa3a0DpoefnEBcdOeuMOX+VVQ53o9t/D9mlMMx /0GDMHz0alK3IYL7NCabt9T4aLxJ+/NfUqXWToi5D1tKm81LnRERokAtD3KPzyu/1gEP c3zc481klo3D3P6OKm3JDIjxAu4pd08vC6r4W0CM1gaWEiXrxCUBVdw8BCkHRfKnM2/9 gOtveigYQHWgBM0EF/jM3L8ntkm1a39MJX1c99eIWX1qy2sqX2VndapyrSSnbOUec0nN /YEQ== X-Forwarded-Encrypted: i=1; AJvYcCW3xsaQSevZX20bLp5YQrVVdZc7WpbT9wkpHRCXkn57QJhiF9642CaXW95gE8bIqFu+HCVeDFs=@dpdk.org X-Gm-Message-State: AOJu0YxxhbscHH/SvBUTLxn3/qjarVFF10h2UOuWAWnqvbmdmEqzQYNB /x2E5woxOrVj9sPGd4vDwvMUD7TiIUOLKtLxW0ujByJEF554CJTu X-Gm-Gg: ASbGncvD5YYotpgfBVG9I/B8EPNrxRUJkHQpdz6L5zw/yhOntIMA6WW3EA1d+H/zZWw OkUa62ETQ0QAHcCa7uiU0JyhKaq5mP/rvjQJhrRFe+t/78Y7z7B/DWdjmNqodDlYMFpyjLRA9Md 7OYMYXtDKaRCP+pThAO4sWCwOmq0r771qHINFdOTDXT/ICRL8h0fiiCujderpRNXvOiGXNYj5oT 29NG1/EBXi3f2W5NKjukpoZ2ptT2Zj6+EpnDJ/WTzjWdhNDE0IqTyz9663qvxayO/NRAkkeIHMs mcyH0LjHNrMNRP435EXNWQ== X-Google-Smtp-Source: AGHT+IFiEAgzvmHylLyAW/1fcWo2gOS7b/S7WPlobFHMPYfMLPOCGDLbtytjamRrw/NCjvSbxEMyQA== X-Received: by 2002:a05:600c:1912:b0:439:6925:4d42 with SMTP id 5b1f17b1804b1-4396e69a291mr117061895e9.5.1739811901828; Mon, 17 Feb 2025 09:05:01 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-43961884f48sm125483935e9.30.2025.02.17.09.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:05:01 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Maxime Coquelin , dpdk stable Subject: patch 'vhost: check GSO size validity' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:03:36 +0000 Message-ID: <20250217170456.1068278-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 22.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/25. 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. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/63bff5d105c47713a59c84753a0af0185cc34759 Thanks. Luca Boccassi --- >From 63bff5d105c47713a59c84753a0af0185cc34759 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Fri, 20 Dec 2024 11:45:09 +0800 Subject: [PATCH] vhost: check GSO size validity [ upstream commit 7023f3e532787eec7be674efb7a4aa54f1626b6c ] The value of tso_segsz cannot be 0, instead check that value of gso_size was set. Fixes: d0cf91303d73 ("vhost: add Tx offload capabilities") Signed-off-by: Yunjian Wang Reviewed-by: Maxime Coquelin --- lib/vhost/virtio_net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index 9c9d05d4d9..f16b7c45da 100644 --- a/lib/vhost/virtio_net.c +++ b/lib/vhost/virtio_net.c @@ -2503,6 +2503,9 @@ vhost_dequeue_offload_legacy(struct virtio_net *dev, struct virtio_net_hdr *hdr, } if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { + if (hdr->gso_size == 0) + goto error; + switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { case VIRTIO_NET_HDR_GSO_TCPV4: case VIRTIO_NET_HDR_GSO_TCPV6: -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:17.020932861 +0000 +++ 0003-vhost-check-GSO-size-validity.patch 2025-02-17 16:13:16.782441593 +0000 @@ -1 +1 @@ -From 7023f3e532787eec7be674efb7a4aa54f1626b6c Mon Sep 17 00:00:00 2001 +From 63bff5d105c47713a59c84753a0af0185cc34759 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7023f3e532787eec7be674efb7a4aa54f1626b6c ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 69901ab3b5..2ac5bc29a3 100644 +index 9c9d05d4d9..f16b7c45da 100644 @@ -22 +23 @@ -@@ -2733,6 +2733,9 @@ vhost_dequeue_offload_legacy(struct virtio_net *dev, struct virtio_net_hdr *hdr, +@@ -2503,6 +2503,9 @@ vhost_dequeue_offload_legacy(struct virtio_net *dev, struct virtio_net_hdr *hdr,