What is a format string vulnerability?
First, you need to know what a format string is. In the C programming language there are a number of functions which accept format string as arguments. These functions include fprintf, printf, sprintf, snprintf, vfprintf, vprintf, vsprintf, vsnprintf, setproctitle, syslog, and others. The most common of these is printf. The usage of printf is: printf format [arguments …] printf outputs the value of [arguments …] in the format specified by format. An example call to printf is: printf (“The area code is: %d\n”, 303); Supported format specifiers differ from one C compiler to the next. The format specifiers supported under FreeBSD are: %dConvert integer to signed decimal string. %uConvert integer to unsigned decimal string. %iConvert integer to signed decimal string; the integer may either be in decimal, in octal (with a leading 0) or in hexadecimal (with a leading 0x). %oConvert integer to unsigned octal string.