Trust Issues: Exploiting TrustZone TEEs

(googleprojectzero.blogspot.com)

142 points | by jor-el 2467 days ago

7 comments

  • Lx1oG-AWb6h_ZG0 2467 days ago
    Holy crap, that was brutal. I don't think you can get any closer to accusing someone of incompetence without actually coming out and saying so directly. If Samsung et al are this cavalier about the trust zone, what is the state of the rest of their systems, which presumably have orders of magnitude more code? Suddenly, all the reports about the thousands of bugs in tizen don't seem like exaggerations anymore.

    On a different note, how does the iPhone's trust zone implementation compare? Does anyone know if it is vulnerable to similar issues?

    • tptacek 2467 days ago
      The secure enclave processor is isolated in silicon (even the memory controller enforces access control through encryption), and Apple doesn't have to support unlocked bootloaders. SEPOS isn't simply a TEE.
  • hsivonen 2467 days ago
    Since the “Secure World” just runs a different stack of memory-unsafe software, it’s not cool that Android’s UI characterizes TEE-based FDE key derivation as “hardware-based” “credential storage” giving the user the incorrect impression that it’s based on dedicated hardware, when, in fact, the setup is much weaker than an Apple-style Security Enclave design for FDE key derivation.
  • debatem1 2467 days ago
    Although I was prepared to be impressed by project zero's work here I find that I'm not.

    There's an efuse based revocation mechanism. It isn't used for every vulnerability. That's unfortunate but understandable-- fuses are a scarce resource. Given that, signers should be more careful about the code they sign in the first place to avoid stressing that resource.

    Having said that, at the end of the day this is still just a security feature that is painful to use. That doesn't make it a vulnerability in and of itself, and dressing it up as one feels like a stretch.

    • willvarfar 2467 days ago
      It doesn't seem to have been used for any vulnerability. Including the one thats linked in the post that allow arbitrary code execution...
    • ktRolster 2467 days ago
      signers should be more careful about the code they sign in the first place

      I agree with your sentiment, but that's not going to happen.

      • debatem1 2467 days ago
        I'm not sure why not. Some of the same groups that sign this code also do formal verification of other codebases, for instance FSBLs. It seems reasonable that they would try similar approaches on TZ code given the scarcity of fuses.
        • AstralStorm 2467 days ago
          Good joke. There are layers of proprietary software where nobody can audit involved. Can you trust a single auditor ever too?

          Even an automated exhaustive verifier can be buggy... oot more importantly incomplete if parallelism is considered.

  • ktRolster 2467 days ago
    The best solution is to created a trusted privilege level above the TEE, that can determine whether to trust things in the TEE or not.

    (Don't laugh: Intel's been adding extra security layers for years)

    • pgeorgi 2467 days ago
      "Intel did it" is a pretty horrible argument, historically.

      Especially with things like higher-than-OS trust levels where there are limited ABI guarantees to begin with, it might be better to redo things incompatibly if that provides a better solution than "this newly introduced mechanism of unknown quality asserts that this other mechanism of known-bad quality won't mess things up".

      Intel TXT is one such "guard" mechanism. It tore larger holes in the security fabric than the mechanisms it was supposed to keep watch over.

    • anonymousDan 2467 days ago
      To some extent that's how Intel SGX works, since code in an enclave (SGX name for a TEE) only executes with user level privileges and can't e.g. execute system calls.
  • discreditable 2467 days ago
    I wonder if there could be similar exploits on AMD processors, which have a TrustZone implementation.
  • exabrial 2466 days ago
    Samsung Security has always been abysmal and it makes me sigh, I like their hardware otherwise.
  • madushan1000 2467 days ago
    Wow, I didn't know Gal Joined project zero! Love this guy :D