[issue28962] Crash when throwing an exception with a malicious __hash__ override

2018-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was fixed in issue28603. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2018-06-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- superseder: -> traceback module can't format/print unhashable exceptions ___ Python tracker ___

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2018-03-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: -Python 3.3 ___ Python tracker ___

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2018-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems it was fixed somewhere between 3.6.3 and 3.6.5+. Traceback (most recent call last): File "baderror.py", line 10, in raise e from e __main__.BadError 3.5 is now in security-only fixes stage, and this doesn't look

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2016-12-22 Thread Xavier Combelle
Xavier Combelle added the comment: To my knowledge it is not the kind of arbitrary code which could segfault python code. It is far different for example that the fact by using bytecode magic you can segfault the interpreter, as this last case is explicitly warned in documentation.

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2016-12-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +CPython hangs on error __context__ set to the error itself ___ Python tracker

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2016-12-13 Thread Josh Rosenberg
Josh Rosenberg added the comment: Is this something that needs to be defended against? My understanding is that it's pretty easy to segfault CPython in a number of ways if you can execute 100% arbitrary code. The only way to cause this problem is if you can define malicious exceptions and

[issue28962] Crash when throwing an exception with a malicious __hash__ override

2016-12-13 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: $ cat baderror.py class BadError(Exception): def __init__(self): self.i = 0 def __hash__(self): self.i += 1 return self.i e = BadError() raise e from e $ ./python.exe -V Python 3.5.2+ $ ./python.exe baderror.py Segmentation