General Instructions. You are expected to work alone on this assignment.
Due Thursday, March 17, 5pm. No late assignments will be accepted.
Submit your solution using CMS. Prepare your solution as .doc, .docx, or .pdf, as follows:
The security policy noninterference for confidentiality can be informally stated as,
"Changes in secret inputs do not cause changes in public outputs."
(In lecture, we referred to this policy simply as noninterference.) Do the following systems satisfy this policy? Argue why or why not. Your interpretation of this informal condition may affect your answer, so the clarity and precision of your rationale is important. You may assume that covert channels (e.g., timing and termination) are unobservable; or equivalently, that these channels are allowed to leak information. All systems have four channels: SI (secret in), SO (secret out), PI (public in), PO (public out).
x
) = τ" as a premise (i.e.,
an assumption). Suppose we replaced that premise with
"Γ ⊢ x
: τ exp", so that the resulting
rule were:
Γ ⊢ x : τ exp Γ ⊢ e : τ exp |
|
Γ ⊢ x:=e : τ cmd |
In class, we built a type system that enforced noninterference for confidentiality. The programming language we used was very simple. Suppose we add heap-allocated arrays (as in Java) to that language. So, we may have assignment statements of the following forms:
a[i] := j; j := a[i]; a := b;
In the final statement above, a and b are
both arrays. The effect of the statement is to cause both
a and b to refer to the same array on the heap;
that is, the array is aliased by a and b. Thus,
if "a := b; b[j] := i;
" is executed, then both
a[j]
and b[j]
will be equal to
i
. Assume throughout this problem
that all array indices are always within
bounds.
Examine the following three statements. Explain which
statements satisfy noninterference, which don't, and why. Variables
c
, d
, e
, and
f
are arrays; m
, n
,
o
, and p
are integers.
Assume that typing context Γ assigns types to variables as follows:
Γ(c
) = Γ(f
) = Γ(p
) = S,
and Γ(d
) = Γ(e
) = Γ(m
)
= Γ(n
) = Γ(o
) = P, where S denotes
secret and P denotes public.
c[m] := n;
o := d[p];
e := f;
Suppose we add arrays to our programming language.
We now allow expressions to include array element selection a[e]
,
and we allow assignment to array elements, as in a[e1] := e2
.
The three rules given below are perhaps the most obvious type system rules we
could use to type check information flow for arrays.
The first rule shows how to type check array element selection expressions.
The second rule is our standard assignment rule, unchanged. But note that
expression e
could now include array element selection.
Also note that variables may now be arrays or scalars (i.e., non-arrays).
In the second rule, x
may be either an array variable or a scalar
variable, but (of course) it may not be an array element selection.
The third rule shows how to type check assignment to array elements. In
it, a
must be an array.
Γ(a ) = τ
Γ ⊢ e : τ exp
|
Γ(x ) = τ
Γ ⊢ e : τ exp
|
Γ(a ) = τ
Γ ⊢ e1 : τ exp
Γ ⊢ e2 : τ exp
|
||
|
|
|
||
Γ ⊢ a[e] : τ exp
|
Γ ⊢ x := e : τ cmd
|
Γ ⊢ a[e1] := e2 : τ cmd
|
Unfortunately, these rules do not enforce noninterference. Exhibit an example program and argue that it satisfies the rules yet does not satisfy noninterference. Your program must leak information through overt, not covert, channels.
The security policy noninterference for integrity can be informally stated as,
"Changes in untrusted inputs do not cause changes in trusted outputs."
Intuitively, untrusted (i.e., tainted) information should not be allowed to corrupt trusted (i.e., untainted) information.
Examine the following statements.
Explain which statements
satisfy noninterference for integrity, which don't, and why.
A security type τ can now be either T, for Trusted, or U,
for Untrusted.
Assume that typing context Γ assigns types to variables as follows:
Γ(x
) = Γ(y
) = T,
and Γ(v
) = Γ(z
) = U.
x := y + z;
v := y + z;
if (x) then y :=
x; else v := z;
if (v) then y :=
x; else v := z;
We will now reformulate the type system from lecture, which enforced only noninterference for confidentiality, to make it enforce both noninterference for confidentiality and noninterference for integrity.
x
) = (S,T), then variable
x
contains
information that is both secret and trusted.
Define the ≤ relation for these extended security
labels. τ1 ≤ τ2 should hold if and only
if information at level τ1 is allowed to flow to level
τ2.