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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56CB68C2.6010003@linux.intel.com>
Date:	Mon, 22 Feb 2016 12:00:02 -0800
From:	Dave Hansen <dave.hansen@...ux.intel.com>
To:	Yu-cheng Yu <yu-cheng.yu@...el.com>, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Cc:	Andy Lutomirski <luto@...nel.org>, Borislav Petkov <bp@...e.de>,
	Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
	"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
	Fenghua Yu <fenghua.yu@...el.com>
Subject: Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES

On 02/22/2016 11:00 AM, Yu-cheng Yu wrote:
> +	if (xsave->header.xfeatures & XFEATURE_MASK_SUPERVISOR)
> +		xsave->header.xfeatures = xfeatures | XFEATURE_MASK_SUPERVISOR;
> +	else
> +		xsave->header.xfeatures = xfeatures;

This is dangerous.  It says, "if any supervisor feature bit is set, then
set *ALL* of the known bits".  There's no way that can work.

Don't you just want to or in the new bits that were in the passed-in
'xfeatures':

	xsave->header.xfeatures |= xfeatures;

'xfeatures' is known not to contain any supervisor bits.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ