In this reading you will be introduced to the concept of buffer overflow, which is commonly used by hackers to hijack control of a computer. In addition to learning about how buffer overflows work, you will learn about some mechanisms used for avoiding them.
Note that the term “buffer” is generally used as a synonym for an array, so buffer overflow can be thought of as “array overflow.”
Sections 3.10.3 to 3.10.4 (pp. 279-290) from the course textbook.
Each student will be responsible for learning and demonstrating proficiency in the following objectives PRIOR to the class meeting. The reading quiz will test these objectives.
gets
function can lead to buggy, insecure code.The following objectives should be mastered by each student DURING and FOLLOWING the class session through active work and practice.
gets
, list how many bytes of data would need to be entered to corrupt a specific location on the stack.These exercises are geared towards mastering the BASIC learning objectives listed above. You are expected to submit them before class and it is highly recommended that you complete them before attempting the reading quiz.
Part A: Why is use of the gets
function dangerous?
Part B: What alternative do we have to using gets
? How does this alternative overcome the limitations of gets
?
In your own words, how does a canary value help solve the problem of buffer overflow?