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
| ||
|
Message-Id: <d583ed9f2d2d9c5399b92c8c3c48eaefb8a1e8c0.1513035461.git.luto@kernel.org> Date: Tue, 12 Dec 2017 07:56:41 -0800 From: Andy Lutomirski <luto@...nel.org> To: x86@...nel.org Cc: linux-kernel@...r.kernel.org, Borislav Petkov <bp@...en8.de>, Brian Gerst <brgerst@...il.com>, David Laight <David.Laight@...lab.com>, Kees Cook <keescook@...omium.org>, Peter Zijlstra <peterz@...radead.org>, Andy Lutomirski <luto@...nel.org> Subject: [PATCH PTI v3 06/10] x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode If something goes wrong with pagetable setup, vsyscall=native will accidentally fall back to emulation. Make it warn and fail so that we notice. Signed-off-by: Andy Lutomirski <luto@...nel.org> --- arch/x86/entry/vsyscall/vsyscall_64.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index bc88a0540347..a06f2ae09ad6 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -138,6 +138,10 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) WARN_ON_ONCE(address != regs->ip); + /* This should be unreachable in NATIVE mode. */ + if (WARN_ON(vsyscall_mode == NATIVE)) + return false; + if (vsyscall_mode == NONE) { warn_bad_vsyscall(KERN_INFO, regs, "vsyscall attempted with vsyscall=none"); -- 2.13.6
Powered by blists - more mailing lists