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 Vuneratbility - via Memory #16

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

Information Leakage Vuneratbility - via Memory #16

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. If the "lsu_rdy" signal is always activated despite there being no load/store request, the CPU control signals will be in an erroneous state. This condition causes a register data to be wrongly read as the op1 data from the register file, even when the instruction is invalid. The address of the register that is wrongly read as op1 corresponds to the invalid instruction's [19:15] bits.

Additionally, due to the CPU's erroneous state, the instruction cannot be decoded correctly. This might cause the CPU to wrongly recognize this invalid instruction as a load, resulting in an unexpected load. The wrongly read op1 data is treated as the load address. This unexpected load causes a value from memory to be inadvertently loaded into the GPR with an address equal to the invalid instruction's [11:7] bits.

This situation can be viewed in two ways:

  1. Data leakage from memory to GPRs due to the unexpected load.
  2. Data leakage between GPRs. Data from different memory locations will be loaded into the GPR with an address corresponding to the invalid instruction's [11:7] bits, based on the data of the GPR with an address corresponding to the invalid instruction's [19:15] bits.
@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