+ pie-randomization-fix-bad_addr-macro.patch added to -mm tree

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

 



The patch titled
     pie randomization: fix BAD_ADDR macro
has been added to the -mm tree.  Its filename is
     pie-randomization-fix-bad_addr-macro.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

------------------------------------------------------
Subject: pie randomization: fix BAD_ADDR macro
From: Jiri Kosina <jkosina@xxxxxxx>

pie-randomization.patch makes the load_addr in load_elf_interp() the load
bias of ld.so (difference between the actual load base address and first
PT_LOAD segment's p_vaddr).  If the difference equals (on x86) to
0xfffff000 (which is valid [1]), SIGSEGV is incorrectly sent.

This patch changes the BAD_ADDR so that it catches the mappings to the
error-area properly.

[1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=246623

Reported-by: Jakub Jelinek <jakub@xxxxxxxxxx>
Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
Cc: Chuck Ebbert <cebbert@xxxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/binfmt_elf.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/binfmt_elf.c~pie-randomization-fix-bad_addr-macro fs/binfmt_elf.c
--- a/fs/binfmt_elf.c~pie-randomization-fix-bad_addr-macro
+++ a/fs/binfmt_elf.c
@@ -80,7 +80,7 @@ static struct linux_binfmt elf_format = 
 		.hasvdso	= 1
 };
 
-#define BAD_ADDR(x) ((unsigned long)(x) >= PAGE_MASK)
+#define BAD_ADDR(x) IS_ERR_VALUE(x)
 
 static int set_brk(unsigned long start, unsigned long end)
 {
_

Patches currently in -mm which might be from jkosina@xxxxxxx are

git-hid.patch
irtouchsystems-support-for-usbtouchscreen.patch
git-ipwireless_cs.patch
x86_64-fix-wrong-comment-regarding-set_fixmap.patch
pie-randomization.patch
pie-randomization-fix-bad_addr-macro.patch
kernel-printkc-document-possible-deadlock-against-scheduler.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