




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Access Control: Redirect execution to malicious code
Confidentiality: Can expose information about a program that can lead to further exploitation
Integrity: Values can be overwritten in memory
#include <stdio.h>
int main(int argc, char* argv[]) { If(argc > 1) printf(argv[1]); return 0; }
Sample input: “%x %x” Sample output: 12ffc0 4011e
Source: (Howard, LeBlanc, and Viega 19)
Luckily the problem is easy to detect and mitigate
Lexical source code scanners can detect the errors and Crispin Cowan offers FormatGuard a built in compilation tool
Right: printf(“%s,” user_input); printf(“%d,” user_input); Wrong: printf(user_input); syslog(LOG_FILE, userText);
string functions.
functions if you can.