lunatic-solutions / lunatic

Lunatic is an Erlang-inspired runtime for WebAssembly
https://lunatic.solutions
Apache License 2.0
4.61k stars 138 forks source link

Hardened wasi clock_time_get and clock_time_res #28

Closed akegalj closed 1 year ago

akegalj commented 3 years ago

This is a stub issue regarding Spectre and timing attacks raised here https://github.com/lunatic-solutions/lunatic/pull/26#issuecomment-789801540

@jtenner rised an issue that clock_time_get and clock_time_res might be succeptible to https://en.wikipedia.org/wiki/Spectre_(security_vulnerability)

@jocaml advised that we might add a parameter to specify max resolution

Some points from Spectre wiki:

teymour-aldridge commented 3 years ago

(I'm probably misunderstanding) but aren't Spectre/Meltdown timing attacks more an issue for in-browser (untrusted) code than on servers?

jtenner commented 3 years ago

@teymour-aldridge we may be running untrusted code depending on the use case (I have a few ideas.)