Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent accessing RAM outside of the physical memory #160

Merged
merged 5 commits into from
Mar 20, 2024

Conversation

secworks
Copy link
Contributor

@secworks secworks commented Mar 4, 2024

This PR adds an address filter to detect addresses to the RAM area that are lager than the current RAM memory (128 kByte). This makes the memory in a similar way to the RAM in QEMU.

Closes #158

@dehanj dehanj force-pushed the match_qemu_ram_mem branch 5 times, most recently from b974c8a to 890b307 Compare March 19, 2024 14:33
@dehanj dehanj changed the title Match qemu ram mem Prevent accessing RAM outside of the physical memory Mar 20, 2024
@dehanj
Copy link
Member

dehanj commented Mar 20, 2024

Verified the function, not possible to address memory > 0x1FFFF.

Copy link
Member

@mchack-work mchack-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed language nits in the docs for security_monitor. Looks good to me.

that the device must be reset to get out of trap. This
change also breaks a critical path.

Signed-off-by: Joachim Strömbergson <[email protected]>
Change name of cpu_monitor to security_monitor and increase its
functionality to include RAM access violations. If addresses in RAM
but outside of physical RAM is accessed in any way the
security_monitor traps the CPU in the same way as it already did for
execution violations.
Signed-off-by: Joachim Strömbergson <[email protected]>
@mchack-work mchack-work merged commit 29fd833 into main Mar 20, 2024
1 check passed
@mchack-work mchack-work deleted the match_qemu_ram_mem branch March 20, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent wraparound in SPRAM data access
3 participants