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: <tip-262b6b30087246abf09d6275eb0c0dc421bcbe38@git.kernel.org>
Date:   Mon, 8 Jan 2018 12:42:41 -0800
From:   tip-bot for Dave Hansen <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     hpa@...or.com, law@...hat.com, jcm@...hat.com,
        tim.c.chen@...ux.intel.com, aarcange@...hat.com, dwmw@...zon.co.uk,
        gnomes@...rguk.ukuu.org.uk, pbonzini@...hat.com,
        dave.hansen@...ux.intel.com, torvalds@...ux-foundation.org,
        nickc@...hat.com, andi@...stfloor.org, tglx@...utronix.de,
        dave.hansen@...el.com, gregkh@...ux-foundation.org,
        mingo@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip:x86/pti] x86/tboot: Unbreak tboot with PTI enabled

Commit-ID:  262b6b30087246abf09d6275eb0c0dc421bcbe38
Gitweb:     https://git.kernel.org/tip/262b6b30087246abf09d6275eb0c0dc421bcbe38
Author:     Dave Hansen <dave.hansen@...ux.intel.com>
AuthorDate: Sat, 6 Jan 2018 18:41:14 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 8 Jan 2018 17:29:18 +0100

x86/tboot: Unbreak tboot with PTI enabled

This is another case similar to what EFI does: create a new set of
page tables, map some code at a low address, and jump to it.  PTI
mistakes this low address for userspace and mistakenly marks it
non-executable in an effort to make it unusable for userspace.

Undo the poison to allow execution.

Fixes: 385ce0ea4c07 ("x86/mm/pti: Add Kconfig")
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Signed-off-by: Andrea Arcangeli <aarcange@...hat.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Alan Cox <gnomes@...rguk.ukuu.org.uk>
Cc: Tim Chen <tim.c.chen@...ux.intel.com>
Cc: Jon Masters <jcm@...hat.com>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: Jeff Law <law@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@...ux-foundation.org>
Cc: David" <dwmw@...zon.co.uk>
Cc: Nick Clifton <nickc@...hat.com>
Cc: stable@...r.kernel.org
Link: https://lkml.kernel.org/r/20180108102805.GK25546@redhat.com
---
 arch/x86/kernel/tboot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
index a4eb279..75869a4 100644
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -127,6 +127,7 @@ static int map_tboot_page(unsigned long vaddr, unsigned long pfn,
 	p4d = p4d_alloc(&tboot_mm, pgd, vaddr);
 	if (!p4d)
 		return -1;
+	pgd->pgd &= ~_PAGE_NX;
 	pud = pud_alloc(&tboot_mm, p4d, vaddr);
 	if (!pud)
 		return -1;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ