Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kernel: Fix TOCTOU in syscall entry region validation
We were doing stack and syscall-origin region validations before taking the big process lock. There was a window of time where those regions could then be unmapped/remapped by another thread before we proceed with our syscall. This patch closes that window, and makes sys$get_stack_bounds() rely on the fact that we now know the userspace stack pointer to be valid. Thanks to @BenWiederhake for spotting this! :^)
- Loading branch information