lkml.org 
[lkml]   [2007]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RESEND] PIE randomization
On Thu, 5 Jul 2007, Rik van Riel wrote:

> So the original patch has:
> #define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
> For some reason(?) it got changed to the clearly buggy:
> #define BAD_ADDR(x) ((unsigned long)(x) >= PAGE_MASK)
> Jiri's patch undoes that second buggy define, which is very
> different from the original that was sent in by you and Ernie.

This is a part of execshield patch, fthe pie-compiled binary executable
memory layout randomization was extracted from - see
http://people.redhat.com/~mingo/exec-shield/exec-shield-nx-2.6.19.patch

Note that load_elf_interp() in vanilla kernel differs from the
execshield's (and pie-randomization.patch) version.

The fix makes the BAD_ADDR check whether the address belongs to the
ERR_PTR range, which seems valid for all uses of BAD_ADDR in the patched
binfmt_elf.c (do_brk(), elf_map(), do_mmap() etc return valid address or
err ptr) ... am I missing something obvious here?

--
Jiri Kosina
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-07 02:11    [W:0.087 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site