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

[Bug Report] RSD is excuting illegal instruction #97

Open
chenhychen opened this issue Nov 1, 2024 · 1 comment
Open

[Bug Report] RSD is excuting illegal instruction #97

chenhychen opened this issue Nov 1, 2024 · 1 comment

Comments

@chenhychen
Copy link

Hi,

I have found that RSD can execute illegal instruction in the commit 7b65f6b.
According to RISC-V Instruction Set Privileged Architecture, the funct3 of the load/store instruction should be from 000 to 110.
However, if the funct3 is set to 111, the RSD can still execute the instruction but Spike throws the illegal instruction exception.

For example, executing the instruction hex code 0x00817703 will cause Spike to throw the illegal instruction exception, but RSD executes it. Attach a hex file that can trigger this vulnerability.

illegal_load.zip

@reo-pon
Copy link
Contributor

reo-pon commented Jan 27, 2025

Hi. I apologize for my late reply.
Thank you for reporting the bug.

As you pointed out, the instruction 7b65f6b should cause an invalid instruction exception, but RSD processes it as a valid instruction.
I will fix this bug soon.

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

No branches or pull requests

2 participants