Theoremcore
Undecidability of safety in the HRU model
Also called HRU safety theorem, Harrison-Ruzzo-Ullman theorem.
Whether some command sequence can enter a given right into a cell of the access matrix that lacked it is undecidable for HRU systems, and NP-complete for mono-operational ones.
The safety theorem of Harrison, Ruzzo and Ullman (1976) says that no algorithm can decide, for every protection system of the HRU model, whether a given right can ever be entered into a cell of the access matrix that did not hold it. The proof builds, for each Turing machine, a protection system whose commands do the moves of the machine, so a decision procedure for safety would solve the halting problem. The same paper shows that the question becomes decidable, and NP-complete, when each command has only one primitive operation. The theorem is about the class of all HRU systems: one particular system can still have a decidable safety question, as the Take-Grant model does.
Statement
The definitions are those of the HRU model. A protection system is a finite set of generic rights and a finite set of commands. A configuration is unsafe for if some sequence of command calls reaches a configuration from which some call leaks , that is, enters into a cell that did not hold . This is the first version of safety in the paper, where the leak may go to any cell.
Problem SAFETY. The input is a finite description of a protection system , a configuration and a right . The question is: is safe for ? Decidability is in the Turing machine model.
Theorem (HRU 1976, Theorem 2). SAFETY is undecidable. The set of unsafe instances is recursively enumerable, so the set of safe instances is not recursively enumerable.
Companion results in the same paper:
- (Theorem 1) If every command is mono-operational, that is, its body has exactly one primitive operation, SAFETY is decidable. With the commands as part of the input, it is NP-complete. Tripunitara and Li (2013) corrected the proof of membership in NP.
- (Theorem 3) If no command creates a subject or an object, SAFETY is PSPACE-complete.
In plain words
An operating system keeps a table of who may do what to which file. Programs change the table with a fixed list of simple commands. Each command checks some entries and then adds or removes rights, or makes or removes users and files. The safety question asks whether a right, such as read on a secret file, can ever end up somewhere new. You might hope that a tool could answer this for any list of commands. The theorem says no tool can. The reason is that such a table, with the right commands, can act as a general computer: each user is a cell of memory and each command is one step of a program. So asking whether a right leaks is the same as asking whether a program ever stops, and that question has no general answer.
Proof
The proof reduces the halting problem to unsafety. It is the construction of HRU, Section 5.
The machine. Let have states , tape symbols with blank , start state , a final state and a partial transition function . The tape has a left end and is infinite to the right. We may assume three things, by the usual small changes to : never moves left from cell 1, is undefined for all , and halts on the empty tape if and only if it enters . Whether a given started on the empty tape enters is undecidable; this is the halting problem on the empty tape.
The rights. Let , with the three parts disjoint.
The encoding. A configuration of with tape (the used cells), head on cell and state is encoded by subjects and no other objects, with
- for each , and ;
- for , and ;
- no other rights in any cell.
The commands. For each pair with :
For each pair with , two commands. The first moves right inside the used part of the tape, and the second moves past the last used cell:
The initial configuration has one subject with . It encodes the start of on the empty tape. The right to ask about is .
Claim. Every configuration reachable from encodes a configuration of reachable from the start, up to the names of the subjects. A call changes the encoded configuration only if it does one move of from .
Proof of the claim, by induction on the number of steps. encodes the start. Let encode , with tape , head on and state . A call whose condition fails leaves unchanged. Consider a call whose condition holds.
- for a left move needs , so and for some . It needs , so , and , because only one state right and one symbol are present. Its body moves the state right to and replaces by . This is the left move of . Since here, the case cannot arise, which matches the assumption that never moves left from cell 1.
- for a right move needs and , so with , , and . Its body is the right move of .
- needs , so , and , so , and . The step is defined only if is a new name, since "create subject " is defined only then. Its body writes on cell , adds a cell holding with the head and state on it, and moves and the chain to the new cell. This is the right move of off the used part of the tape. Two choices of the new name give configurations that differ only in that name.
In each case the result encodes the next configuration of , which proves the claim. Since is a function, from each reachable configuration at most one command, with at most one choice of existing parameters, changes the state.
Leaks of . By the claim, a call that enters a right into a cell from a reachable configuration is one of the commands above, doing one move of . The only enters of a state right are "enter ", where is the new state of the move. The right is not in any cell of an encoding until enters , and . So some reachable configuration leaks if and only if , started on the empty tape, makes a move into . By the assumption on , this holds if and only if halts.
So is a computable map from machines to instances, and halts on the empty tape if and only if is unsafe for . It is a many-one reduction from the halting problem to unsafety. If SAFETY were decidable, so would be unsafety, and so the halting problem. Hence SAFETY is undecidable.
Unsafety is recursively enumerable. Enumerate the finite sequences of calls. At each step there are finitely many commands, and each parameter is an existing object or a new name; up to renaming of new names, there are finitely many choices. Run each sequence and check whether some call enters into a cell without . If is unsafe, this search stops. A set and its complement that are both recursively enumerable are decidable, so the safe instances are not recursively enumerable.
Example of one move. Take the tape with the head on cell 2 in state , as in Figure 3 of the paper. The matrix has , , , and in , and . If , only the call has a true condition and changes the matrix. After it, and : the tape is with the head on cell 1 in state .
Consequences
- No general analysis tool. A tool that checks arbitrary access control configurations for leaks must give up exactness: it can work on a restricted class, bound the search, or answer "unknown". This is why later models restrict the commands, as Take-Grant does, or fix the rules, as Bell-LaPadula does.
- One fixed system. HRU strengthen the theorem with a universal Turing machine: there is one protection system, fixed once, for which safety is undecidable as a function of the initial configuration. So the hardness is not only in the choice of commands.
- Relation to Rice's theorem. The proof has the same shape as the proof of Rice's theorem: a semantic question about all runs of a system is reduced to halting. It is not an instance of Rice's theorem, because safety is a property of a protection system and a configuration, not of the language of a Turing machine.
- The second version. If the question is whether can reach one given cell, the problem is also undecidable. The map from this version to the first in the HRU paper is not a reduction; Tripunitara and Li (2013) gave a correct one.
Tightness
The theorem cannot be extended to every restricted class, and the borders are known for several classes. All items are theorems.
- One operation per command. For mono-operational systems, safety is decidable: a shortest leaking sequence has at most calls, where . With the commands in the input, the problem is NP-complete; hardness is by a reduction from the clique problem. The proof of membership in NP in the 1976 paper assumed that these systems are monotonic for safety, which is false; Tripunitara and Li (2013) gave a corrected proof.
- No creates. Without create operations, the set of configurations is finite, and safety is PSPACE-complete (HRU, Theorem 3).
- Monotonic systems. Removing delete and destroy is not enough. Harrison and Ruzzo (1978) showed that safety stays undecidable for monotonic systems, even when each condition has at most two tests. With at most one test per condition and no delete or destroy, safety is decidable.
- The proof needs create. The commands create a subject for each new tape cell. This is necessary for undecidability, because without creates the problem is in PSPACE.
History
Harrison, Ruzzo and Ullman presented the model and the theorem at a conference in 1975 and in Communications of the ACM in 1976. The paper gave the first precise statement of the safety question for an access matrix with commands, and it gave the undecidable case, the decidable mono-operational case and the PSPACE-complete case without creates. Harrison and Ruzzo studied monotonic systems in 1978. In 2013 Tripunitara and Li reexamined the paper, found the error in the NP membership proof and in the map between the two versions of safety, and repaired both.
References
- Michael A. Harrison, Walter L. Ruzzo and Jeffrey D. Ullman, Protection in operating systems, Communications of the ACM 19(8), 1976, pages 461 to 471, Section 4 (the definition of safety, Theorem 1 and its NP-completeness), Section 5 (Theorem 2, the simulation of a Turing machine, Figures 3 and 4, and Theorem 3)
- Mahesh V. Tripunitara and Ninghui Li, The foundational work of Harrison-Ruzzo-Ullman revisited, IEEE Transactions on Dependable and Secure Computing 10(1), 2013, pages 28 to 39, the error in the NP membership proof for mono-operational systems, the corrected proof, and the new reduction for the second version of safety
- Michael A. Harrison and Walter L. Ruzzo, Monotonic protection systems, in R. A. DeMillo, D. P. Dobkin, A. K. Jones and R. J. Lipton (editors), Foundations of Secure Computation, Academic Press, 1978, undecidability for monotonic biconditional systems and decidability for monotonic monoconditional systems
- Matt Bishop, Computer Security: Art and Science, second edition, Addison-Wesley, 2018, Chapter 3, Foundational Results
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag ANB1ZW Edit this page History Report an error Markdown