<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<id>https://www.tortall.net/mu/blog/2005/11/30/python_format_string_vulnerabilities_1</id>
<title>Comments on Python format string vulnerabilities (1)</title>
<updated>2005-12-15T23:24:38Z</updated>
<link rel="alternate" type="text/html" href="https://www.tortall.net/mu/blog/2005/11/30/python_format_string_vulnerabilities_1"/>
<author><name>Michael Urman</name><uri>https://www.tortall.net/mu</uri></author>

<entry>
<title>Re: Python format string vulnerabilities (1)</title>
<link rel="alternate" type="text/html" href="https://www.tortall.net/mu/blog/2005/11/30/python_format_string_vulnerabilities_1#comment-0"/>
<author>
  <name>Joe Wreschnig</name>
</author>
<id>https://www.tortall.net/mu/blog/2005/11/30/python_format_string_vulnerabilities_1#comment-0</id>
<published>2005-11-30T19:23:38Z</published>
<content type="text/html" mode="escaped"><![CDATA[<p>
Actually, there are two things called "format string vulnerabilities".
The first is trusting user input to be part of the format string itself,
the classic printf(input, ...). Python's not vulnerable to that because
you get a ValueError rather than stack corruption.
</p>
<p>
The second kind is not properly sanitizing input for things like
os.system("ls %s" % input), which is still a problem in any language.
</p>
<p>
You've discovered a third kind, which probably only languages like
Python are "vulnerable" to - I don't doubt someone could create memory
corruption though misuse of this, if Python had fewer sanity checks on
the C end.
</p>
]]></content>
</entry>
<entry>
<title>Re: Python format string vulnerabilities (1)</title>
<link rel="alternate" type="text/html" href="https://www.tortall.net/mu/blog/2005/11/30/python_format_string_vulnerabilities_1#comment-1"/>
<author>
  <name>Michael Urman</name>
<url>http://www.tortall.net/mu/blog/</url>
</author>
<id>https://www.tortall.net/mu/blog/2005/11/30/python_format_string_vulnerabilities_1#comment-1</id>
<published>2005-11-30T19:23:38Z</published>
<content type="text/html" mode="escaped"><![CDATA[<p>
The separation of format and print methods is more important to Python's
limited vulnerability to the first. If the base print had the formatting
built in, we'd see a lot more ValueErrors.
</p>
]]></content>
</entry>
</feed>
