Marc-Andre Lemburg added the comment: On 31.08.2015 10:44, Nathaniel Smith wrote: > Before anyone panics about security issues, do keep in mind that the patch > you're talking about reverting fixed a buffer overflow which I strongly suspect could be used to accomplish arbitrary code execution. > ... it lets you trigger assert checks that abort the interpreter, but AFAICT > it doesn't violate memory safety or allow arbitrary code execution.
I'm sure a buffer overflow can be fixed in other ways than allowing 42 to print out the Zen of Python when asked for a repr() ;-) And if Serhiy can sneak in an os.system('rm -rf /') into a harmless operation such as 42 + 2, I do believe we can call this arbitrary code execution, even more so, since the patch only applies to a single integer object which happens to be a singleton in CPython. The point is: Python code will generally assume that it can trust builtin types. It doesn't expect 42 + 2 to clear out the root dir, just because some package installed from PyPI happens to feel in the mood for Easter eggs :-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24912> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com