Skip to content

Which of the following is an effective mitigation against buffer-overflow vulnerabilities?

Answer

Enabling stack canaries

Explanation

### Why this is right - Size checks help prevent writes beyond a buffer's capacity. - Memory-safe languages reduce opportunities for unsafe memory access. - Stack canaries can reveal some overwrites before a return address is used. ### The concept Mitigations can prevent the error, reduce its likelihood, or detect an overwrite. They do not make arbitrary input safe by default. Careful implementation remains necessary. ### The other options - **Trust all user-supplied lengths**: unsafe because an attacker can provide oversized values. - **Disable all auditing**: unrelated to memory bounds and removes useful records. ### Terms - **Memory-safe language**: a language that limits or manages unsafe memory operations. - **Stack canary**: a marker used to detect certain stack-memory overwrites. ### Remember Check sizes, reduce unsafe memory access, and detect overwrites.

Related Questions

Want to practice more questions like this?

Join myBenkio free and practice past questions for your Nigerian university courses with AI explanations for every answer.

Start Practicing Free