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 6E64B454E8 for ; Tue, 25 Jun 2024 01:59:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A2AA40EE1; Tue, 25 Jun 2024 01:59:28 +0200 (CEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id 9D4FE40EE7 for ; Tue, 25 Jun 2024 01:59:26 +0200 (CEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-424a2ad06f1so298265e9.1 for ; Mon, 24 Jun 2024 16:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273566; x=1719878366; 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=9U3Mlxjq7rVCphvGeHAVgQZt5g6oqMAfc4ioGKe6FYU=; b=E99KGtJgKYmxxtBGRXGc3fQRg+sKP3JUFKPiXOTWbe7OmYCWDf3d28qk00+Gk0+M0q g9MlkbU5oQCEJ6CDYwe0NvaGXuitqQWU63fm5LSWv9eF4Y9AhNsS1U5qWAUx9c/20qJV 49B9uranRvSq+2Y94FhQgywUKFOMpFJFBh0MtBBgUJD3rqHHDzl38e0msExDD7GgkwZZ i8ddEWHJX6xWj3sxZ7/x/ZIaX7x8j0uhIVem5bGPtGlEB7OaavM5KbsUl+h/ldIkk/Fa uOh+qcVX6lfCiLENwKckT8bIrSfyRwCaX7x/7yTQjlI++RPJx/OHDxeox/aHG1qms8ZG tAeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273566; x=1719878366; 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=9U3Mlxjq7rVCphvGeHAVgQZt5g6oqMAfc4ioGKe6FYU=; b=PHZk7UfW0LyVFfHD3n4h42tqnLYV7X61pu5fSpNiEVO03qRnlgQFd5eJGaXjKG3y1H xR+Q5eN8tZzMjgnO7S5gwLPe9OWM4b/8v3I5slnbD8HitTsFr+Ya0crXdV/1vBRPdZMz Az1ggKMIRdKtebf7qfl/Igjh09Ju2MK8ILpho4FSsIqsuwLbYP+TJ7XKs7u5ALA5ArxG Ecx9L+ZrJLoRh9NXanMx5vMQz9j9S2eA5ycCpnxQhGaW8sMtNAObZtby0dONliCfJpot +BOrU9tRR3ZwSDsaYdzRiBqt2V+EioLgAJParoCPvKtg8OJ1l6XGwyigRxt2tXxLublF PWSQ== X-Gm-Message-State: AOJu0YxKBiuvqnPzdnkWTm15ll5VBkqt8llfAYDXkD3Xm9loas0JB2SG Amd4zU/iL56iYw6fRW7px9WkxXkoX7izF7r8BDovHAhZ0iy1VFH0 X-Google-Smtp-Source: AGHT+IEldSl0iQkW+Ryaeevlc7/dsEGw6uM9h392o73/YMsJqPKBnyFVkUfqDwWM/j5KPtQV3mrD5w== X-Received: by 2002:a5d:6143:0:b0:366:f8c3:9a35 with SMTP id ffacd0b85a97d-366f8c39acbmr2059257f8f.64.1719273566223; Mon, 24 Jun 2024 16:59:26 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-366e0750e41sm8900316f8f.97.2024.06.24.16.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 16:59:25 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Subject: patch 'net/virtio-user: add memcpy check' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:57:51 +0100 Message-Id: <20240624235907.885628-5-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-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.6 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/27/24. 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/7cc8737e523e7d68601dda1fe40aa3205cb0a8b9 Thanks. Luca Boccassi --- >From 7cc8737e523e7d68601dda1fe40aa3205cb0a8b9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 20 May 2024 18:01:04 -0700 Subject: [PATCH] net/virtio-user: add memcpy check [ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ] If fortify is enabled, it will generate a warning if memcpy src is NULL even if size is zero. This happens if the MP message sync is called with no file descriptors. Bugzilla ID: 1446 Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Signed-off-by: Stephen Hemminger --- drivers/net/virtio/virtio_user/vhost_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c index 3c05ac9cc0..c10252506b 100644 --- a/drivers/net/virtio/virtio_user/vhost_user.c +++ b/drivers/net/virtio/virtio_user/vhost_user.c @@ -128,7 +128,8 @@ vhost_user_write(int fd, struct vhost_user_msg *msg, int *fds, int fd_num) cmsg->cmsg_len = CMSG_LEN(fd_size); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; - memcpy(CMSG_DATA(cmsg), fds, fd_size); + if (fd_size > 0) + memcpy(CMSG_DATA(cmsg), fds, fd_size); do { r = sendmsg(fd, &msgh, 0); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:13.587408350 +0100 +++ 0005-net-virtio-user-add-memcpy-check.patch 2024-06-25 00:22:13.065183203 +0100 @@ -1 +1 @@ -From 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 Mon Sep 17 00:00:00 2001 +From 7cc8737e523e7d68601dda1fe40aa3205cb0a8b9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org