Lecture An toàn Hệ điều hành: Stack Overflows - Nguyễn Hồng Sơn

26 30 0
Lecture An toàn Hệ điều hành: Stack Overflows - Nguyễn Hồng Sơn

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Lecture An toàn Hệ điều hành: Stack Overflows has contents: Buffers, reading past the end of a buffer, writing past the end of a buffer, stacks and functions, overflowing buffers on the stack, kiểm soát EIP.

Stack Overflows Buffers • A buffer is defined as a limited, contiguously allocated set of memory • Stack overflows are possible because no inherent bounds-checking exists onbuffers in the C or C++ languages reading past the end of a buffer #include #include int main () { int array[5] = {1, 2, 3, 4, 5}; printf(“%d\n”, array[5] ); } This example shows how easy it is to read past the end of a buffer; C provides no built-in protection writing past the end of a buffer int main () { int array[5]; int i; for (i = 0; i

Ngày đăng: 08/07/2020, 11:05

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan