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

Information Leakage Vulnerability #15

Open
Mengyuan410 opened this issue Jul 31, 2024 · 1 comment
Open

Information Leakage Vulnerability #15

Mengyuan410 opened this issue Jul 31, 2024 · 1 comment

Comments

@Mengyuan410
Copy link

To exploit this vulnerability, the attacker consistently set the "data_ack_i" signal to 1. This behavior is permissible according to the Wishbone Interface Specification, which Kronos core is designed to follow.

If the "data_ack" signal is activated, the "lsu_rdy" signal inside the kronos_lsu.sv file will also be activated. However, because of the CPU bug, the activation of "lsu_rdy" signal without request for load or store will cause the CPU control signals to be in an erroneous state. Consequently, the "csr_wr_en" signal inside kronos_csr.sv will be wrongly activated when any arithmetic or logical instruction is executed, if there is a Zicsr instruction preceding it. This leads to the [31:20] field of this arithmetic or logical instruction being misinterpreted as the CSR write address, and the op1 field being misinterpreted as the CSR write data. As a result, a CSR is incorrectly written with the op1's data of this arithmetic or logical instruction. Subsequently, with another Zicsr instruction, the CSR value can be loaded into another GPR. This causes a functional error, as a GPR is unintentionally contaminated with the value of another GPR, leading to data leakage inside the CPU.

@KatCe
Copy link

KatCe commented Sep 30, 2024

data_ack being constantly high is only valid in the Wishbone classic mode, and Kronos supports pipelined mode. However, a CPU should not rely on valid external inputs. Connecting a memory operating in classic mode or fault injections could trigger the vulnerability.

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