← Back to 15. Security

πŸ“ Stack and buffer overflow

πŸ“– From Operating System β€’ 15. Security β€’ 37 questions available

Practice MCQs for Stack and buffer overflow. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.

πŸ”„ Last updated: 2026-07-27

11
Easy Questions
15
Medium Questions
11
Hard Questions

πŸ“ Sample Questions

Q1. What is a buffer overflow in the context of program memory?

πŸ”Ή A. A condition where a buffer is accessed beyond its allocated size
πŸ”Ή B. A technique to encrypt data in a buffer
πŸ”Ή C. A method for optimizing buffer allocation
πŸ”Ή D. A process that frees memory automatically

πŸ’‘ Difficulty: easy | βœ… Correct: A

Q2. In a typical 32‑bit system, how many bytes are overwritten if a function copies 260 bytes into a 256‑byte stack buffer and then returns?

πŸ”Ή A. 0 bytes
πŸ”Ή B. 4 bytes
πŸ”Ή C. 8 bytes
πŸ”Ή D. 12 bytes

πŸ’‘ Difficulty: medium | βœ… Correct: B

Q3. Which of the following best describes why stack‑based buffer overflows are particularly dangerous for privilege escalation?

πŸ”Ή A. They allow overwriting global variables
πŸ”Ή B. They enable modification of the saved return address
πŸ”Ή C. They corrupt heap metadata structures
πŸ”Ή D. They cause denial‑of‑service by crashing the program

πŸ’‘ Difficulty: hard | βœ… Correct: B

⬆️ View all questions in the quiz below

πŸ”— Related Topics

πŸ“ The Security Problem in Operating SystemπŸ“ Program Threats in Operating SystemπŸ“ Trojan horseπŸ“ Trap doorπŸ“ Logic bomb
πŸš€ Start Quiz πŸ“ Practice Mode