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

_Py_fopen_obj leaks reference on audit error #85129

Closed
tiran opened this issue Jun 12, 2020 · 5 comments
Closed

_Py_fopen_obj leaks reference on audit error #85129

tiran opened this issue Jun 12, 2020 · 5 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage

Comments

@tiran
Copy link
Member

tiran commented Jun 12, 2020

BPO 40957
Nosy @tiran, @zooba, @corona10, @miss-islington
PRs
  • bpo-40957: Fix refleak in _Py_fopen_obj() #20827
  • [3.9] bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827) #20855
  • [3.8] bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827) #20856
  • 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/tiran'
    closed_at = <Date 2020-06-13.16:19:54.600>
    created_at = <Date 2020-06-12.10:20:16.338>
    labels = ['interpreter-core', '3.8', '3.9', '3.10', 'performance']
    title = '_Py_fopen_obj leaks reference on audit error'
    updated_at = <Date 2020-06-13.16:19:54.599>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2020-06-13.16:19:54.599>
    actor = 'corona10'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2020-06-13.16:19:54.600>
    closer = 'corona10'
    components = ['Interpreter Core']
    creation = <Date 2020-06-12.10:20:16.338>
    creator = 'christian.heimes'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40957
    keywords = ['patch']
    message_count = 5.0
    messages = ['371349', '371458', '371459', '371460', '371461']
    nosy_count = 4.0
    nosy_names = ['christian.heimes', 'steve.dower', 'corona10', 'miss-islington']
    pr_nums = ['20827', '20855', '20856']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue40957'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @tiran
    Copy link
    Member Author

    tiran commented Jun 12, 2020

    Direct leak of 50 byte(s) in 1 object(s) allocated from:
    #0 0x7f429c681667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x487496 in _PyBytes_FromSize Objects/bytesobject.c:81
    #2 0x487496 in PyBytes_FromStringAndSize Objects/bytesobject.c:112
    #3 0x487496 in PyBytes_FromStringAndSize Objects/bytesobject.c:97
    #4 0x75f140 in unicode_encode_utf8 Objects/unicodeobject.c:5425
    #5 0x7f2052 in PyUnicode_EncodeFSDefault Objects/unicodeobject.c:3660
    #6 0x7f28a7 in PyUnicode_FSConverter Objects/unicodeobject.c:3947
    #7 0xab48ab in _Py_fopen_obj Python/fileutils.c:1459
    #8 0x7f428a713cc5 in _ssl__SSLContext_load_dh_params /home/heimes/dev/python/cpython/Modules/_ssl.c:4293
    #9 0xe03e0c in cfunction_vectorcall_O Objects/methodobject.c:510
    #10 0x4c166a in PyVectorcall_Call Objects/call.c:230

    @tiran tiran added 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes labels Jun 12, 2020
    @tiran tiran self-assigned this Jun 12, 2020
    @tiran tiran added interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage labels Jun 12, 2020
    @corona10
    Copy link
    Member

    New changeset 9672912 by Christian Heimes in branch 'master':
    bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827)
    9672912

    @miss-islington
    Copy link
    Contributor

    New changeset a8936fa by Miss Islington (bot) in branch '3.8':
    bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827)
    a8936fa

    @miss-islington
    Copy link
    Contributor

    New changeset c932f5c by Miss Islington (bot) in branch '3.9':
    bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827)
    c932f5c

    @corona10
    Copy link
    Member

    Thanks for the work! Christian Heimes

    @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.8 only security fixes 3.9 only security fixes 3.10 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants