LinuxFocus.org: Avoiding security holes when developing an application – Part 4: format strings

Written By
FR
Frédéric Raynal
Jul 15, 2001

“With “economy” in mind, this programmer opens a
potential hole in his work. He is satisfied with passing a single
string as an argument, which he wanted simply to display without
any change. However, this string will be parsed to look for
directives of formatting (%d, %g…) . When such a format character
is discovered, the corresponding argument is looked for in the
stack.

We will start introducing the family of printf() functions. At
least, we expect everyone knows them … but not in detail, so we
will deal with the lesser known aspects of these routines. Then, we
will see how to get the necessary information to exploit such a
mistake. Finally, we will show how all this fits together with a
single example.”


Complete Story

FR

Frédéric Raynal

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.