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] [day] [month] [year] [list]
Message-ID: <6735d24c-b031-499d-b298-ef8861b4daba@zytor.com>
Date: Mon, 11 Nov 2024 18:53:09 -0800
From: Xin Li <xin@...or.com>
To: Andrew Cooper <andrew.cooper3@...rix.com>, linux-kernel@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
        peterz@...radead.org
Subject: Re: [PATCH v2 1/1] x86/fred: Clear WFE in missing-ENDBRANCH #CPs

On 11/8/2024 12:53 PM, Andrew Cooper wrote:
>> Andrew,
>>
>> can you please take another look?
> After discussing with Dave on IRC, the ibt_clear_fred_wfe(regs); really
> needs to be inside the ibt_selftest_noendbr path.
> 

Sigh, I missed the discussion.

> It's a selftest where we're deliberately trying to trigger #CP, and in
> the one case where we're happy should we say "yeah, safe to clobber WFE
> in the interrupted context" to let execution continue.
> 
> Clobbering WFE in any other circumstance is a security-relevant bug.

I think we also need to clear WFE when !ibt_fatal.  No?

diff --git a/arch/x86/kernel/cet.c b/arch/x86/kernel/cet.c
index fb8f4238969e..69a34636811f 100644
--- a/arch/x86/kernel/cet.c
+++ b/arch/x86/kernel/cet.c
@@ -128,6 +128,7 @@ static void do_kernel_cp_fault(struct pt_regs *regs, 
unsigned long error_code)
	if (!ibt_fatal) {
		printk(KERN_DEFAULT CUT_HERE);
		__warn(__FILE__, __LINE__, (void *)regs->ip, TAINT_WARN, regs, NULL);
+		ibt_clear_fred_wfe(regs);
		return;
	}
	BUG();


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ