Buffer Overflow Buffer overflows are typically used to spawn root shells from a process running as root. See the next question for more details. A Race Condition is when a program creates a short opportunity for evil by opening a small window of vulnerability. For example, a program that alters a sensitive file might use a temporary backup copy of the file during its alteration. If the permissions on that temporary file allow it to be edited, it might be possible to alter it before the program finishes its editing process.
Many programs create temporary files while they run.
If a program runs as root and is not careful about where it puts its temp files and what permissions these temp files have, it might be possible to use links to create root-owned files. For example, if the buffer holds 108 bytes, the hacker creates a program that sends more than 108 bytes to that buffer. By carefully crafting the extra bytes starting at byte 109, the hacker can make the program execute additional commands.