@@ -12,21 +12,21 @@ \chapter{CHERI in High-Assurance Systems}
1212\section {Unpredictable Behavior }
1313
1414In the semantics for the CHERI instructions
15- we try
16- to avoid defining behavior as `` unpredictable'' . There were several reasons
15+ we try
16+ to avoid defining behavior as `` unpredictable'' . There were several reasons
1717for avoiding unpredictable behavior, including the difficulty it creates for
1818formal verification.
19- Although CHERI is based on the MIPS ISA,
19+ Although CHERI is based on the MIPS ISA,
2020the MIPS ISA specification (e.g., for the
2121R4000) makes extensive use of `` unpredictable'' . If `` unpredictable'' is
2222modeled as `` anything could happen'' , then clearly the system is not secure.
23- As a
23+ As a
2424concrete example, imagine a hypothetical CHERI implementation that contains
2525a Trojan horse such that when a sandboxed program executes an arithmetic
2626instruction whose result is `` unpredictable'' , it also changes the capability
2727registers so that a capability granting access to the entire virtual address
2828space is placed in a capability register. If `` unpredictable'' means that
29- anything could happen, then this is compliant with the MIPS ISA; it is also
29+ anything could happen, then this is compliant with the MIPS ISA; it is also
3030obviously insecure. Later versions of the MIPS ISA (e.g., MIPS64 volume I) make
3131it clear that `` unpredictable'' is more restrictive than this, saying that
3232`` \emph {unpredictable } operations must not read, write, or modify the contents of
@@ -61,7 +61,7 @@ \section{Bypassing the Capability Mechanism Using the TLB}
6161In CheriBSD, user-space programs are unable to modify the TLB (except through
6262system calls such as \ccode {mmap}), and thus cannot carry out this attack.
6363This security argument makes it explicit that the security of the capability
64- mechanism depends on the correctness of the underlying operating system.
64+ mechanism depends on the correctness of the underlying operating system.
6565However, this may not be adequate for high-assurance systems.
6666\item
6767Similarly, a high-assurance microkernel could run untrusted code in user
@@ -92,7 +92,7 @@ \section{Malformed Capabilities}
9292128-bit capabilities, there are bit patterns corresponding to \cbase {} $ +$
9393\clength {} $ > 2 ^{64}$ .
9494The capability registers are initialized on reset, so there will
95- never be malformed capabilities in the initial register contents, and
95+ never be malformed capabilities in the initial register contents, and
9696a CHERI instruction will never create malformed capabilities from
9797well-formed ones. However, DRAM is not cleared on system reset, so that it is
9898possible that the initial memory might contain malformed capabilities with the
@@ -107,7 +107,7 @@ \section{Malformed Capabilities}
107107
108108There are (at least) two implementation choices. An implementation of the CHERI
109109instructions could perform access-control checks in a way that would
110- work on both well-formed and malformed capabilities.
110+ work on both well-formed and malformed capabilities.
111111Alternatively, the hardware could be
112112slightly simplified by performing the checks in a way that might behave
113113unexpectedly on malformed capabilities, and then rely on the capability
@@ -118,7 +118,7 @@ \section{Malformed Capabilities}
118118presents special difficulties in testing. No program whose behavior
119119is defined by the ISA specification will ever trigger the case of encountering
120120a malformed capability. (Programs whose behavior is `` unpredictable'' , because
121- they access uninitialized memory, may encounter them).
121+ they access uninitialized memory, may encounter them).
122122However, some approaches to
123123automatic test generation may have difficulty constructing such tests.
124124
@@ -142,7 +142,7 @@ \section{Constants in the Formal Model}
142142\section {Outline of Security Argument for a Reference Monitor }
143143
144144The CHERI ISA can be used to provide several different security properties (for
145- example, control-flow integrity or sandboxing). This section provides the
145+ example, control-flow integrity or sandboxing). This section provides the
146146outline of a security argument for how the CHERI instructions can be used
147147to implement a reference monitor.
148148
@@ -170,7 +170,7 @@ \section{Outline of Security Argument for a Reference Monitor}
170170We are assuming that the system operates in an environment where
171171the attacker does not have physical access to the hardware, so that
172172hardware-level attacks such as introducing memory errors~\cite {Govinda +03 }
173- are not applicable.
173+ are not applicable.
174174% %%% WE MIGHT ALSO MENTION the A2 best paper from IEEE SS&P 2016 on
175175% %%% injecting analog circuit malware into the hardware.
176176
@@ -193,7 +193,7 @@ \section{Outline of Security Argument for a Reference Monitor}
193193memory addresses ($ S_K$ ) for the data, code, and stack segments of the trusted
194194code, together with the CHERI reserved registers.
195195
196- Our security requirement of the hardware is that the untrusted code will run
196+ Our security requirement of the hardware is that the untrusted code will run
197197for a while, eventually returning control to the trusted code; and when the
198198trusted code is re-entered, (a) it will be reentered at one of a small number
199199of known entry points; (b) its code, data and stack will not have been modified
@@ -210,7 +210,7 @@ \section{Outline of Security Argument for a Reference Monitor}
210210reference monitor's reserved memory or the reserved registers. That is, all
211211memory accesses are checked against a capability register, and do not succeed
212212unless the capability permits them. The untrusted code can access memory without
213- returning control to the trusted code;
213+ returning control to the trusted code;
214214however, all of its memory access are mediated
215215by the capability hardware, which is considered to be part of the reference
216216monitor. Tampering with the reference monitor by making physical modifications
@@ -253,7 +253,7 @@ \section{Outline of Security Argument for a Reference Monitor}
253253this probably can't be used to attack a real system, any unpredictable behavior
254254has to prevent for provable security).
255255\item
256- All capability registers have \cbase {} $ +$ \clength {} $ \leq 2 ^{64}$
256+ All capability registers have \cbase {} $ +$ \clength {} $ \leq 2 ^{64}$
257257\algorithmicor {} \ctag {} $ =$ \algorithmicfalse {}.
258258\item
259259The above is also true of all capabilities contained within the set of memory
@@ -293,10 +293,10 @@ \section{Outline of Security Argument for a Reference Monitor}
293293We assume that \emph {SecureState } is true initially (i.e.,
294294a requirement of
295295the trusted code is that it puts the CPU into this state before calling the
296- untrusted code).
296+ untrusted code).
297297We then wish to show that \emph {SecureState } $ \Rightarrow $ \textbf {X }
298298 (\emph {SecureState } \algorithmicor {} \emph {TCBEntryState }) (where \textbf {X } is
299- the next operator in linear temporal logic). By induction on states,
299+ the next operator in linear temporal logic). By induction on states,
300300\emph {SecureState } $ \Rightarrow $ \emph {TCBEntryState } \textbf {R } \emph {SecureState }
301301(where \textbf {R } is the release operator in linear temporal logic).
302302
@@ -308,7 +308,7 @@ \section{Outline of Security Argument for a Reference Monitor}
308308Given that CP0.Status.KSU $ \neq $ 0, CP0.Status.CU0 = \algorithmicfalse {},
309309CP0.Status.EXL = \algorithmicfalse {} and CP0.Status.ERL = \algorithmicfalse {},
310310all instructions will either raise an exception (\textbf {X }
311- \emph {TCBEntryState }) or leave CP0 registers unchanged, leaving this
311+ \emph {TCBEntryState }) or leave CP0 registers unchanged, leaving this
312312part of the \emph {SecureState } invariant unchanged.
313313\item
314314Given that CP0.Status.KSU $ \neq $ 0 (etc.), all instructions will
@@ -347,7 +347,7 @@ \section{Outline of Security Argument for a Reference Monitor}
347347The theorem \emph {SecureState } $ \Rightarrow $ \emph {TCBEntryState } \textbf {R }
348348\emph {SecureState } uses the \textbf {R } operator, which is a weak form of
349349`` until'' : the system might continue in \emph {SecureState } indefinitely.
350- Sometimes it is desirable to have the stronger property that
350+ Sometimes it is desirable to have the stronger property that
351351\emph {TCBEntryState } is guaranteed to be reached eventually. This can be
352352ensured by having the trusted code enable timer interrupts, and use a
353353timer interrupt to force return to \emph {TCBEntryState } if the untrusted
@@ -378,7 +378,7 @@ \section{Outline of Security Argument for a Reference Monitor}
378378
379379\emph {SecureStateTimer } $ \Rightarrow $ \textbf {F } \emph {TCBEntryState }
380380
381- It then follows that \emph {SecureStateTimer } $ \Rightarrow $
381+ It then follows that \emph {SecureStateTimer } $ \Rightarrow $
382382\emph {SecureStateTimer } \textbf {U } \emph {TCBEntryState }, where
383383\textbf {U } is the until operator in linear temporal logic.
384384
0 commit comments