[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 09/11] tools/python: modify libxc.py to verify v4 stream
- To: Paul Durrant <paul@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 25 Jan 2021 19:45:07 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZCTjIaxacfx/6JCWgPUdYkhz664yYipVmAr6IPsjJNk=; b=BglcwVk5aUamA+oV6jWKctiCwDBGKmcVz69NTaXLTnb+TWs7x34kOiWpc93mBEVyxkq5I2ei1TFsPY+kDI7tj4zdRjNOSmJtMtz6g9FR35HP5wEfi00MEgz0eY7MpA9CWYGSeOr7nPX2eclq7RBp0+m4vVJofX2ZkY3lsH/N7hJbFygOoEYOPzZTezOWnqQup6PScgqfpYwd877AW2W1WWk9JZ36rZSnuxn62ugWAnPczGJugA+LC+99ZXM9cw09mDvbRYk1gWjBNndlSuwwY2qxAqsTwQfyGF5DtZjMpfePbzq6MkwJosdcuEg1EANXY7pMP7JBob+0qc0mL4WV7Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OuV+b5qC95t/t90fNWq2yeChJZgDg7KljZQ1WI5wboF57/5x7xbbSD5L4aW+Us6SRilLMU1vm8b7IfrgI+M7m23v+Rk4j3HowbN6PIIlwLSSrzNnMwK+bjjI3YDo37eDMNyBlUh7fB5SAaRTUz7RBgVEFgi/wofM9Hz/KRB2q65I256KrMbCEdSdirxAAWaj75s2Fz+xFQ9xhDNqifz/aBC7/ZBYX/ZLPgMBQWL16TTWDCspBUhyzAPRYe9Ut3jDJHO0ZwbNoHy5394gE/53PYtImJDQtfjPRHgRhrcs1DTk/6jsz/nFDICI6gp2inp2N2lQMlJ8WXu9BITYLzkhrg==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Paul Durrant <pdurrant@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Mon, 25 Jan 2021 19:45:19 +0000
- Ironport-sdr: L6FL25oAcSFZdEjpxCK/7smyapBIGeZZPHb08uU+QG2xKt9Zk2sdS637xs19YPfC3tWLB9kmOs amdjb0tKF9PAMHf3M83MKjQkmxsbxl9e3oToaKACkkRxQut3FJHrcXoWd2QrSAlFnwjA3HG7on aLyhuOSengsvpw+CpStMUiAJ554ahsAoawoyxhPag2Fxzq07coAsr9vHWncCkAfXCVH3VOlcQn mNa3PQ2JOoqjXS/VQezauSjQE8plXXLMnZVwojafVfLYoxSuUZt8/CnBt7AhaciNnsuPFNYcuW di0=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 08/10/2020 19:57, Paul Durrant wrote:
> @@ -476,6 +484,14 @@ class VerifyLibxc(VerifyBase):
> raise RecordError("Record length %u, expected multiple of %u" %
> (contentsz, sz))
>
> + def verify_record_domain_context(self, content):
> + """ domain context record """
> +
> + if self.version < 4:
> + raise RecordError("Domain context record found in v3 stream")
> +
> + if len(content) == 0:
> + raise RecordError("Zero length domain context")
This needs a recursive dissector to validate the domain context format,
as it is not a private ABI within Xen.
~Andrew
|