  Novel hardware-aided trusted execution environments, as provided by Intel's
Software Guard Extensions (SGX), enable to execute applications in a secure
context that enforces confidentiality and integrity of the application state
even when the host system is misbehaving. While this paves the way towards
secure and trustworthy cloud computing, essential system support to protect
persistent application state against rollback and forking attacks is missing.
  In this paper we present LCM - a lightweight protocol to establish a
collective memory amongst all clients of a remote application to detect
integrity and consistency violations. LCM enables the detection of rollback
attacks against the remote application, enforces the consistency notion of
fork-linearizability and notifies clients about operation stability. The
protocol exploits the trusted execution environment, complements it with simple
client-side operations, and maintains only small, constant storage at the
clients. This simplifies the solution compared to previous approaches, where
the clients had to verify all operations initiated by other clients. We have
implemented LCM and demonstrated its advantages with a key-value store
application. The evaluation shows that it introduces low network and
computation overhead; in particular, a LCM-protected key-value store achieves
0.72x - 0.98x of a SGX-secured key-value store throughput.
