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 Element.extend (2) #68280

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

Use after free in Element.extend (2) #68280

pkt mannequin opened this issue May 1, 2015 · 2 comments
Labels
extension-modules C modules in the Modules dir 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 24092
Nosy @scoder, @tiran, @serhiy-storchaka
Superseder
  • bpo-24091: Use after free in Element.extend (1)
  • Files
  • poc_elt_extend2.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 2015-05-02.20:36:25.002>
    created_at = <Date 2015-05-01.13:57:05.361>
    labels = ['extension-modules', 'type-crash']
    title = 'Use after free in Element.extend (2)'
    updated_at = <Date 2015-05-03.06:43:54.841>
    user = 'https://bugs.python.org/pkt'

    bugs.python.org fields:

    activity = <Date 2015-05-03.06:43:54.841>
    actor = 'Arfrever'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-05-02.20:36:25.002>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2015-05-01.13:57:05.361>
    creator = 'pkt'
    dependencies = []
    files = ['39241']
    hgrepos = []
    issue_num = 24092
    keywords = []
    message_count = 2.0
    messages = ['242306', '242431']
    nosy_count = 6.0
    nosy_names = ['scoder', 'christian.heimes', 'Arfrever', 'eli.bendersky', 'serhiy.storchaka', 'pkt']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '24091'
    type = 'crash'
    url = 'https://bugs.python.org/issue24092'
    versions = ['Python 3.4', 'Python 3.5']

    @pkt
    Copy link
    Mannequin Author

    pkt mannequin commented May 1, 2015

    # Program received signal SIGSEGV, Segmentation fault.
    # 0x4063cf19 in element_extend (self=0x405ddf74, args=([],)) at /home/p/Python-3.4.1/Modules/elementtree.c:1056
    \bpo-1056 PyObject* element = PySequence_Fast_GET_ITEM(seq, i);
    # (gdb) print i
    # $3 = 1337
    # (gdb) print *(PyListObject*)seq
    # $4 = {ob_base = {ob_base = {ob_next = 0x406373ec, _ob_prev = 0x405ddf74, ob_refcnt = 3, ob_type = 0x830e1c0 <PyList_Type>},
    # ob_size = 0}, ob_item = 0x0, allocated = 0}
    #
    # Controlled read (resulting from a use after free). "seq" is cleared in a custom
    # destructor (Y.__del
    ()).

    @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
    @serhiy-storchaka
    Copy link
    Member

    The patch for bpo-24091 fixes this issue.

    @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 type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants