John Leitch added the comment:

When I get a bit of slackspace (probably tomorrow afternoon/evening) I can test 
on the spectrum of versions to confirm the issue is in >= 3.2. I'll also look 
into improving our automation so all future reports can have the appropriate 
versions flagged.

Regarding untrusted format strings, I believe you are mistaken. In native 
applications, untrusted format strings are problematic because an attacker can 
use injected tokens to read/write arbitrary memory, which can be leveraged to 
attain code execution.

However, in the context of Python, a format string with too many tokens should 
be handled safely, resulting in a Python exception rather than exploitable 
memory corruption. This is the behavior observed in format string handling 
throughout Python (and indeed most managed/scripting languages). Yes, in most 
Python programs format strings will be constants, and using dynamically 
constructed format strings may be considered a bad practice. But, should a 
developer choose to pass a dynamically constructed string (for example, 
functionality that allows untrusted users to specify custom time formatting), 
it's not unreasonable for them to expect memory safety to be maintained.

Of course, if there's a risk I'm overlooking I'd like to better understand it, 
and the relevant Python documentation should be updated.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24917>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to