Worksheet 05: OS Security and Access Control
Worksheets are self-guided activities that reinforce lectures. They are not graded for accuracy, only for completion. Worksheets are due by the start of the next lecture via Blackboard link as a single PDF document. Be sure to properly label each question.
Questions
-
Let’s do some practice with bytes, bits, octets, and hexadecimal. For each of the numbers below, write them out in the other bases not present.
10110101
(binary)652
(base 8)0xa4
(base 16)
-
Consider a memory system with 16-bits of addressable memory as described in Figure 5.1 in the book, how many bits of storage are needed to store the base and bound values in the descriptor register?
-
The privilege bit must be set in order to update the descriptor register, and only the supervisor can change this bit. Consider again a 16-bit memory system with addressable memory. If 50% of the memory is reserved for the supervisor code, and that 50% is always in the lower half of the address space, what would the descriptor register be set to (in terms of its base and bound) for a new program that the supervisor was loading if that new program used the remainder of the 50% of memory? (You can write your answers in terms of powers of two.)
-
Still considering the system as described in Figure 5.1, explain how shared libraries are a real challenge with isolation systems with a single descriptor register?
-
Finally, still referring to Figure 5.1, describe another limitation of this system (not from the question above).
-
A more modern approach to program memory isolation leverages memory segments. For example, a program, when loaded into memory, has multiple segments that are necessary to run the program. This includes the stack, heap, code, and data. Of those, the stack and heap should be read/write, the code segment execute/read, and the data should be read-only.
Consider the 5 bit field,
RWXMF
, described on page 128 of the book. What is the bit field for stack, heap, code, and data segments? -
Of the segments of a program described above, which one can also have a
M
bit set if the program is designed to run as the supervisor? Explain why. -
Is the relationship between
UID
andPID
one-to-one, many-to-many, one-to-many, or many-to-one. Explain.- one-to-one: exactly one UID maps to one PID and that PID only matches to that UID
- many-to-many: many UIDs can match to many, different PIDs and many, different PIDs can match to many PIDs
- one-to-many: one UID can match to many, different PIDs
- many-to-one: Many UIDs can match to the same PID
-
What is a security kernel and what properties should it have? How does it compare to modern OS kernels, like UNIX/Linux?
-
Consider access control matrices – explain how managing this doesn’t scale, and what the solution would?
-
Convert the following ACM to ACLs by enumerate the ACE per object.
foo bar baz bee bop ----------------------------------- peter | RW X paul | RW X R R mary | RW george | X RW R ringo | john | RWX RWX
-
Consider the following
/etc/password
entry.aaviv:2212:2302:Adam Aviv:/home/aaviv:/bin/bash
For each item in the entry, label it’s meaning.
Note that modern
/etc/password
entries do not store passwords, that’s stored in/etc/shadow
-
Provide an example where user groups are useful for controlling access?
-
What is the UID of the root user?
-
The file permission bit field consists of 12 bits. Provide a short description of them.
-
Convert the following octal permission representation to a symbolic display, or vice versa
600 -rw-rw---x drwx--xr-x 574
-
The
umask
or (“unset mask”) is way to set a system wide (or user level) default file creation permission setting. What permission would newly created files have if theumask
(in octal) were as follows and the initial file creation default is 666377 166 000
-
Provide a short description of the
setuid
andsetgid
protective bits and what happens when an executable has it set -
What is the differences between
rUID
andeUID
of a running process?