History

stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms

The stack canary is an 'unsigned long' and should be fully initialized to random data rather than only 32 bits of random data.

Daniel Micay committed 9 years ago

Commit 5ea30e41 parent d3b5d351 file · +1 −1Browse files

Unified · Split

kernel/fork.c+1−1
@@ -536,7 +536,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node) · 535 unmodified lines
536536 set_task_stack_end_magic(tsk);
537537
538538 #ifdef CONFIG_CC_STACKPROTECTOR
539− tsk->stack_canary = get_random_int();
539+ tsk->stack_canary = get_random_long();
540540 #endif
541541
542542 /*