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

Implement clock_step() #6

Open
cyruscyliu opened this issue Dec 23, 2024 · 1 comment
Open

Implement clock_step() #6

cyruscyliu opened this issue Dec 23, 2024 · 1 comment

Comments

@cyruscyliu
Copy link
Collaborator

not having clock_step() stops hyperpill to trigger CVE-2021-3947
see a poc: https://github.com/HexHive/HyperPill/tree/test-cve-2021-3947

quote: Can be implemented by adding a breakpoint to a common function. E.g. address_space write and inserting a call to clock_step. Another option is to insert any call (e.g. pio write) which triggers qemu to run the main loop and then catch the timer check to return the corresponding clock.

@cyruscyliu
Copy link
Collaborator Author

A solution,

inject_a_valid_mmio_read_or_write() // don't use pio because arm devices don't have one
start_cpu()

// hook somewhere of the mmio r/w
// direct the control flow to clock_step()

we need to know where to hook and where to go (the address of clock_step())
this also requires the loading address of the qemu binary

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

1 participant