Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 308469 Details for
Bug 411439
[hardened] app-editors/emacs-23.4-r1 segfault in unexec with hardened-sources-3.3*
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Diff between 3.2.12 and 3.3.1
hardened-3.2-3.3.diff (text/plain), 1.49 KB, created by
Ulrich Müller
on 2012-04-11 01:52:24 UTC
(
hide
)
Description:
Diff between 3.2.12 and 3.3.1
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2012-04-11 01:52:24 UTC
Size:
1.49 KB
patch
obsolete
>--- linux-3.2.12-hardened/fs/binfmt_elf.c >+++ linux-3.3.1-hardened-r1/fs/binfmt_elf.c >@@ -1328,11 +1328,6 @@ static int load_elf_binary(struct linux_ > start_data += load_bias; > end_data += load_bias; > >-#ifdef CONFIG_PAX_RANDMMAP >- if (current->mm->pax_flags & MF_PAX_RANDMMAP) >- elf_brk += PAGE_SIZE + ((pax_get_random_long() & ((1UL << 22) - 1UL)) << 4); >-#endif >- > /* Calling set_brk effectively mmaps the pages that we need > * for the bss and break sections. We must do this before > * mapping in the interpreter, to make sure it doesn't wind >@@ -1351,6 +1346,30 @@ static int load_elf_binary(struct linux_ > */ > } > >+#ifdef CONFIG_PAX_RANDMMAP >+ if (current->mm->pax_flags & MF_PAX_RANDMMAP) { >+ unsigned long start, size; >+ >+ current->mm->end_data = end_data = elf_brk; >+ start = ELF_PAGEALIGN(elf_brk); >+ size = PAGE_SIZE + ((pax_get_random_long() & ((1UL << 22) - 1UL)) << 4); >+ current->mm->start_brk = start + size; >+ down_write(¤t->mm->mmap_sem); >+ retval = -ENOMEM; >+ if (!find_vma_intersection(current->mm, start, start + size + PAGE_SIZE)) { >+ start = do_mmap(NULL, start, size, PROT_NONE, MAP_ANONYMOUS | MAP_FIXED | MAP_PRIVATE, 0); >+ retval = IS_ERR_VALUE(start) ? start : 0; >+ } >+ up_write(¤t->mm->mmap_sem); >+ if (retval == 0) >+ retval = set_brk(start + size, start + size + PAGE_SIZE); >+ if (retval < 0) { >+ send_sig(SIGKILL, current, 0); >+ goto out_free_dentry; >+ } >+ } >+#endif >+ > if (elf_interpreter) { > unsigned long uninitialized_var(interp_map_addr); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 411439
:
308365
|
308367
|
308395
| 308469 |
312873
|
312875