Skip to content

Commit

Permalink
Add security consideration for computation control-flow attacks (webm…
Browse files Browse the repository at this point in the history
…achinelearning#725)

* Add security consideration for computation control-flow attacks

As noted in webmachinelearning#443 if constants aren't actually constant then bad things
can happen. Add a note to mention that implementations should mitigate
this.

Purely editorial change. Fixes webmachinelearning#443

* typo platform

---------

Co-authored-by: Dwayne Robinson <[email protected]>
  • Loading branch information
inexorabletash and fdwr authored Jul 17, 2024
1 parent ac83a20 commit c9e70f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ Once the graph is fully constructed and compiled, the input shapes into each of

Issue: Document operations susceptible to out-of-bounds access as a guidance to implementers.

Implementations must defend against control-flow attacks based on changes to data considered to be constant. For example, optimizations in the underlying platform may assume that a weight remains unchanged throughout a computation. If the API allowed the contents of buffers holding weights to change during a computation then those optimization assumptions would be invalidated, causing undefined behavior in the underlying platform. The API mitigates this category of attacks from script by always copying or transferring buffers, but implementations should consider additional defenses such as process isolation of data assumed to be constant.

As a future-proofing measure, the API design allows certain operations that can be generically emulated to be deprecated for security, performance, or other reasons without breaking compatibility. This is made possible by high-level functions that are defined in terms of smaller primitive operations defined in this specifications. This enables a native implementation of a high-level function to be replaced with a polyfill implementation.

Issue: Investigate side channel attack feasibility considering the current state where CPU is shared between processes running renderers.
Expand Down

0 comments on commit c9e70f6

Please sign in to comment.