lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8eYfALmwN68F39V@kernel.org>
Date: Wed, 5 Mar 2025 02:19:08 +0200
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Dave Hansen <dave.hansen@...el.com>
Cc: linux-integrity@...r.kernel.org,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
	Dan Carpenter <dan.carpenter@...aro.org>, linux-sgx@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] arch/x86: Fix size overflows in sgx_encl_create()

On Tue, Mar 04, 2025 at 04:18:03PM -0800, Dave Hansen wrote:
> On 3/4/25 16:06, Jarkko Sakkinen wrote:
> > +	/*
> > +	 * This is a micro-architectural requirement. ECREATE would detect this
> > +	 * too without mentionable overhead but this check guarantees also that
> > +	 * the space calculations for EPC and shmem allocations never overflow.
> > +	 */
> > +	if (!is_power_of_2(secs->size))
> > +		return -EINVAL;
> 
> Isn't it a plain old documented architectural requirement?

Yes, but it requires some explanation why it exists here instead of
counting on ECREATE.

What do you suggest?

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ