Ian Stark’s research while affiliated with University of Edinburgh and other places

What is this page?


This page lists works of an author who doesn't have a ResearchGate profile or hasn't added the works to their profile yet. It is automatically generated from public (personal) data to further our legitimate goal of comprehensive and accurate scientific recordkeeping. If you are this author and want this page removed, please let us know.

Publications (55)


Static analysis to make the most of CHERI C/C++ for existing code: improving memory safety at scale
  • Article
  • Full-text available

February 2025

·

4 Reads

International Journal on Software Tools for Technology Transfer

Irina Dudina

·

Ian Stark

We describe and evaluate custom static analyses to support transitioning existing C/C++ codebases to CHERI hardware. CHERI is a novel architectural extension, implemented for RISC-V and AArch64, that uses capabilities to provide fine-grained memory protection and scalable software compartmentalization. While the existing CHERI toolchain can recompile large code collections for the platform with only a few source changes, those changes are nonetheless critical: we demonstrate that static analysis can help to identify where they are needed and what must be done to avoid later runtime faults. We provide custom checkers for the Clang Static Analyzer to handle capability alignment, copying through memory, and manipulation as integers. Beyond simply picking up problems in existing code, we also have checkers that identify where code can take advantage of capabilities to better enforce least privilege and improve spatial memory safety. We evaluate all implemented checkers on a sample of packages from the CheriBSD ports library (408 packages, analyzed) and confirm by analyzing true-positive warning rates that the reports produced are sufficiently high quality for practical use.

Download




Verified Security for the Morello Capability-enhanced Prototype Arm Architecture

March 2022

·

49 Reads

·

20 Citations

Lecture Notes in Computer Science

Memory safety bugs continue to be a major source of security vulnerabilities in our critical infrastructure. The CHERI project has proposed extending conventional architectures with hardware-supported capabilities to enable fine-grained memory protection and scalable compartmentalisation, allowing historically memory-unsafe C and C++ to be adapted to deterministically mitigate large classes of vulnerabilities, while requiring only minor changes to existing system software sources. Arm is currently designing and building Morello, a CHERI-enabled prototype architecture, processor, SoC, and board, extending the high-performance Neoverse N1, to enable industrial evaluation of CHERI and pave the way for potential mass-market adoption. However, for such a major new security-oriented architecture feature, it is important to establish high confidence that it does provide the intended protections, and that cannot be done with conventional engineering techniques. In this paper we put the Morello architecture on a solid mathematical footing from the outset. We define the fundamental security property that Morello aims to provide, reachable capability monotonicity, and prove that the architecture definition satisfies it. This proof is mechanised in Isabelle/HOL, and applies to a translation of the official Arm specification of the Morello instruction-set architecture (ISA) into Isabelle. The main challenge is handling the complexity and scale of a production architecture: 62,000 lines of specification, translated to 210,000 lines of Isabelle. We do so by factoring the proof via a narrow abstraction capturing essential properties of arbitrary CHERI ISAs, expressed above a monadic intra-instruction semantics. We also develop a model-based test generator, which generates instruction-sequence tests that give good specification coverage, used in early testing of the Morello implementation and in Morello QEMU development, and we use Arm’s internal test suite to validate our model. This gives us machine-checked mathematical proofs of whole-ISA security properties of a full-scale industry architecture, at design-time. To the best of our knowledge, this is the first demonstration that that is feasible, and it significantly increases confidence in Morello.


Fast and Correct Load-Link/Store-Conditional Instruction Handling in DBT Systems

November 2020

·

52 Reads

·

4 Citations

IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems

Dynamic binary translation (DBT) requires the implementation of load-link/store-conditional (LL/SC) primitives for guest systems that rely on this form of synchronization. When targeting, e.g., ×86\times 86 host systems, LL/SC guest instructions are typically emulated using atomic compare-and-swap (CAS) instructions on the host. Whilst this direct mapping is efficient, this approach is problematic due to subtle differences between LL/SC and CAS semantics. In this article, we demonstrate that this is a real problem, and we provide code examples that fail to execute correctly on QEMU and a commercial DBT system, which both use the CAS approach to LL/SC emulation. We then develop two novel and provably correct LL/SC emulation schemes: 1) a purely software-based scheme, which uses the DBT system’s page translation cache for correctly selecting between fast, but unsynchronized, and slow, but fully synchronized memory accesses and 2) a hardware-accelerated scheme that leverages hardware transactional memory (HTM) provided by the host. We have implemented these two schemes in the Synopsys DesignWare ARC nSIM DBT system, and we evaluate our implementations against full applications, and targeted microbenchmarks. We demonstrate that our novel schemes are not only correct but also deliver competitive performance on-par or better than the widely used, but broken CAS scheme.


Property-Directed Verified Monitoring of Signal Temporal Logic

October 2020

·

18 Reads

·

2 Citations

Lecture Notes in Computer Science

Signal Temporal Logic monitoring over numerical simulation traces has emerged as an effective approach to approximate verification of continuous and hybrid systems. In this paper we explore an exact verification procedure for STL properties based on monitoring verified traces in the form of Taylor model flowpipes as produced by the Flow* verified integrator. We explore how tight integration with Flow*’s symbolic flowpipe representation can lead to more precise and more efficient monitoring. We then show how the performance of monitoring can be increased substantially by introducing masks, a property-directed refinement of our method which restricts flowpipe monitoring to the time regions relevant to the overall truth of a complex proposition. Finally, we apply our implementation of these methods to verifying properties of a challenging continuous system, evaluating the impact of each aspect of our procedure on monitoring performance.


Fig. 1. Schema of E. Coli infection by phage λ.
Fig. 2. Gene regulation at the λ-switch.
Fig. 6. Affinity patterns for binding of Rep dimers to the operators.
Fig. 7. Affinity patterns for RNAP binding.
Fig. 9: A simple gene regulatory network, exhibiting positive and negative regulation.

+1

Modelling Patterns of Gene Regulation in the bond-calculus

September 2020

·

65 Reads

·

1 Citation

Electronic Notes in Theoretical Computer Science

The bond-calculus is a language for modelling interactions between continuous populations of biomolecular agents. The calculus combines process-algebra descriptions of individual agent behaviour with affinity patterns, which can specify a wide variety of patterns of interactions between the sites of different agents. These affinity patterns extend binary molecular affinities to multiway reactions, general kinetic laws, and cooperative interactions. In this paper we explore bond-calculus modelling of gene regulation at both the molecular and network levels. At the molecular level, we show how affinity patterns can succinctly describe the λ-switch, a prototypical example of cooperative regulation. Moving to the network level, we develop a general model of gene regulatory networks using affinity patterns and an expanded Hill kinetic law. We illustrate the approach with a specific example: the complex plant circadian clock. We analyse these models via the bond-calculus's differential equation and stochastic semantics, and validate our results against existing models from the literature.


Fig. 1. The decomposition of s into components s ≡ (s1,1 ∨ s1,2) ∨ s2,1 ∨ s3,0.
Fig. 2. Transition from root finding to three-valued signals.
Technical Report: Property-Directed Verified Monitoring of Signal Temporal Logic

August 2020

·

41 Reads

Signal Temporal Logic monitoring over numerical simulation traces has emerged as an effective approach to approximate verification of continuous and hybrid systems. In this report we explore an exact verification procedure for STL properties based on monitoring verified traces in the form of Taylor model flowpipes as produced by the Flow* verified integrator. We explore how tight integration with Flow*'s symbolic flowpipe representation can lead to more precise and more efficient monitoring. We then show how the performance of monitoring can be increased substantially by introducing masks, a property-directed refinement of our method which restricts flowpipe monitoring to the time regions relevant to the overall truth of a complex proposition. Finally, we apply our implementation of these methods to verifying properties of a challenging continuous system, evaluating the impact of each aspect of our procedure on monitoring performance.



Citations (41)


... CHERI design choices mean compilers can routinely use capabilities to implement C/C++ pointers, and there are Clang/LLVM and GCC versions supporting this. The precise meaning of the CHERI-C/C++ dialect is given by an executable mechanized semantics [30] that extends the existing Cerberus C semantics [14]. ...

Reference:

Static analysis to make the most of CHERI C/C++ for existing code: improving memory safety at scale
Formal Mechanised Semantics of CHERI C: Capabilities, Undefined Behaviour, and Provenance
  • Citing Conference Paper
  • April 2024

... However, the results have been compelling: MSRC reported more than a two-thirds deterministic mitigation rate for memory-safety vulnerabilities with the deployment of CHERI's referential, spatial, and temporal memory safety. 3. Formal proof of architectural security properties: Formal modeling of the Morello and CHERI-MIPS ISAs has supported formal verification (machine-checked mathematical proof) that the ISAs enforce key properties, such as correctness of capability bounds comparison and isolation of arbitrary code by compartmentalization mechanisms, 12 and formal semantics for CHERI C has clarified its security properties. 13 4. Penetration-testing exercises, ideally performed with a strong attacker awareness of the CHERI model so that attack strategies can take this into account: These exercisers have primarily been performed externally and include an activity by MSRC to consider the impact of CHERI on WebKit JavaScriptCore ( JSC) with CHERI-aware attackers as well as a DARPA-sponsored, crowdsourced penetration activity. ...

Verified Security for the Morello Capability-enhanced Prototype Arm Architecture

Lecture Notes in Computer Science

... To this end, we construct a second non-deterministic model that predicts the behaviour of the physical twin after a self-adaptation whilst we perform uncertainty calibration to measure and account for the uncertainties introduced during the self-adaptation process. This enables us to apply exact formal verification, leveraging Flow* verified integration [13] to perform verified monitoring [59] of the non-deterministic model against highlevel safety requirements specified in the Signal Temporal Logic (STL) [39]. Verification is performed inside the self-adaptive loop to predict future violations after each self-adaptation. ...

Property-Directed Verified Monitoring of Signal Temporal Logic
  • Citing Chapter
  • October 2020

Lecture Notes in Computer Science

... CISC architectures, like x86, implement a similar instruction called compare-and-swap (CAS), which has a slightly different functionality. Though implementation methods for LL/SC vary, some rely upon CAS [1]. Specific syntax for LL/SC instructions varies across platforms. ...

Fast and Correct Load-Link/Store-Conditional Instruction Handling in DBT Systems
  • Citing Article
  • November 2020

IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems

... The client is responsible for connecting to the server and executing commands. This compartmentalization prevents an attacker who exploits a vulnerability in the client from gaining access to the server [10]. ...

Rigorous engineering for hardware security: Formal modelling and proof in the CHERI design and implementation process
  • Citing Conference Paper
  • May 2020

... Manual formalization of specifications is costly and this has led to work that seeks to automate the creation of formal ISA semantics. SAIL [2] and K [12] have been explicitly built for ISA specifications. For x86, Godefroid and Taly [17] leveraged SMT to find input examples, while Heule et al. [21] explored stratified synthesis. ...

ISA semantics for ARMv8-a, RISC-v, and CHERI-MIPS

Proceedings of the ACM on Programming Languages

... In related work, CIU equivalence [3,8,11,13,20,21,32] and logical relations (either type-indexed [26,30] or step-(and type-) indexed [3,11,27,32]) were successfully applied for a wide variety of languages (e.g., different variants of lambda calculi, imperative languages). Most of the related works-that define CIU equivalence-use a continuation-style semantics, similarly to our case where the frame stack can be seen as the continuation. ...

Triangulating context lemmas
  • Citing Conference Paper
  • January 2018

... This might be much easier than verifying the implementation of the inference engine. Similarly, our soundness proof can be formalized in a theorem prover and declarative typing derivations can then be used to generate formal proofs of correctness; see e.g. the Mobius project [5]. ...

MOBIUS: Mobility, Ubiquity, Security
  • Citing Conference Paper
  • January 2007

... Its behavioural theory features several notions of equivalence, including variants of bisimilarity, contextually-defined congruences, and testing equivalences [8]. Its denotational semantics has been thoroughly investigated [12,46,14,13,42,6,22,7,38]. This paper introduces a new denotational semantics for π with three main novelties. ...

Presheaf Models for the pi-Calculus

BRICS Report Series