Leonardo Galli (ETH)
From 11:00 until 12:30
At CAB H 52 (Seminar) + CNB F 110 (Lunch), ETH Zurich
Abstract:
Memory-corruption vulnerabilities remain a major source of exploits observed In-The-Wild (ITW). So it is no surprise that modern systems deploy increasingly sophisticated mitigations – from hardened allocators to ARM Memory Tagging Extension (MTE) – to make exploitation more difficult. Often, however, the security guarantees of these mitigations are unclear, and the arguments for them are informal and rely on implicit assumptions. Moreover, modern exploits often consist of many stages, each turning an existing primitive into a stronger capability. Hence, establishing which stage a mitigation prevents requires reasoning about the exploit beyond the original vulnerability.
We present Briesabelle, an Isabelle/HOL framework for modeling allocator-based mitigations together with the formal statements and the proofs of security claims. In it, we model the target of an exploit as a set of attacker-invokable operations – representing, for example, system calls – described by a simple small-step semantics. A mitigation then specifies allocator behavior and can optionally modify instruction behavior, such as to model MTE.
We then define two related security notions. The goal-based game asks whether an attacker can turn a constrained corruption primitive – such as an Out-Of-Bounds (OOB) write – into an arbitrary-write capability: triggering a write of an arbitrary value to an arbitrary address. The reachability-based notion instead asks whether a memory corruption primitive enables successful outcomes that the attacker could not otherwise obtain. This lets us assess both whether a mitigation blocks a common exploit goal and whether the primitive – as part of a larger exploit – still provides other useful effects, such as enabling future stages.
We use Briesabelle to model two mitigations from the Apple XNU kernel – deployed on over 2 billion devices – and establish the first formal proofs of their effectiveness. Although one mitigation focuses on memory placement and the other on checking memory accesses, we analyze both using the same execution model and security definitions. Moreover, all of our proofs are machine-checked in Isabelle/HOL.
Our first model, salloc, simplifies XNU’s heap allocator to focus on its ability to isolate objects of different types into disjoint memory regions. We then show a core security property of salloc: When a vulnerable object is fully isolated, its OOB write primitive provides no more power than writing within that object, under both security notions. Furthermore, we derive concrete bounds on the likelihood of isolation and argue that, under realistic attack conditions, the mitigation provides effective protection.
Our second model, talloc, adds MTE-like tag checking to an underlying allocator and ensures that adjacent allocations carry different tags, following the tagging policy employed by XNU. With this we show that an OOB primitive can improve an attacker’s chances by at most its probability of guessing an unknown memory tag. For linear OOB writes, we prove that they are always blocked.
Register for this event
Enter your details below
