-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
caprevoke: Avoid crashing if the revoker encounters a kernel capability
Kernel bugs, especially in ioctl handlers, can lead to a kernel capability being leaked to userspace. When the revoker encounters such a capability it ends up accessing memory beyond the end of the bitmap, which may trigger a panic, e.g., if the vm_cheri_revoke_tlb_fault() fault handler is invoked in FAST_COPYIN mode. Such bugs ought to be fixed, of course, but panicking the system is not really desireable, especially since the resulting crash dump doesn't help much in determining how the capability was leaked in the first place. Explicitly check for out-of-bounds capabilities before accessing the shadow bitmap and print a warning to the console instead.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters