From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 42CA980B15 for ; Wed, 21 Oct 2026 08:47:43 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69L8kJb7015265; Wed, 21 Oct 2026 11:46:20 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69L8kJb7015265 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="GSWSYQBX" Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69L8kI6s015253 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 21 Oct 2026 11:46:19 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69L8kI6s015253 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-48b00febba3so346080f8f.1 for ; Wed, 21 Oct 2026 01:46:19 -0700 (PDT) X-Gm-Message-State: AFq9FYIAQaDcgsiWMvv0x2ETVXxPWQj7/SKBtbqJ6K6Wxh67N+CuGLI2 42TnwVvPuivCu65rbUYIHgovoy/2WCkpvyYFWqdvcUFF2d9kiH+hjSCjHcZiwewjyIkUIZxc4NW 7+etwPYijkglffcyLZbOgq7rmEqSbPEEgS6vQdPKt51H7lKpZaD99tw== X-Gm-Gg: AYBFou1wdUd2gNCZximQmZl+ZbJyJul7LfBCxWwvNA6KrH+9Ul+tDDl0mFpKGr4fJNj rdW3PPX8pwAM3pNF4IQIZrxhwXNwMsxmfvwXhIkafpcnekJy/vPHXiRNusvq3cvLk6oPU/vQ4bJ 8JGQtRmS/bX31WD7C4gSeJdotNQAWXQ7ftR/dx0tXn3zLOLsUpwQ882t1puY59Nd+8PJBeRf0RX EYzTDBEpToOCBa/yA8txytRejbbSL6uGrr765t1lJj0UEhdmQmfxZi6qwTxxCocGaBZpH9bAfTD RpdYLfDlKWD+wWkeFd8ebAuu/n2e7qePia8WKcyK5gc3It5kk9dPcBl41JuyJ1CgE1mr986ytLM ERZ+XROx8Ad3EhTNOGXtmzwC1JXo= X-Received: by 2002:a05:6000:46d6:b0:48e:19c7:6e23 with SMTP id ffacd0b85a97d-48e264caadfmr1661907f8f.37.1792572378670; Wed, 21 Oct 2026 01:46:18 -0700 (PDT) X-Received: by 2002:a05:6000:46d6:b0:48e:19c7:6e23 with SMTP id ffacd0b85a97d-48e264caadfmr1661860f8f.37.1792572377986; Wed, 21 Oct 2026 01:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792572377; cv=none; d=google.com; s=arc-20260327; b=buzESzLNTLe8Sh/5uyGyZ76zMc+unmlj7w2yIjNfbYjwKoGMucwKvmCywyQvV8v3q6 onDIFiynNvhLeasE124xUI41tfqJc2+sqt1Mat6Iy9X373R1tqIh+C2cEZeB8JgwzBAC 2n7rpge52UIYuWwOajF5EGmGUSt8wEFDyrmvnvXkpSVht3RuM8/qDEOsOxyEg//CK5vl yE9hSunV2FhGq/d5/ce3OEhKWI35Ne9yoSscL1tBJ8p2EkaJlFW5GDcy0BKmMNb2HugX fjb8O3Zb2uxMgBW0/83LWoa3y/04pk3QWiwG+qItWI5GFlUiig625oWWHU04biyd4q9r EnYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=br/wNqVEh6RQIP/KxRI0TE12SELnWw3wvFVu0jSwynE=; fh=G2JGoeUCR4a/A0TH0K3bHnuxqhe+kjaX7a5tGdksR6A=; b=RsmGgzShb9b0nUi0FOsDi92dcCq+ZXrnB249ppHByp3Rfl4tImf+HCzryHKqQfEiFs SZDPA8OLVs0HxqE0UwXTCL3wzD4DTgPnhCGT+YKg2l52YX5L3Q14zWgXekY/v7w+b+JL Zlr5w7Encs4mUatjIia+w9OR3MZlXEgZP4EIrnFzBNiOi/HjrPW18+QVzwJXcnkeoSqN 3w71txa+E7JSw4k6v1NaeJQZIIdLPbCvHLvQbqqrE23nPDZBtcSIOkXATBBdPaJb+rTL AoT1AjIKYs+mb4r51Nywoeonyvq8IIVvLkXbMQnuYoSY8Fn/NBuwRCbZ6+DJyBNM+Xsd jb9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=GSWSYQBX; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e25846271si3760851f8f.80.2026.10.21.01.46.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2026 01:46:17 -0700 (PDT) Received-SPF: pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=GSWSYQBX; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=br/wNqVEh6RQIP/KxRI0TE12SELnWw3wvFVu0jSwynE=; b=GSWSYQBXbD2K ohxaSBgk9bWI95Vy2hz1sY8LIGo5PaZ/WOT7D8tIFa51e0vFGqpOGpSq4+STzmQpAvVgqyQMBThWg RhVdYi32oBdop7rGW4yMerf7T5ReyOjdyY+Bkkutrzuj1PybT/m/+IFCt0ILLt/hgB9EBuXQWmXFH i43craGEygCLJ9wGb3gTemfqO/wQE6x49rNjINwtzpGyOhwUpAelykObgw/ZGNKFF3rdor0K/Z7nD ZOf9+g3KCIuvOQ7Q8Rr9V2cKb7p2coFdQfAa4UmOFgrYoFT1PFi2YFdB/SDZlaicJ/cklBf/t7vbk gl8VOMn8n8iXAN1L0Hq1SA==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=sky) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xJRu6-00HAlf-0X; Wed, 21 Oct 2026 10:46:17 +0200 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Wed, 21 Oct 2026 10:46:07 +0200 Message-ID: <20261021084610.1476738-1-alexander.ivanov@virtuozzo.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 0/3] drivers/vhost/blk: fix virtio-blk request header and payload parsing X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org vhost-blk parsed guest requests from the whole descriptor chain without telling the device-readable part from the device-writable one, and used the header fields without byte order conversion. Patch 1 converts hdr->type and hdr->sector to CPU byte order. Patch 2 takes the request header only from the readable part and drops requests whose readable part is shorter than the header. Patch 3 takes the write payload from the readable part and the payload of other requests from the writable part, reads the status byte from the end of the writable part, and fails reads and writes with an empty, oversized or misaligned payload with VIRTIO_BLK_S_IOERR instead of leaving them hanging. https://virtuozzo.atlassian.net/browse/VSTOR-142755 Alexander Ivanov (3): drivers/vhost/blk: convert virtio_blk_outhdr fields to CPU byte order drivers/vhost/blk: take virtio_blk_outhdr only from the readable part drivers/vhost/blk: take req->len from one side of the descriptor chain drivers/vhost/blk.c | 56 ++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 16 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel