Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) (20 points) For 32-bit machine with 2kB pages: a) How many page table entries? Explain your answers in details b) If each page table

1) (20 points) For 32-bit machine with 2kB pages:

a) How many page table entries? Explain your answers in details

b) If each page table entry is 4bytes, what is the size of the page table entries? Explain your answers in details

2) (20 points) In which memory segments are the variables in the following code located? (Explain your answers in details)

int i = 0;

void func(char *str)

{

char *ptr = malloc(sizeof(int));

char buf[1024];

int j;

static int y;

}

3) (40 points) The following function is called in a privileged program. The argument str points to a string that is entirely provided by users (the size of the string is up to 300 bytes). When this function is invoked, the address of the buffer array is 0xAABB0010, while the return address is stored in 0xAABB0050. Please write down the string that you would feed into the program, so when this string is copied to buffer and when the bof() function returns, the privileged program will run your code. In your answer, you dont need to write down the injected code, but the offsets of the key elements in your string need to be correct. (Explain your answers in details)

int bof(char *str)

{

char buffer[24];

strcpy(buffer,str);

return 1;

}

4) (20 points) For the buffer_oflow program (used for Lab 4), discussed in class, if the address of the access granted was bfffcd11 and the number of A characters needed to overflow the buffer was 42,

a) Fill out this command if using System/370 Architecture (Explain your answers in details)

Python c print A + | ./buffer_oflow

b) Fill out this command if using Z180 computer architecture (Explain your answers in details)

Python c print A + | ./buffer_oflow

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

Find each limit in Problem ear - 1 lim 3x

Answered: 1 week ago

Question

Write down the circumstances in which you led.

Answered: 1 week ago