Issue 28648: False assert in _Py_DecodeUTF8_surrogateescape (original) (raw)

Issue28648

Created on 2016-11-09 15:42 by xiang.zhang, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
false_assert.patch xiang.zhang,2016-11-09 15:42 review
Pull Requests
URL Status Linked Edit
PR 552 closed dstufft,2017-03-31 16:36
Messages (4)
msg280406 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-11-09 15:42
The assert statement `assert(Py_UNICODE_IS_SURROGATE(ch));` in _Py_DecodeUTF8_surrogateescape is wrong. Code points > 0xffff could reach it and fail.
msg280656 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-12 12:23
LGTM. Thank you for your patch Xiang.
msg280658 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-11-12 12:37
New changeset 9bf1ca6ce1fe by Serhiy Storchaka in branch '3.3': Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X https://hg.python.org/cpython/rev/9bf1ca6ce1fe New changeset bfd0da08438f by Serhiy Storchaka in branch '3.4': Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X https://hg.python.org/cpython/rev/bfd0da08438f New changeset 65b5518da6e2 by Serhiy Storchaka in branch '3.5': Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X https://hg.python.org/cpython/rev/65b5518da6e2 New changeset 2cbd2ec6307d by Serhiy Storchaka in branch '3.6': Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X https://hg.python.org/cpython/rev/2cbd2ec6307d New changeset 0b576ab589c5 by Serhiy Storchaka in branch 'default': Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X https://hg.python.org/cpython/rev/0b576ab589c5
msg280659 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-12 12:40
Since the crash can be caused by environment I consider it as a security issue (bot not critical) and applied the patch to 3.3 and 3.4.
History
Date User Action Args
2022-04-11 14:58:39 admin set github: 72834
2017-03-31 16:36:19 dstufft set pull_requests: + <pull%5Frequest927>
2016-11-12 12:40:21 serhiy.storchaka set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2016-11-12 12:37:38 python-dev set nosy: + python-devmessages: +
2016-11-12 12:23:57 serhiy.storchaka set messages: + components: + Interpreter Coreversions: + Python 3.3, Python 3.4
2016-11-12 12:05:19 serhiy.storchaka set assignee: serhiy.storchaka
2016-11-09 15:42:06 xiang.zhang create