seL4 Proofs & Certification

The seL4 proofs provide strong assurance that seL4 operates correctly and enforces critical security properties. Such evidence is commonly required by certification authorities to approve the use of computer systems in critical sectors, such as Common Criteria for security products, ISO 26262 in the automotive sector, and DO-178C in the aerospace sector.

Verification vs Certification vs Assurance

Verification aims at building assurance that a system meets its intended behaviour, and formal verification provides the highest level of such assurance. Certification, on the other hand, is a process to assess a system against a pre-existing standard, with verification typically being a key component, among other requirements.

Certifying an seL4-based product in critical sectors such as automotive, aerospace, critical infrastructure, or defence, where seL4 is being used, requires addressing a number of requirements. When it comes to the verification of correctness and security, seL4's freely available formal proofs provide the highest possible assurance level, going beyond the most stringent levels of existing certification schemes.

seL4 and Common Criteria EAL 7

motherboard with a big golder lock

The international standard known as Common Criteria focuses on computer security certification. Its highest Evaluation Assurance Level, EAL 7, mandates a certain degree of formal modelling and verification. The formal specifications and proofs provided by seL4 go beyond what is required at this highest level.

In particular, Common Criteria's EAL 7 requires a formal model of the security policy, functional specification and design specification, with formal correspondence between each. From the design specification, it only requires an informal mapping to the implementation. In contrast, seL4 provides a formal proof all the way down to the implementation, and even further, to the binary.

Binary
Binary
Implementation
Implementation
Functional Specification
Functional Specification
Design Specification
Design Specification
Policy
Policy
Implementation
Implementation
Functional Specification
Functional Specification
Design Specification
Design Specification
Policy
Policy
informal
informal
formal
formal
Common Criteria EAL 7
Common Criteria EAL 7
seL4
seL4

Formal methods are required in Common Criteria's assurance class for product development (the standard contains 5 other assurance classes, such as tests, life-cycle support, and vulnerability assessment). As shown in the figure below, summarising the requirements for the development class per EAL, the use of formal modelling and verification is only required from EAL 6, and only down to the design specification level.

Implementation
Implementation
Functional Specification
Functional Specification
Design Specification
Design Specification
Policy
Policy
EAL1
EAL1
EAL2
EAL2
EAL3
EAL3
EAL4
EAL4
EAL5
EAL5
EAL6
EAL6
EAL7
EAL7
Formal
Formal
Formal
Formal
Basic
Basic
Security-enforcing
Security-en...
Complete summary
Complete su...
Complete
Complete
Complete semi-formal
Complete se...
Complete semi-formal
Complete se...
Complete formal
Complete fo...
Basic
Basic
Architectural
Architectur...
Modular
Modular
Semi-formal modular
Semi-formal...
Complete semi-formal
Complete se...
Complete formal
Complete fo...
Representation
Representation
Representation
Representation
Complete mapping
Complete ma...
Complete mapping
Complete ma...
Common Criteria's assurance components by evaluation assurance level for the Development assurance class
Common Criteria's assurance components by evaluation assurance level for the Development assurance class

Using seL4 in a certification based on Common Criteria or in a similar high-grade security evaluation does not automatically solve all security objectives, but does give a large boost to satisfying the development requirements.

seL4 and ISO26262 ASIL-D

Futuristic car wireframe representation

In the Automotive sector, while not mandatory, the ISO26262 standard for functional safety of road vehicles is in widespread use. It defines safety integrity levels. To achieve the highest safety integrity levels, ISO26262 recommends the use of formal methods throughout the development lifecycle. The strength of seL4's formal proofs is considerably higher than what ISO26262's highest level, ASIL-D, requires.

In more detail, ISO26262 defines an automotive-specific risk-based approach that determines risk classes as four Automotive Safety Integrity Levels (ASILs), depending on risk severity, likely exposure and controllability. The highest level, ASIL-D, corresponds to events having reasonable possibility of causing a life-threatening or fatal injury, with the injury being physically possible in most operating conditions, and with little chance the driver can do anything to prevent the injury.

Severe
Severe
Fatal
Fatal
Light
Light
Exposure
Exposure
Controllability
Controllability
Simple
Simple
Normal
Normal
Difficult
Difficult
very low
very low
ISO26262 ASILs
ISO26262 ASILs
Severity
Severity
low
low
medium
medium
high
high
very low
very low
low
low
medium
medium
high
high
very low
very low
low
low
medium
medium
high
high
ASIL-A
ASIL-A
ASIL-B
ASIL-B
ASIL-C
ASIL-C
ASIL-D
ASIL-D
QM (quality managed;  no specific regulation)
QM (quality managed;...

In ISO26262, formal verification is recommended for ASIL-C and ASIL-D risk classes. Note that in this standard, formal verification is defined as a method used to prove the correctness of a system against the specification in formal notation of its required behaviour. In other words, only the specification is mandated to be formal, and any analysis (including testing) with respect to such a formal specification fulfils the ISO26262 recommendation for formal verification.

Semi-formal verification
Semi-formal verificati...
Walk-through
Walk-through
ASIL
ASIL
ISO26262 recommended methods for verification of software unit design and implementation
ISO26262 recommended methods for verification of so...
Methods
Methods
A
A
B
B
C
C
D
D
highly recommended
highly recommended
Inspection
Inspection
Formal verification
Formal verification
Control Flow analysis
Control Flow analysis
Static Code analysis
Static Code analysis
Semantic Code analysis
Semantic Code analysis
Data Flow analysis
Data Flow analysis
+
+
++
++
+
+
+
+
+
+
+
+
+
+
+
+
+
+
++
++
+
+
++
++
+
+
+
+
++
++
++
++
+
+
++
++
++
++
+
+
++
++
++
++
++
++
+
+
++
++
++
++
+
+
++
++
+
+
++
++
no recommendation
no recommendation
recommended
recommended

With its mathematical, machine-checked proofs of correctness and security, seL4's assurance level is considerably stronger than ISO26262 highest risk recommendations.

seL4 and DO-178C Level A

representation of an airplane structure in blue

DO-178C defines a number of safety objectives to be satisfied by commercial software-based aerospace systems, depending on the effects their failure may have on the aircraft, crew, and passengers. At the highest assurance level, called Level A software, objectives related to software development include evidence about the system's high-level and low-level requirements (accuracy, verifiability, traceability, compliance etc) as well as its architecture and partitioning. The seL4 proofs of correctness and security provide such evidence with the strength of mathematical proofs.

DO-178C defines five assurance levels, depending on the effects of failures, ranging from Level A software, when failures may have catastrophic effects that may cause deaths, usually with loss of the aircraft, to Level E software, when failures have no safety effect. For instance, Level A has 71 objectives to satisfy whereas Level E has none. The table below shows some of the objectives related to the software development process, showing that the most stringent software levels require a number of objectives in terms of accuracy, verifiability, traceability and compliance of the high-level and low-level requirements.

High-level requirements are compatible with target computer
High-level requirements are compatible with target compu...
High-level requirements comply with system requirements
High-level requirements comply with system requirements
Software Level
Software Level
DO-178C Verification of Outputs of Software Requirement Process
DO-178C Verification of Outputs of Software Requirement Process
Objectives
Objectives
D
D
C
C
B
B
A
A
High-level requirements are accurate and consistent
High-level requirements are accurate and consistent
High-level requirements are verifiable
High-level requirements are verifiable
High-level requirements conform to standards
High-level requirements conform to standards
Algorithms are accurate
Algorithms are accurate
High-level requirements are traceable to system requirements
High-level requirements are traceable to system requirem...
applicable
applicable
not applicable
not applicable
Low-level requirements are compatible with target computer
Low-level requirements are compatible with target comput...
Low-level requirements comply with high-level requirements
Low-level requirements comply with high-level requiremen...
Software Level
Software Level
DO-178C Verification of Outputs of Software Design Process
DO-178C Verification of Outputs of Software Design Process
Objectives
Objectives
D
D
C
C
B
B
A
A
Low-level requirements are accurate and consistent
Low-level requirements are accurate and consistent
Low-level requirements are verifiable
Low-level requirements are verifiable
Low-level requirements conform to standards
Low-level requirements conform to standards
Algorithms are accurate
Algorithms are accurate
Low-level requirements are traceable to high-level requirements
Low-level requirements are traceable to high-level requi...
applicable
applicable
not applicable
not applicable
Software architecture is compatible with target computer
Software architecture is compatible with target computer
Software architecture is consistent
Software architecture is consistent
Software architecture is verifiable
Software architecture is verifiable
Software architecture conforms to standards
Software architecture conforms to standards
Software architecture integrity is confirmed
Software architecture integrity is confirmed
Software architecture comply with high-level requirements
Software architecture comply with high-level requirements

For this aerospace standard, there also exists a guide specifically for the use of Formal Methods: the DO-333 Formal Methods Supplement. The supplement identifies the modifications and additions to DO-178C objectives, activities, and software life cycle data that should be addressed when formal methods are used as part of the software development process. It includes requirements for the use of formal notations with unambiguous, mathematically defined syntax and semantics, soundness of the formal analysis methods used, and justification of all assumptions used in each formal analysis.

The seL4 proofs use the Isabelle/HOL theorem prover, with all assumptions explicitly stated.

DO-178C also refers to another supplement, DO-330, for the qualification of verification tools used in the certification. It specifies five tool qualification levels (TQL) depending on three criteria: whether (1) the tool output is part of the airborne software and thus could insert an error; (2) the tool automates a verification process and is used to justify the elimination or reduction of other verification processes; or whether the tools is just used to automate a verification process. Each of TQL-1 to TQL-5 defines a list of objectives to fulfil. For instance, objectives related to the source code of the tool are not required for TQL-4 or TQL-5, i.e., for tools that do not generate code that becomes part of the airborne software.

3 (automates verification process)
3 (automates verification process)
1 (output is part of the resulting software)
1 (output is part of the resulting software)
Software Level
Software Level
DO-330 Tool Qualification Level (TQL) per DO-178C Software Level
DO-330 Tool Qualification Level (TQL) per DO-178C Software Level
Criteria
Criteria
D
D
C
C
B
B
A
A
2 (automates verification process + used to justify elimination or reduction of other processes)
2 (automates verification process + used to just...
TQL-1
TQL-1
TQL-2
TQL-2
TQL-3
TQL-3
TQL-4
TQL-4
TQL-4
TQL-4
TQL-5
TQL-5
TQL-5
TQL-5
TQL-5
TQL-5
TQL-5
TQL-5
TQL-4
TQL-4
TQL-5
TQL-5
TQL-5
TQL-5

For seL4, there is no code generated from Isabelle/HOL that results in the seL4 code base. So criterion 1 does not apply. Moreover Isabelle's logic is based on a well-known, small core set of axioms that have been validated in the literature, with all extensions derived from first principles. No external tool is trusted: all outputs from external tools go through the creation of a corresponding proof within Isabelle's proof kernel. Axioms and assumptions of a formalisation can be tracked. While to our knowledge Isabelle/HOL has not been qualified yet for a DO-178C certification, it should be well able to meet DO-330 requirements.