I understand what buffer overflow is. As the literature says, "A buffer overflow occurs when a fixed-length buffer reaches its capacity and a process attempts to store data above and beyond that maximum limit." So, I am accessing areas of the memory which is beyond the data area, may be I am accessing the system area. Correct me if I am wrong, please see my question 1 at the end.
Also, I find this definition, "A root buffer overflow is a buffer overflow intended to attain root privileges to a system."
Now, my questions are,
- How come a user process writes in the system area of memory? Is not the OS capable of protecting itself or its memory area? Or may be I am mistaken.
- How come a root buffer overflow causes a process to attain root privileges to a system? Because, as my knowledge goes, you need to execute commands like
sudoor some such and then provide a sacred password in order to attain this.