ISC2 Certified Secure Software Lifecycle Professional (CSSLP) Practice Question
Your team maintains a C++ microservice compiled with GCC using the command g++ -O2 -static. To strengthen security during the build process and make the program automatically abort if a stack buffer overflow overwrites the return address, which additional compiler switch should be mandated?
The -fstack-protector-strong switch tells GCC to insert stack canaries before a function returns. When a buffer overflow overwrites the canary value, the runtime check fails and the process is terminated, preventing the attacker from gaining control of execution.
-fomit-frame-pointer only omits the frame pointer to optimize performance and does not provide memory-safety checks.
-s strips symbol tables and debugging information from the output binary; it reduces size but offers no runtime protection.
-fno-exceptions disables C++ exception handling and likewise offers no protection against memory corruption. Therefore, only -fstack-protector-strong directly mitigates stack-based buffer overflows at compile time.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a stack buffer overflow?
Open an interactive chat with Bash
How does `-fstack-protector-strong` differ from `-fstack-protector`?
Open an interactive chat with Bash
Why doesn't `-s` or `-fomit-frame-pointer` provide security against stack buffer overflows?
Open an interactive chat with Bash
What is a stack canary in the context of security?
Open an interactive chat with Bash
How does the `-fstack-protector-strong` option differ from `-fstack-protector`?
Open an interactive chat with Bash
Why don't the other compiler switches like `-fomit-frame-pointer`, `-s`, or `-fno-exceptions` enhance security?
Open an interactive chat with Bash
ISC2 Certified Secure Software Lifecycle Professional (CSSLP)
Secure Software Implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .