Line 445: |
Line 445: |
| | February 2019 | | | February 2019 |
| | [[User:TuxSH|TuxSH]] | | | [[User:TuxSH|TuxSH]] |
| + | |- |
| + | | Kernel RWX identity mapping never unmapped |
| + | | During init, the kernel binary is identity-mapped as RWX at 0x80060000; this is necessary to facilitate the transitionary period while the MMU is being enabled but mappings for e.g. KASLR are not yet determined, and also to enable smooth MMU enable transition during wake-from-sleep. |
| + | |
| + | However, the identity mapping was never unmapped, and thus the whole kernel code bin remained permanently mapped as RWX for all kernel threads (any thread which does not have an owner process and thus uses the KSupervisorPageTable TTBR0). |
| + | |
| + | Thus, any theoretical exploit which would give kernel memory corruption or ROP under a kernel thread would allow making use of this mapping to modify kernel text + bypass KASLR. |
| + | |
| + | This was fixed in [[16.0.0]] by unmapping the identity-mapping during init, and re identity-mapping only the very first page of kernel .text as R-X (for use by wake-from-sleep), which fixes the shellcode problem and mostly fixes the ROP problem, since this page mostly lacks interesting gadgets. |
| + | | In theory, with another exploitable kernel memory corruption (or ROP under kernel thread) bug: bypassing KASLR + modifying kernel .text. |
| + | |
| + | However, no such bugs are known. |
| + | | [[16.0.0]] |
| + | | [[16.0.0]] |
| + | | Summer 2018 |
| + | | January 2023 |
| + | | Everyone |
| |} | | |} |
| | | |