Wrappers for SharedArrayBuffer.
More...
Wrappers for SharedArrayBuffer.
- Author
- Copyright (C) 2020 Peter Hornak
- License:
- SPDX-License-Identifier: GPL-3.0-or-later
This wrapper aims on prevention of misusing SharedArrayBuffer
to create perfect timers and to perfrom microarchitectural attacks. This code was originally a part of ChromeZero.
- See also
- https://www.fit.vut.cz/study/thesis/22374/?year=0&sup=Pol%C4%8D%C3%A1k, especially Sect. 5.1
-
Schwarz M., Maurice C., Gruss D., Mangard S. (2017) Fantastic Timers and Where to Find Them: High-Resolution Microarchitectural Attacks in JavaScript. In: Kiayias A. (eds) Financial Cryptography and Data Security. FC 2017. Lecture Notes in Computer Science, vol 10322. Springer, Cham. https://doi.org/10.1007/978-3-319-70972-7_13
◆ _data
function let _data = new originalF(target) |
◆ proxy
◆ proxyHandler
Initial value:= `{
get(target,
key, receiver) {
let slow = Math.floor(Math.random() * 10000)
for (let i = 0; i < slow;) {
}
},
let slow = Math.floor(Math.random() * 10000);
for (let i = 0; i < slow;) {
}
return Reflect.set(...arguments);
}
}`
domainEl value
Definition options_domains.js:214
let j
Definition wrappingS-ECMA-ARRAY.js:578
◆ wrappers
Initial value:= [
{
parent_object: "window",
parent_object_property: "SharedArrayBuffer",
original_function: "window.SharedArrayBuffer",
wrapped_objects: [],
if (window.SharedArrayBuffer === undefined) {
return;
}
let forbid = args[0];
`,
wrapping_function_args: `target`,
wrapping_function_body: wrappingFunctionBody,
post_replacement_code: `
if (forbid) {
delete(window.SharedArrayBuffer);
}
`,
}
]
var helping_code
Definition wrappingS-H-C.js:86