-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
The task_stack_check
funciton uses a contant magic number STACK_CANARY
to detect the corruption of stack. However, attackers can forge the canary to bypass the detection, causing some buffer overflows (or underflows) become arbitrary write on the stack. Moreover, since user and kernel program share an address space, some vulnerabilities in user program will cause some problems in kernel.
Thus, I wonder if we need a random stack canary in this kernel, adding an element uint32_t canary
to tcb_t
and using random to generate a random canary during initialization. Although the random
in libc.c
is not quite secure (It is predictable), it can be improved in the future.
Metadata
Metadata
Assignees
Labels
No labels