[PATCH 4.16 187/279] tee: check shm references are consistent in offset/size