]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #65810 - raoulstrackx:ac_mitigation, r=nagisa
authorYuki Okushi <huyuumi.dev@gmail.com>
Fri, 25 Oct 2019 17:46:02 +0000 (02:46 +0900)
committerGitHub <noreply@github.com>
Fri, 25 Oct 2019 17:46:02 +0000 (02:46 +0900)
SGX: Clear additional flag on enclave entry

An attacker could set both the AC flag in CR0 as in rflags. This causes the enclave to perform an AEX upon a misaligned memory access, and an attacker learns some information about the internal enclave state.
The AC flag in rflags is copied from userspace upon an enclave entry. Upon AEX it is copied and later restored. This patch forces the rflag.AC bit to be reset right after an enter.


Trivial merge