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] [day] [month] [year] [list]
Message-ID: <tip-8969691343354bdd80eff5405a0f879edbf013d6@git.kernel.org>
Date:	Sun, 23 Jan 2011 18:03:25 GMT
From:	tip-bot for matthieu castet <castet.matthieu@...e.fr>
To:	linux-tip-commits@...r.kernel.org
Cc:	sliakh.lkml@...il.com, mingo@...hat.com,
	torvalds@...ux-foundation.org, rusty@...tcorp.com.au,
	a.p.zijlstra@...llo.nl, jiang@...ncsu.edu, fweisbec@...il.com,
	akpm@...ux-foundation.org, rostedt@...dmis.org,
	kees.cook@...onical.com, tglx@...utronix.de, jbaron@...hat.com,
	xtfeng@...il.com, linux-kernel@...r.kernel.org, hpa@...or.com,
	jmorris@...ei.org, arjan@...ux.intel.com, davej@...hat.com,
	castet.matthieu@...e.fr, mingo@...e.hu
Subject: [tip:x86/urgent] x86: Fix jump label with RO/NX module protection crash

Commit-ID:  8969691343354bdd80eff5405a0f879edbf013d6
Gitweb:     http://git.kernel.org/tip/8969691343354bdd80eff5405a0f879edbf013d6
Author:     matthieu castet <castet.matthieu@...e.fr>
AuthorDate: Sun, 23 Jan 2011 15:45:52 +0100
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Sun, 23 Jan 2011 16:12:45 +0100

x86: Fix jump label with RO/NX module protection crash

If we use jump table in module init, there are marked
as removed in __jump_table section after init is done.

But we already applied ro permissions on the module, so
we can't modify a read only section (crash in
remove_jump_label_module_init).

Make the __jump_table section rw.

Signed-off-by: Matthieu CASTET <castet.matthieu@...e.fr>
Cc: Xiaotian Feng <xtfeng@...il.com>
Cc: Jason Baron <jbaron@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Arjan van de Ven <arjan@...ux.intel.com>
Cc: Siarhei Liakh <sliakh.lkml@...il.com>
Cc: Xuxian Jiang <jiang@...ncsu.edu>
Cc: James Morris <jmorris@...ei.org>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Dave Jones <davej@...hat.com>
Cc: Kees Cook <kees.cook@...onical.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
LKML-Reference: <4D3C3F20.7030203@...e.fr>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/include/asm/jump_label.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
index f52d42e..574dbc2 100644
--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -14,7 +14,7 @@
 	do {							\
 		asm goto("1:"					\
 			JUMP_LABEL_INITIAL_NOP			\
-			".pushsection __jump_table,  \"a\" \n\t"\
+			".pushsection __jump_table,  \"aw\" \n\t"\
 			_ASM_PTR "1b, %l[" #label "], %c0 \n\t" \
 			".popsection \n\t"			\
 			: :  "i" (key) :  : label);		\
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ