Skip to content

Use after free in xmlparser_setevents (2) #68292

Closed

Description

@pkt
mannequin
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']

    Activity

    1. pkt commented on May 1, 2015

      pktmannequin
      MannequinAuthor

      # 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.

    2. added
      type-crashA hard crash of the interpreter, possibly with a core dump
      on May 1, 2015
    3. AlexLordThorsen commented on May 9, 2015

      AlexLordThorsenmannequin
      Mannequin

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

      Confirmation on 3.5.0a4 Python 3.5.0a4+

    4. pkt commented on Jul 2, 2015

      pktmannequin
      MannequinAuthor

      ping

    5. pkt commented on Jul 3, 2015

      pktmannequin
      MannequinAuthor

      ping

    6. vadmium commented on Jan 3, 2016

      @vadmium
      Member

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

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      extension-modulesC modules in the Modules dirtopic-XMLtype-crashA hard crash of the interpreter, possibly with a core dump

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions