Aarhus University Seal

When the proof fails: How mathematics is making technology more secure

While attempting to mathematically verify the security guarantees of CHERIoT, an emerging technology designed to protect connected devices, PhD student June Rousseau from Aarhus University uncovered two previously unknown security vulnerabilities. Both have now been fixed, demonstrating how mathematical reasoning can help strengthen cybersecurity.

Mathematics is not just a tool for solving known problems. It can also reveal problems we did not know existed. For PhD student June Rousseau from the Department of Computer Science at Aarhus University, this became evident while working to verify the security guarantees of CHERIoT.

Rather than deliberately searching for security vulnerabilities, Rousseau was using mathematics to establish whether the technology delivered on its intended security guarantees. However, when some of the expected mathematical proofs could not be completed, further investigation revealed two vulnerabilities in the system itself.

“The CHERIoT team has thoroughly documented their code, so when we fail to complete the proof, we usually first think that we misunderstood something or that we use the wrong approach. But this time, we quickly realised that the problem wasn't the proof and that the theorem we were trying to prove seemed false under some very unusual conditions. So, we put some effort into designing a ‘counterexample’: it's the mathematical way to say that we found a security vulnerability,” says June Rousseau.

Securing the technology designed to protect us

From smart electricity meters to industrial sensors, connected devices are becoming an increasingly important part of our everyday lives. As their use expands, so does the need to protect them against cyber threats.

CHERIoT is an open-source platform that takes a different approach to cybersecurity by combining hardware and software to enforce security. The technology is already moving towards commercial adoption, with British technology company Hildebrand recently announcing smart electricity meters built on a CHERIoT microcontroller.

electricity meters. One of CHERIoT's key features is the ability to divide software into isolated compartments, each with access only to the information and resources it needs. If one compartment contains faulty or malicious software, the security mechanisms are designed to prevent it from compromising other parts of the system. But how can developers be certain that these mechanisms work as intended, even in situations they may not have anticipated? This is where mathematics comes in.

Finding the unexpected through mathematics

Together with supervisors, Jean Pichon-Pharabod and Lars Birkedal, Rousseau is working with a method known as formal verification, which uses mathematical reasoning to establish whether computer systems satisfy specific properties.

Unlike conventional software testing, which examines a system's behaviour in selected scenarios, formal verification aims to establish that certain properties hold across all possible behaviours covered by a mathematical model. This makes it possible to reason about situations that developers may never have considered, including interactions with faulty or deliberately malicious software.

“We usually say that conventional testing can only show the presence of bugs, and formal verification can prove the absence of bugs. Conventional testing is limited by the number of tests one can write and by the behaviours that the tests cover, whereas formal verification covers all possibilities,” says June Rousseau.

Two vulnerabilities, two solutions

The two vulnerabilities identified by Rousseau concerned the security boundaries designed to prevent software components from accessing information or resources beyond their authorised permissions. One vulnerability could allow a malicious software component to gain access to private data belonging to another component. The other could allow a previously terminated software task to be restarted with access rights that should no longer be available. Working closely with the CHERIoT developers, who actively supported the verification effort, the researchers contributed to resolving both vulnerabilities. In one case, they were also able to mathematically validate the proposed fix within their verification model before it was integrated into the platform.

“It was very exciting, because it felt that all our efforts into verifying this system, and developing the formal tools for that – finally had real impact outside of the academic world,” says June Rousseau.

Towards stronger security guarantees

Following the discovery and resolution of the two vulnerabilities, the researchers have completed further mathematical proofs that provide stronger guarantees about the isolation of software components and tasks in CHERIoT, subject to the assumptions of their verification model.Their next ambition is to extend the verification to other parts of the system and explore how their mathematical methods can be used to verify the correctness and security of applications running on CHERIoT. The findings demonstrate that mathematics is not only a powerful tool for establishing security guarantees, but also for uncovering vulnerabilities we might not otherwise know to look for.

Further information

Read the technical blog post by June Rousseau, co-written with Jean Pichon-Pharabod and Lars Birkedal: From formal verification to bug-finding in CHERIoT