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

risc-v/mpfs: ddr: lock segmentation registers #198

Merged
merged 1 commit into from
Dec 19, 2023
Merged

risc-v/mpfs: ddr: lock segmentation registers #198

merged 1 commit into from
Dec 19, 2023

Conversation

eenurkka
Copy link

Set the LOCKED bit when the final ddr segmentatition is in place. Otherwise the system is prone to potential security issues if the config is altered later. Once the LOCKED bit is set, the register may no longer be changed.

Summary

As identified in DP-7916 @gpoulios , Is it possible to add Theodore Karatapanis (the reporter), I couldn't find him.

Impact

DDR config

Testing

Saluki-v2

Set the LOCKED bit when the final ddr segmentatition is
in place. Otherwise the system is prone to potential
security issues if the config is altered later. Once the
LOCKED bit is set, the register may no longer be changed.

Signed-off-by: Eero Nurkkala <[email protected]>
@tkaratapanis
Copy link
Collaborator

tkaratapanis commented Dec 18, 2023

I cherry-picked your commit in this PR and tried my Proof Of Concept exploit, and now it doesn't work because the segments are locked. I also printed the contents and the lock bit is correctly set ( I only checked SEG0_REG0 and SEG0_REG1) but it should be the same for the others.

So the fix works as intended :)

Copy link

@gpoulios gpoulios left a comment

Choose a reason for hiding this comment

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

Approved by proxy (tkaratapanis).

@eenurkka eenurkka merged commit 0c5fb78 into master Dec 19, 2023
6 of 8 checks passed
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.

4 participants