Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Race conditions are a common problem in operating system protection mechanisms. An easy example involves a Time-of-check to Time of Use (TOCTOU) race based on

Race conditions are a common problem in operating system protection mechanisms. An easy example involves a Time-of-check to Time of Use (TOCTOU) race based on Unix symbolic links, which contain a path that is resolved at access time. For example, the UNIX print utility lpr runs setuid root and has the ability to read any file on the system and send it to the printer an operation that requires root privileges. To prevent a user from printing a file she doesnt own, it checks the ownership of a file before printing it:

if (access(argv[1], R OK) != 0)

exit(1);

fd = open(argv[1], O RDONLY);

send_to_printer(fd)

a. Explain how a user can use two programs in combination with symbolic links to get lpr to print a file to which the user does not have permission to open.

b. To actually mount a practical attack, timing is critical. The attacker must make sure the second program is able to run exactly between the two system calls in the above code. How can the attacker guarantee this?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

Problem: Evaluate the integral: I - -[ze dx

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = 1- 1 dx 9

Answered: 1 week ago

Question

Describe the Indian constitution and political system.

Answered: 1 week ago

Question

=+What is the most that you should pay to complete development?

Answered: 1 week ago

Question

=+development and make the product, should you go ahead and do so?

Answered: 1 week ago