Safe Kernel Extensions Without Run-Time Checking, OSDI 1996
Consider Filter 1 as described in Section 3: it accepts all IPv4 packets,
where the bytes at offsets 12 and 13 are 0x08
and 0x00
, respectively.
The program uses a few instructions not described in the paper:
lda r, n(zero)
: r <- n
(load immediate n
into register r
)extwl rs, n, rd
: rd <- (rs >> n) & 0xffff
(right-shift rs
by n
bytes, extract lower two bytes, and store into rd
)cmpeq rs, n, rd
: rd <- (rs == n) ? 1 : 0
(store 1 in rd
if rs
equals n
, 0 otherwise)What’s the verification condition VC0 for the beginning of the program? Does the precondition Pre (given in Section 3) imply VC0? Briefly describe why or why not.
Suppose a malicious user modifies Filter 1 by adding
an stq
instruction that attempts to write an arbitrary memory address (say 0xdeadbeef
).
How exactly does PCC prevent this memory write?
What’s the trusted computing base for the kernel to run a PCC binary? In other words, what components in the kernel are assumed to be correct?
Provide a list of questions you would like to discuss in class. Feel free to provide any comments on the paper and related topics (e.g., which parts you like and which parts you find confusing).
For example, compared other approaches for running untrusted code in the kernel, such as SFI and domain-specific languages in exokernels, what are the advantages and disadvantages of PCC?