classification
Title: False assert in _Py_DecodeUTF8_surrogateescape
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.7, Python 3.6, Python 3.3, Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: python-dev, serhiy.storchaka, xiang.zhang
Priority: normal Keywords: patch

Created on 2016-11-09 15:42 by xiang.zhang, last changed 2017-03-31 16:36 by dstufft. 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
2017-03-31 16:36:19dstufftsetpull_requests: + pull_request927
2016-11-12 12:40:21serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg280659

stage: patch review -> resolved
2016-11-12 12:37:38python-devsetnosy: + python-dev
messages: + msg280658
2016-11-12 12:23:57serhiy.storchakasetmessages: + msg280656
components: + Interpreter Core
versions: + Python 3.3, Python 3.4
2016-11-12 12:05:19serhiy.storchakasetassignee: serhiy.storchaka
2016-11-09 15:42:06xiang.zhangcreate