πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10054

Re: [PATCH] vhost/vringh: reject zero-length indirect descriptor tables

#10054
From: Fang Xieyan
Date: Tue, 03 Nov 2026 03:29
26 lines
9291 bytes
Hi Michael,

Yes, same fix - sorry. The October 21 posting is a duplicate
of the v2 I posted on September 26:

https://lore.kernel.org/virtualization/20260926160755.21485-1-fangxy@xiaopeng.com/

I resent it as a new patch instead of a v3.

The !len form is equivalent to v2's len < sizeof(struct
vring_desc) check when combined with the modulo check -
zero is the only length below one descriptor that is also
a multiple of the descriptor size.

The diagnostic change is to pass the byte-order converted
len instead of the raw desc->len, so the reported length is
correct when the vring byte order differs from the CPU byte
order.

Would you prefer that I send a v3 on the original v2 thread
with this diagnostic correction, or should I drop the
October 21 posting and leave v2 as is?

Thanks,
Fang
Technical Details
Message-ID: <20261103032935.58823-1-fangxy@xiaopeng.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355199-linux-kernel-netdev=dewy.ru
References: <20261102122942-mutt-send-email-mst@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355199-linux-kernel-netdev=dewy.ru
From: fangxy@xiaopeng.com (Fang Xieyan)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] vhost/vringh: reject zero-length indirect descriptor tables
Date: Tue,  3 Nov 2026 11:29:35 +0800
Organization: Usenet Network
Message-ID: <20261103032935.58823-1-fangxy@xiaopeng.com>
References: <20261102122942-mutt-send-email-mst@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3089651"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:RVbjwXwmx1cr5x6vHpjnFEG47UY= sha256:oSHKD2LVyorIJzc4uID0f1sewT3iERayEP1ZV1cIdnA=
	sha1:P4K2b+7t+fArBetHPpnvIHH6lhg= sha256:oh3ohBdMKdOXKYsZBI8TKcZAMDhW7kN+h4mQZ/V0FzM=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 8ED30112728; Tue,  3 Nov 2026 06:30:35 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=xiaopeng.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id q4vTIUrqBC25;
	Tue,  3 Nov 2026 06:30:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-355199-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=xiaopeng.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 50803112036; Tue,  3 Nov 2026 06:30:23 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 847F92A257; Tue,  3 Nov 2026 03:29:49 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793676589;
	b=V5+qIdWfNjozCBicaMN86q2IaE0bm9Mjyj5/1j12hUMlmqQRQ9ZhANF4CIxLnrBZavhz
	 1aRAhwbj1QBgZuqzvhvDOE6lozsMBa7pmq/Ww94piFprLuHKOi5aiMrCLxaKIKQ9MPuWS
	 W6xFmiO+35PAVaaRQLJE/xzm56TFbKqolktsP6Wv2rNXyQiz1259FSXFtZmiXYc7rwlnV
	 FRdrf3bugf1CqfP5Zu53OMuwPaYufI4InRNw0XqaApUp/k+OaUrLbJQV10aNz+RrPdoh4
	 dnPnmaxXntmohge4NQIPFbhiwlVm/kJJ2R3u0o0noYJLMSZZB6L+FDQAnoKM2c4JBDQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793676589;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-Alimail-AntiSpam:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding;
	bh=Ss1QRBiOdnr9UcY/nCSTQQvqTaweAfZZQDUzoYpDMUU=;
	b=AZKoU1Hd+Wf75M8LkDz7qKW7lnFPk1P4lS35eMK+LB1dDL2fRKW/SQr8QQFGqQJ+UjwI
	 iyjFFpaU6dxd6CyaJUJZECyMa8yfe5oIQMxW6CIuWnSNsPi7WD/euR1iouccq9fgv0jXt
	 lEM+ZymOFYZAr4lxW3rQgs1w1L2hp/lYHEK4TzypI4hYi/Z8jqOxtTnDwNRC0HZCIYRzl
	 1I+WHMz6o/3dDURbmdNQ6dUGCP7MB1MJ3/YIa66s2wYAoasRc9yd9w6Alyqe5e/Oktt/h
	 gC/qN+j17SWicW602NUTqNzI3Jf24BLAb0T4CleUJcrH0R2KLCk9YDsPHeLVRkFjJyg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=oeYbuWA3;
	dmarc=none header.from=xiaopeng.com;
	spf=pass smtp.mailfrom=xiaopeng.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 594F7606A335;
	Tue,  3 Nov 2026 03:29:49 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=oeYbuWA3
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.171
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793676583;
	b=J288rwbbAWkVv7fKkvANCm3iUIubVzatvxa1TG7Uzwtji/KoJz3RQdsP1155P3rBCrc0
	 n5p3/3EMIpcHgIN5sTUl4M5K+HaTlrdnsK7jMzDpQHGMu3zkHW6vT7pqiYFiMJEjDiC/V
	 KJDGIP9QJpjXlznkIq/FtOLiOoOnRyjVDc5A0uLIlGik6Rd7UEkjBoMenuINXT7gb8Gjm
	 GDVM0VZVQXz1C3rC1JnkfRAU56HvruAFvOAwJWoYFdsrxxYa/yba3CuhfsN7AdJXXf6qj
	 whpxgQx4QXsV1y7g0pB4eQ1GSNKOWXuL7UtUZNyaMbbtLqE8C+7zFs1MuaDWKj2rRJw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793676583;
	h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=Ss1QRBiOdnr9UcY/nCSTQQvqTaweAfZZQDUzoYpDMUU=;
	b=n/KEshzwmOYJd0UM+VE7DTxOsf8LVRWmJ06SUhxC2xb+EDtNPsk7yqgUF/nPYOJmQ8J+
	 VPqIvC0wOamQW4Ez6Vd/LalqARvo+flLAYK7Muz27ywWgnsTAoeadDHao1EVyJR40kC+f
	 j7u4krxq8KLavKjYPbn0T7QCiEnFnZ2ONZ5BC+XC6JMBuxh6CUO5kp802ygWtM2vkAoUG
	 AA/UEKJRMvrKwpQYCTh3DBRz5rG/iSX6BScmtiifXH6KnOX/Xcvk5D6AG7HQnwNdPJxq3
	 Y0KCvhdXqxGVMcl54+baClA9xTwLLxX0v4H+seZe4IN47EAVqdvpxeU9RSq4YnOntoA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=xiaopeng.com;
	spf=pass smtp.mailfrom=xiaopeng.com;
	dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=oeYbuWA3;
	arc=none smtp.remote-ip=115.124.28.171
X-Received: from out28-171.mail.aliyun.com (out28-171.mail.aliyun.com [115.124.28.171])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72814606A326;
	Tue,  3 Nov 2026 03:29:40 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 72814606A326
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xiaopeng.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xiaopeng.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=xiaopeng.com; s=default;
	t=1793676578; h=From:To:Subject:Date:Message-ID:MIME-Version;
	bh=Ss1QRBiOdnr9UcY/nCSTQQvqTaweAfZZQDUzoYpDMUU=;
	b=oeYbuWA30U41w3rtaAKRcPt5wdabjBxKNMyJEZNG4DvlLOP/nh/QYDGTdtYnmOm02knA6r1/4z7fCPz3nWBwzj0e9yTJiAotNiXesEGAtBaPelpWT3sl2zrRVIUvhoAV3sX8lDg4LzqtIzjZdoayJstQXr8JoxiftOqNhJU5ZCs=
X-Alimail-AntiSpam: AC=CONTINUE;BC=0.06301045|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.0205256-0.000483592-0.978991;FP=18268939574164468826|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam033037028158;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=10;RT=10;SR=0;TI=SMTPD_---.jvDbLeN_1793676576;
X-Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.jvDbLeN_1793676576 cluster:ay29)
          by smtp.aliyun-inc.com;
          Tue, 03 Nov 2026 11:29:37 +0800
X-Cc: Jason Wang <jasowang@redhat.com>,
	Eugenio PΓ©rez <eperezma@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	virtualization@lists.linux.dev,
	kvm@vger.kernel.org,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	stable@vger.kernel.org,
	Guanglei Zhu <zhugl3@xiaopeng.com>
X-Mailer: git-send-email 2.50.1
X-In-Reply-To: <20261102122942-mutt-send-email-mst@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list