maestro-os / maestro

Unix-like kernel written in Rust
https://blog.lenot.re
GNU Affero General Public License v3.0
2.94k stars 94 forks source link

MemSpace::map can overwrite kernel pages #25

Closed Myldero closed 2 weeks ago

Myldero commented 7 months ago

When run with MAP_FIXED, MemSpace::map has no limits to where a page is requested. Furthermore, it will always unmap any pre-existing page. This means that a user can hijack kernel pages (and thus execution) with mmap or the ELF parser.

llenotre commented 3 months ago

I seem to have fixed it in the past on the cleanup branch. Thus this issue will be closed when the PR is merged