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]
Date:   Wed, 12 Apr 2017 00:32:00 -0700
From:   tip-bot for Masami Hiramatsu <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mhiramat@...nel.org, linux-kernel@...r.kernel.org,
        brgerst@...il.com, dvlasenk@...hat.com, davem@...emloft.net,
        bp@...en8.de, ananth@...ux.vnet.ibm.com,
        torvalds@...ux-foundation.org, hpa@...or.com, peterz@...radead.org,
        jpoimboe@...hat.com, mingo@...nel.org, tglx@...utronix.de,
        aryabinin@...tuozzo.com, xiaolong.ye@...el.com,
        anil.s.keshavamurthy@...el.com
Subject: [tip:perf/core] kprobes/x86: Fix kprobe-booster not to boost far
 call instructions

Commit-ID:  bd0b90676c30fe640e7ead919b3e38846ac88ab7
Gitweb:     http://git.kernel.org/tip/bd0b90676c30fe640e7ead919b3e38846ac88ab7
Author:     Masami Hiramatsu <mhiramat@...nel.org>
AuthorDate: Wed, 29 Mar 2017 13:56:56 +0900
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 12 Apr 2017 09:23:44 +0200

kprobes/x86: Fix kprobe-booster not to boost far call instructions

Fix the kprobe-booster not to boost far call instruction,
because a call may store the address in the single-step
execution buffer to the stack, which should be modified
after single stepping.

Currently, this instruction will be filtered as not
boostable in resume_execution(), so this is not a
critical issue.

Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: David S . Miller <davem@...emloft.net>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ye Xiaolong <xiaolong.ye@...el.com>
Link: http://lkml.kernel.org/r/149076340615.22469.14066273186134229909.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/kernel/kprobes/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 993fa4f..9eae5a6 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -200,6 +200,8 @@ retry:
 		return (opcode != 0x62 && opcode != 0x67);
 	case 0x70:
 		return 0; /* can't boost conditional jump */
+	case 0x90:
+		return opcode != 0x9a;	/* can't boost call far */
 	case 0xc0:
 		/* can't boost software-interruptions */
 		return (0xc1 < opcode && opcode < 0xcc) || opcode == 0xcf;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ