{"id":2224501,"url":"http://patchwork.ozlabs.org/api/patches/2224501/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260417132645.121192-2-sgarzare@redhat.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260417132645.121192-2-sgarzare@redhat.com>","list_archive_url":null,"date":"2026-04-17T13:26:44","name":"[1/2] libvhost-user: fix buffer overflow in virtqueue_read_indirect_desc()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"fe83a347a7dcbe29b036c65d1ebf6753ba299922","submitter":{"id":75453,"url":"http://patchwork.ozlabs.org/api/people/75453/?format=json","name":"Stefano Garzarella","email":"sgarzare@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260417132645.121192-2-sgarzare@redhat.com/mbox/","series":[{"id":500339,"url":"http://patchwork.ozlabs.org/api/series/500339/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500339","date":"2026-04-17T13:26:43","name":"libvhost-user, libvduse: fix buffer overflow (CVE-2026-6425)","version":1,"mbox":"http://patchwork.ozlabs.org/series/500339/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2224501/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2224501/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=QY+xrr8F;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=Iqt04R3+;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxwfN6Kxrz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 23:27:24 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wDjDr-0003wm-Ds; Fri, 17 Apr 2026 09:27:03 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <sgarzare@redhat.com>)\n id 1wDjDp-0003wN-RJ\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 09:27:02 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <sgarzare@redhat.com>)\n id 1wDjDn-0008Sr-QL\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 09:27:00 -0400","from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-97-vr4ECjyONaWC8tLwJ6ZxsQ-1; Fri, 17 Apr 2026 09:26:54 -0400","by mail-wm1-f69.google.com with SMTP id\n 5b1f17b1804b1-488d4ac6ff9so5463385e9.1\n for <qemu-devel@nongnu.org>; Fri, 17 Apr 2026 06:26:54 -0700 (PDT)","from stex1.redhat.corp (host-87-16-204-83.retail.telecomitalia.it.\n [87.16.204.83]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488fc16f8c3sm42236235e9.2.2026.04.17.06.26.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 17 Apr 2026 06:26:51 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776432419;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=QwIkfqmt1zQnJULEPImGXDUThga13ymI6/6eeiQZxQo=;\n b=QY+xrr8F9fAxLrB9EX2myabmquBhjutIlZ/1A6xY9tbavRMZdinUvGwMcLHlNMCdKsTiJf\n 70X+t+XV93ffkxyYJTWUAFRIaerWeoxUTq7HwnPWta7an7RH6ceWrAQeK2uypRco5TrGMM\n 0GMvq98bIES6lwoVk+GliqiAs5q+uA0=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1776432413; x=1777037213; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=QwIkfqmt1zQnJULEPImGXDUThga13ymI6/6eeiQZxQo=;\n b=Iqt04R3+3Cyvz0GkVZzDBhUG5J6k+Iiyvu16lRTE//wjLwtaQR4cZ+4p4IRxrRH/lR\n B+rgJtywFOVIQDv0Vu4LtZmKxFFDKxAIG5U1dnoqoHinfmUIaSbNdo91QqYA56dFi8cO\n /L78yBgQKN8Zm992QtfGungvpUekQmwP1dFJzbEGMYcY9FPN+hx37s8oPnceN6g+J7as\n Ppgi7Z5Rf/oDp3Gp0iO67A8yMkZ1CeCj2uycKJMREdAb65qeavZxuneJHRt6reuNANn9\n mpVTiSGJMaLQ8ydi0raok5CBHHSzWpk1pK5anLR3DsXiu/1aHqy/wbdvd47C7EouV6FC\n ZpEA=="],"X-MC-Unique":"vr4ECjyONaWC8tLwJ6ZxsQ-1","X-Mimecast-MFC-AGG-ID":"vr4ECjyONaWC8tLwJ6ZxsQ_1776432413","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776432413; x=1777037213;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=QwIkfqmt1zQnJULEPImGXDUThga13ymI6/6eeiQZxQo=;\n b=nWmQxC0Ya1KveVk5C64F0RKn4anMOZnSIANuv0CkYjtktPrAfDg4QgoSmZEUlHzzRR\n SHdxfkVsYA5yReGYDomi9l1pTOETI6dXoSdfhM76AlBKDrQ7thIEyHbP6lcnpCnf2tvR\n E2/IQsgsTsDxrLuN0IGb8uO5GGwTF4CbnjjcDytywkAVwtbbHTWmKb4vzDbXvYxOVqS7\n qfkHJePVo5lkAX2+YTQnGUI3Su1sSy4g5ETn3TGWos1q8sBZJtqIKxicvlRlT6YB8jqi\n 23LSEPogemR+AoJ55y7yq+sKo6j8OQMmIArNAlYDzW/FyWBrkXhAWFGJ38begebyPo+r\n q4oQ==","X-Gm-Message-State":"AOJu0YwPGjsoDMQS+T0JW4+IcVtmR87bbUIup1eixAVv6ilZrg0Vplmw\n kXj5oYN1gRQ0N7fNFkWG/Xnb+kFBB95iX6qsM143L+Ya+uaxpu5a1fROOnMG/OrhR3+MjbNQyzs\n Uy3kXhgPaLZpa4FFf8bbQMZJEvDdq47bU8+b2TfJKQ20jElEqKgCBQ0k6+hunljQcnDT8PAbYfb\n 3htf1dSBThG/mTTXq7dAFrS/LU7R8QJHSdhnBsTznU","X-Gm-Gg":"AeBDiet6QnBrHmNeHfH3/tIMgr4oiMM77FEZYZQEkgIhbQ1nOtVuXqBdhg8ah0eYLKF\n RG5XpvyRYhJHmRq0LTiDuvmTaqhWkTcyS9qrLIlatxcgsHf3WRZQHdbf9quCW/0bQR1ogratmf+\n /P9EwELTamiH34iLB7jiOazhtwt8urj8s9vHB3XvsD4LkdW1x27MgG7+/jBpmOVNMUaPWaBpWw6\n NnglDDIr2zTeJMqy6rhAAEMIPFsJSCbNmL7fzKnoi6h6s5kSsjR0z06ypncYNyub3h76KFfcJ36\n 7WSEj0AMiRMR4J+hd8mjZXgdurRUWDaNhgxn4oIc476mw8RrfY12cm3wdzHsVDj/S2/fRumQsp/\n stdKrITofE7vunpkyPuCK9oAB8me1EUHOE0DzYvdmcRcVnCv5AQw9JJdbskQXcM8yxtrgIh7SM/\n M70vYAjfQX","X-Received":["by 2002:a05:600c:34c3:b0:485:41c4:e2e4 with SMTP id\n 5b1f17b1804b1-488fb792dd0mr44217695e9.23.1776432412844;\n Fri, 17 Apr 2026 06:26:52 -0700 (PDT)","by 2002:a05:600c:34c3:b0:485:41c4:e2e4 with SMTP id\n 5b1f17b1804b1-488fb792dd0mr44217165e9.23.1776432412282;\n Fri, 17 Apr 2026 06:26:52 -0700 (PDT)"],"From":"Stefano Garzarella <sgarzare@redhat.com>","To":"qemu-devel@nongnu.org","Cc":"Xie Yongji <xieyongji@bytedance.com>, qemu-stable@nongnu.org,\n \"Michael S. Tsirkin\" <mst@redhat.com>,\n Stefano Garzarella <sgarzare@redhat.com>, DARKNAVY <vr@darknavy.com>","Subject":"[PATCH 1/2] libvhost-user: fix buffer overflow in\n virtqueue_read_indirect_desc()","Date":"Fri, 17 Apr 2026 15:26:44 +0200","Message-ID":"<20260417132645.121192-2-sgarzare@redhat.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260417132645.121192-1-sgarzare@redhat.com>","References":"<20260417132645.121192-1-sgarzare@redhat.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=170.10.129.124;\n envelope-from=sgarzare@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"-25","X-Spam_score":"-2.6","X-Spam_bar":"--","X-Spam_report":"(-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"From: Stefano Garzarella <sgarzare@redhat.com>\n\nvirtqueue_read_indirect_desc() copies an indirect descriptor table\ninto a buffer in chunks when the table crosses a memory region\nboundary. The destination is a struct vring_desc pointer but is\nadvanced by a byte count, so each increment moves the pointer by\nread_len elements instead of read_len bytes, writing beyond the\nbuffer.\n\nUse a char pointer for the destination so that the arithmetic\nadvances correctly.\n\nWhile at it, change the source from a struct vring_desc pointer\nto a void pointer: when the table is split across regions,\nvu_gpa_to_va() can return a pointer into the middle of a descriptor,\nso casting it to a struct vring_desc pointer is wrong. The pointer is\nonly used as a memcpy() source, so a void pointer is fine.\n\nFixes: CVE-2026-6425\nFixes: 293084a719 (\"libvhost-user: Support across-memory-boundary access\")\nCc: qemu-stable@nongnu.org\nReported-by: DARKNAVY <vr@darknavy.com>\nSigned-off-by: Stefano Garzarella <sgarzare@redhat.com>\n---\n subprojects/libvhost-user/libvhost-user.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)","diff":"diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c\nindex 9c630c2170..014d210748 100644\n--- a/subprojects/libvhost-user/libvhost-user.c\n+++ b/subprojects/libvhost-user/libvhost-user.c\n@@ -2391,8 +2391,9 @@ static int\n virtqueue_read_indirect_desc(VuDev *dev, struct vring_desc *desc,\n                              uint64_t addr, size_t len)\n {\n-    struct vring_desc *ori_desc;\n+    char *dst_desc = (char *)desc;\n     uint64_t read_len;\n+    void *ori_desc;\n \n     if (len > (VIRTQUEUE_MAX_SIZE * sizeof(struct vring_desc))) {\n         return -1;\n@@ -2409,10 +2410,10 @@ virtqueue_read_indirect_desc(VuDev *dev, struct vring_desc *desc,\n             return -1;\n         }\n \n-        memcpy(desc, ori_desc, read_len);\n+        memcpy(dst_desc, ori_desc, read_len);\n         len -= read_len;\n         addr += read_len;\n-        desc += read_len;\n+        dst_desc += read_len;\n     }\n \n     return 0;\n","prefixes":["1/2"]}