# Computer Security versions of the Halting Problem

I'm plenty familiar with the Halting Problem for Turing Machines. It occurred to me after reading several posts on this site that it would be interesting, educational and useful to start a list of equivalents to the Halting Problem in terms of Computer Security. I think this might help students of computer science and allied areas come to appreciate the true depth and application of the Halting Problem in whatever their application area.

So, I ask that the proposed (or actual) equivalent problem be:

(1) One that makes sense in the domain of computer security. This can be from information management, Cryptography, hacking, or programming (ideally with a security bent, since there are plenty of Halting equivalent problems already well known in the world of programming languages and compilers).

(2) One stated with a reference to literature on that subject if possible, and maybe even (although I wouldn't require it) a proof if you know of an elegant one.

Example: I have an antivirus software on my machine, and I want to know whether it will ever execute malicious code. As far as I can tell, this is the Halting problem in disguise.

What you're looking for is Rice's Theorem, which is a generalized version of Halting Undecidability.

It basically says that any property of a Turing Machine (i.e. any computer program) is undecidable, if it's a property of the behavior of the program (i.e. a property of the language it accepts/produces), as opposed to a particular syntactic feature of the implementation. This holds unless it's a trivial property (always true or always false).

For example, deciding "Does instruction X ever get executed" or "Is a high security value stored in low security memory" are all questions about program behavior.

But things like "does this program contain a for-loop" or "is this program type-correct" aren't behaviors, because there might be equivalent programs which don't have the same values for those properties. You can phrase a program with a for-loop as using while-loops without changing the behaviour, or you can make a version of a program which behaves correctly but doesn't check under your typing discipline. So these aren't properties of the behavior, they're properties of the particular implementation.

• While I accept this answer (and it is a fine explanation of Rice's theorem), I also think it would be nice to have more field-specific examples as that is what I asked for in my question. I am aware of Rice's theorem, although I hadn't reviewed that result in some time . . . I suppose the counter-argument is that Rice's theorem allows for the almost easy construction of such examples, but I would like the community to produce some anyway just so we can have a list available to practitioners. – لويس العرب Oct 11 '16 at 14:48
• You're not going to find field specific examples, because the answer to "what questions about a program's behaviour are equivalent to the halting problem" is "all of them." Every example. Every question of the form "does this program behave securely" is just the halting problem, or a (possibly harder) version of it. Anything that's not this is necessarily incomplete, such as information flow systems. The list of questions that are actually the halting problem is too long to enumerate. – jmite Oct 11 '16 at 15:45
• So I guess, from a certain perspective, all of those problems are equivalent i.e. belong to the same Turing degree? So, basically Rice's result is saying we can't distinguish between one property of a program's behavior and another (if I understand correctly). In which case, there is really no point in doing a list! – لويس العرب Oct 11 '16 at 16:10
• Yes, you can't distinguish them in terms of decidability. They'll all be of the same Turing degree, though some might be harder. The halting problem is the easiest undecidable problem! This is why most security analyses are sound but not complete i.e. there are always false positives. – jmite Oct 11 '16 at 19:41

Specifically related to security, we can cite the problem when system administrators assess the impact of an access control policy on his system's security. In the paper "Protection in operating systems" Harrison, Ruzzo, and Ullman [1] presented a formal model of "access control". A state in this system is denoted by a set of objects, some of which are subjects, and a protection matrix giving the current access rights between pairs of subjects and objects. The safety problem defined was: "Given a set of policy rules, a generic access right X and an initial matrix, is it possible to reach a state in which X is granted to any subject". This problem is undecidable, the safety problem is reducible to the halting problem for Turing machines.

[1] Harrison, M., W. Ruzzo and J. Ullman, Protection in operating systems, Communications of the ACM(1976).