+ fstack-protector-feature-add-the-__stack_chk_fail.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     -fstack-protector feature: Add the __stack_chk_fail() 	function

has been added to the -mm tree.  Its filename is

     fstack-protector-feature-add-the-__stack_chk_fail.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: -fstack-protector feature: Add the __stack_chk_fail() 	function


GCC emits a call to a __stack_chk_fail() function when the stack canary is not
matching the expected value.

Since this is a bad security issue; lets panic the kernel rather than limping
along; the kernel really can't be trusted anymore when this happens.

Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/panic.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

diff -puN kernel/panic.c~fstack-protector-feature-add-the-__stack_chk_fail kernel/panic.c
--- a/kernel/panic.c~fstack-protector-feature-add-the-__stack_chk_fail
+++ a/kernel/panic.c
@@ -271,3 +271,15 @@ void oops_exit(void)
 {
 	do_oops_enter_exit();
 }
+
+#ifdef CONFIG_CC_STACKPROTECTOR
+/*
+ * Called when gcc's -fstack-protector feature is used, and
+ * gcc detects corruption of the on-stack canary value
+ */
+void __stack_chk_fail(void)
+{
+	panic("stack-protector: Kernel stack is corrupted");
+}
+EXPORT_SYMBOL(__stack_chk_fail);
+#endif
_

Patches currently in -mm which might be from arjan@xxxxxxxxxxxxxxx are

git-netdev-all.patch
lockdep-fix-sk_dst_check-deadlock.patch
fstack-protector-feature-annotate-the-pda-offsets.patch
fstack-protector-feature-add-the-kconfig-option.patch
fstack-protector-feature-add-the-canary-field-to-the.patch
fstack-protector-feature-add-the-__stack_chk_fail.patch
fstack-protector-feature-enable-the-compiler-flags.patch
slab-fix-lockdep-warnings.patch
slab-fix-lockdep-warnings-fix.patch
slab-fix-lockdep-warnings-fix-2.patch
sleazy-fpu-feature-i386-support.patch
make-prot_write-imply-prot_read.patch
lockdep-dont-pull-in-includes-when-lockdep-disabled.patch
lockdep-print-kernel-version.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux