Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 304135 Details for
Bug 444611
kernel doesn't honor ADDR_NO_RANDOMIZE for stack
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Disable stack alignment randomization for ADDR_NO_RANDOMIZE processes
no-stack-randomize.el5.patch (text/plain), 1.84 KB, created by
Bryn M. Reeves
on 2008-04-29 16:00:04 UTC
(
hide
)
Description:
Disable stack alignment randomization for ADDR_NO_RANDOMIZE processes
Filename:
MIME Type:
Creator:
Bryn M. Reeves
Created:
2008-04-29 16:00:04 UTC
Size:
1.84 KB
patch
obsolete
>diff -up linux-2.6.18/arch/i386/kernel/process.c.no-stack-randomize linux-2.6.18/arch/i386/kernel/process.c >--- linux-2.6.18/arch/i386/kernel/process.c.no-stack-randomize 2008-04-29 16:57:27.000000000 +0100 >+++ linux-2.6.18/arch/i386/kernel/process.c 2008-04-29 16:57:52.000000000 +0100 >@@ -37,6 +37,7 @@ > #include <linux/kallsyms.h> > #include <linux/ptrace.h> > #include <linux/random.h> >+#include <linux/personality.h> > > #include <asm/uaccess.h> > #include <asm/pgtable.h> >@@ -899,7 +900,7 @@ asmlinkage int sys_get_thread_area(struc > > unsigned long arch_align_stack(unsigned long sp) > { >- if (randomize_va_space) >+ if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) > sp -= get_random_int() % 8192; > return sp & ~0xf; > } >diff -up linux-2.6.18/arch/x86_64/kernel/process.c.no-stack-randomize linux-2.6.18/arch/x86_64/kernel/process.c >--- linux-2.6.18/arch/x86_64/kernel/process.c.no-stack-randomize 2008-04-29 16:57:38.000000000 +0100 >+++ linux-2.6.18/arch/x86_64/kernel/process.c 2008-04-29 16:57:52.000000000 +0100 >@@ -825,7 +825,7 @@ int dump_task_regs(struct task_struct *t > > unsigned long arch_align_stack(unsigned long sp) > { >- if (randomize_va_space) >+ if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) > sp -= get_random_int() % 8192; > return sp & ~0xf; > } >diff -up linux-2.6.18/fs/binfmt_elf.c.no-stack-randomize linux-2.6.18/fs/binfmt_elf.c >--- linux-2.6.18/fs/binfmt_elf.c.no-stack-randomize 2008-04-29 16:57:49.000000000 +0100 >+++ linux-2.6.18/fs/binfmt_elf.c 2008-04-29 16:57:52.000000000 +0100 >@@ -563,7 +563,8 @@ static unsigned long randomize_stack_top > { > unsigned int random_variable = 0; > >- if (current->flags & PF_RANDOMIZE) { >+ if ((current->flags & PF_RANDOMIZE) && >+ !(current->personality & ADDR_NO_RANDOMIZE)) { > random_variable = get_random_int() & STACK_RND_MASK; > random_variable <<= PAGE_SHIFT; > }
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 444611
:
304126
| 304135