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

Use after free in xmlparser_setevents (2) #68292

Closed
pkt mannequin opened this issue May 1, 2015 · 5 comments
Closed

Use after free in xmlparser_setevents (2) #68292

pkt mannequin opened this issue May 1, 2015 · 5 comments
Labels
extension-modules C modules in the Modules dir topic-XML type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@pkt
Copy link
Mannequin

pkt mannequin commented May 1, 2015

BPO 24104
Nosy @tiran, @vadmium, @serhiy-storchaka
Superseder
  • bpo-24103: Use after free in xmlparser_setevents (1)
  • Files
  • poc_xml_setevents2.py
  • 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 = None
    closed_at = <Date 2016-01-03.06:22:14.911>
    created_at = <Date 2015-05-01.14:15:42.887>
    labels = ['extension-modules', 'expert-XML', 'type-crash']
    title = 'Use after free in xmlparser_setevents (2)'
    updated_at = <Date 2016-01-03.06:22:14.910>
    user = 'https://bugs.python.org/pkt'

    bugs.python.org fields:

    activity = <Date 2016-01-03.06:22:14.910>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-01-03.06:22:14.911>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules', 'XML']
    creation = <Date 2015-05-01.14:15:42.887>
    creator = 'pkt'
    dependencies = []
    files = ['39255']
    hgrepos = []
    issue_num = 24104
    keywords = []
    message_count = 5.0
    messages = ['242321', '242839', '246067', '246146', '257389']
    nosy_count = 6.0
    nosy_names = ['christian.heimes', 'Arfrever', 'martin.panter', 'serhiy.storchaka', 'Alex.LordThorsen', 'pkt']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '24103'
    type = 'crash'
    url = 'https://bugs.python.org/issue24104'
    versions = ['Python 3.4', 'Python 3.5']

    @pkt
    Copy link
    Mannequin Author

    pkt mannequin commented May 1, 2015

    # Program received signal SIGSEGV, Segmentation fault.
    # 0x4068565c in xmlparser_setevents (self=0x4064b13c, args=([], [<S2 at remote 0x4064b0e4>]))
    # at /home/p/Python-3.4.1/Modules/_elementtree.c:3562
    \bpo-3562 if (PyUnicode_Check(event_name_obj)) {
    # (gdb) print *event_name_obj
    # $6 = {_ob_next = 0xdbdbdbdb, _ob_prev = 0xdbdbdbdb, ob_refcnt = -606348325, ob_type = 0xdbdbdbdb}
    #
    #
    # "event_name_obj" is deleted inside a custom destructor. Use after free.

    @pkt pkt mannequin added the type-crash A hard crash of the interpreter, possibly with a core dump label May 1, 2015
    @tiran tiran added the extension-modules C modules in the Modules dir label May 1, 2015
    @AlexLordThorsen
    Copy link
    Mannequin

    AlexLordThorsen mannequin commented May 9, 2015

    ../cpython/python.exe test_xmlparser_setevents.py
    __del__ 1
    __del__ 3
    Segmentation fault: 11

    Confirmation on 3.5.0a4 Python 3.5.0a4+

    @pkt
    Copy link
    Mannequin Author

    pkt mannequin commented Jul 2, 2015

    ping

    1 similar comment
    @pkt
    Copy link
    Mannequin Author

    pkt mannequin commented Jul 3, 2015

    ping

    @vadmium
    Copy link
    Member

    vadmium commented Jan 3, 2016

    Serhiy, you mentioned your bpo-24103 patch also fixes this. Should we close this one now as well, or is there more to do?

    @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
    extension-modules C modules in the Modules dir topic-XML type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants