Re: [PATCH] x86: Don't randomize stack unless current->personality permits it

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

 



Frank van Maarseveen wrote:
>
> Do not randomize stack location unless current->personality permits it.
>
> Signed-off-by: Frank van Maarseveen <[email protected]>
> ---
>
> The problem seems also present in
>
>         arch/um/kernel/process_kern.c
>         arch/x86_64/kernel/process.c
>
>  arch/i386/kernel/process.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletion(-)
>
> diff -rup a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
> --- a/arch/i386/kernel/process.c        2006-06-23 16:08:13.000000000
> +0200 +++ b/arch/i386/kernel/process.c        2006-07-11
> 14:39:20.000000000 +0200 @@ -38,6 +38,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>
> @@ -898,7 +899,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;
>  }

It still blips on my system.

echo 0 > /proc/sys/kernel/randomize_va_space makes the blips go away.

???

Thanks!

--
Al

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux