Check sizes of accesses
The current code doesn't check much in terms of user-provided offsets and size. It is very easy to pass a wrong value for an offset and read or write in the memory of the provider, outside of the bake region.
We urgently need to check all the functions and make sure that wrong parameters sent by the user will be handled correctly (i.e. returning an error code instead of allowing access into whatever region of memory of the provider).