Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False assert in _Py_DecodeUTF8_surrogateescape #72834

Closed
zhangyangyu opened this issue Nov 9, 2016 · 4 comments
Closed

False assert in _Py_DecodeUTF8_surrogateescape #72834

zhangyangyu opened this issue Nov 9, 2016 · 4 comments
Assignees
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@zhangyangyu
Copy link
Member

BPO 28648
Nosy @serhiy-storchaka, @zhangyangyu
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • false_assert.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2016-11-12.12:40:21.397>
    created_at = <Date 2016-11-09.15:42:06.205>
    labels = ['interpreter-core', '3.7', 'type-crash']
    title = 'False assert in _Py_DecodeUTF8_surrogateescape'
    updated_at = <Date 2017-03-31.16:36:19.102>
    user = 'https://github.com/zhangyangyu'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:19.102>
    actor = 'dstufft'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2016-11-12.12:40:21.397>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2016-11-09.15:42:06.205>
    creator = 'xiang.zhang'
    dependencies = []
    files = ['45408']
    hgrepos = []
    issue_num = 28648
    keywords = ['patch']
    message_count = 4.0
    messages = ['280406', '280656', '280658', '280659']
    nosy_count = 3.0
    nosy_names = ['python-dev', 'serhiy.storchaka', 'xiang.zhang']
    pr_nums = ['552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue28648'
    versions = ['Python 3.3', 'Python 3.4', 'Python 3.5', 'Python 3.6', 'Python 3.7']

    @zhangyangyu
    Copy link
    Member Author

    The assert statement assert(Py_UNICODE_IS_SURROGATE(ch)); in _Py_DecodeUTF8_surrogateescape is wrong. Code points > 0xffff could reach it and fail.

    @zhangyangyu zhangyangyu added 3.7 (EOL) end of life type-crash A hard crash of the interpreter, possibly with a core dump labels Nov 9, 2016
    @serhiy-storchaka serhiy-storchaka self-assigned this Nov 12, 2016
    @serhiy-storchaka
    Copy link
    Member

    LGTM. Thank you for your patch Xiang.

    @serhiy-storchaka serhiy-storchaka added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Nov 12, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 12, 2016

    New changeset 9bf1ca6ce1fe by Serhiy Storchaka in branch '3.3':
    Issue bpo-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 bpo-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 bpo-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 bpo-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 bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
    https://hg.python.org/cpython/rev/0b576ab589c5

    @serhiy-storchaka
    Copy link
    Member

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants