ASLR with dynamic physical memory mapping causes panic

Open
#525 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start with the dynamic physical memory mapping path and its random address generator, using the “INFO: Map physical memory” log as the entry point. Reproduce an ASLR boot and inspect the x86_64 address validation reported at x86_64-0.15.2/src/addr.rs:75; done means mapping no longer produces a noncanonical address or panic.

Written by the indexing model from the issue text.

Description

When using ASLR with dynamic physical memory mapping, bootloader can randomly panic on INFO: Map physical memory. After this message bootloader panics with:

ERROR: panicked at /Users/splaled/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/x86_64-0.15.2/src/addr.rs:75:23:
virtual address must be sign extended in bits 48 to 64

I think an issue is in random address generator logic (it can produce noncanonical addresses)

Dominant language
Rust
Stars
1.7k
Forks
241
Avg merge
2d 19h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-osdev/bootloader

All issues in rust-osdev/bootloader

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.