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

Null pointer dereference in ndb.ndbm get when used with a default value. #76049

Closed
tmiasko mannequin opened this issue Oct 25, 2017 · 3 comments
Closed

Null pointer dereference in ndb.ndbm get when used with a default value. #76049

tmiasko mannequin opened this issue Oct 25, 2017 · 3 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@tmiasko
Copy link
Mannequin

tmiasko mannequin commented Oct 25, 2017

BPO 31868
Nosy @serhiy-storchaka, @tmiasko
Superseder
  • bpo-33383: Crash in the get() method a single argument in dbm.ndbm
  • Files
  • 0001-Fix-null-pointer-dereference-in-dbm.ndbm-get.patch: [PATCH] Fix null pointer dereference in dbm.ndbm get.
  • 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 2018-05-20.23:20:54.525>
    created_at = <Date 2017-10-25.10:25:18.892>
    labels = ['3.7', '3.8', 'type-crash']
    title = 'Null pointer dereference in ndb.ndbm get when used with a default value.'
    updated_at = <Date 2018-05-20.23:20:54.524>
    user = 'https://github.com/tmiasko'

    bugs.python.org fields:

    activity = <Date 2018-05-20.23:20:54.524>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-05-20.23:20:54.525>
    closer = 'serhiy.storchaka'
    components = []
    creation = <Date 2017-10-25.10:25:18.892>
    creator = 'tmiasko'
    dependencies = []
    files = ['47236']
    hgrepos = []
    issue_num = 31868
    keywords = ['patch']
    message_count = 3.0
    messages = ['304977', '304980', '317209']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'tmiasko']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '33383'
    type = 'crash'
    url = 'https://bugs.python.org/issue31868'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    @tmiasko
    Copy link
    Mannequin Author

    tmiasko mannequin commented Oct 25, 2017

    Using ndb.ndbm get when key is missing and default value has to be returned
    results in invocation of Py_INCREF on null pointer. Test case to reproduce the issue:

    import dbm.ndbm
    
    with dbm.ndbm.open('db', 'n') as db:
        print(db.get('missing-key'))
    

    @tmiasko tmiasko mannequin added 3.7 (EOL) end of life 3.8 only security fixes type-crash A hard crash of the interpreter, possibly with a core dump labels Oct 25, 2017
    @serhiy-storchaka
    Copy link
    Member

    Could you please create a pull request on GitHub Tomasz?

    @serhiy-storchaka
    Copy link
    Member

    I forgot about this issue and have fixed this bug in a new bpo-33383.

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

    No branches or pull requests

    1 participant