rust-osdev / rust-osdev/bootloader

ASLR with dynamic physical memory mapping causes panic

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.7k
Forks
240
PR merge metrics
No merged PRs in 30d

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)

Contributor guide

No contributing guide indexed for this repository

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.