Skip to content

Incorrect argument parsing in _ssl #68063

Closed

Description

@serhiy-storchaka
BPO 23875
Nosy @pitrou, @giampaolo, @tiran, @benjaminp, @alex, @serhiy-storchaka, @dstufft

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-04-06.17:06:45.667>
created_at = <Date 2015-04-06.12:01:52.006>
labels = ['extension-modules', 'type-bug']
title = 'Incorrect argument parsing in _ssl'
updated_at = <Date 2015-04-06.17:06:45.665>
user = 'https://github.com/serhiy-storchaka'

bugs.python.org fields:

activity = <Date 2015-04-06.17:06:45.665>
actor = 'python-dev'
assignee = 'none'
closed = True
closed_date = <Date 2015-04-06.17:06:45.667>
closer = 'python-dev'
components = ['Extension Modules']
creation = <Date 2015-04-06.12:01:52.006>
creator = 'serhiy.storchaka'
dependencies = []
files = []
hgrepos = []
issue_num = 23875
keywords = []
message_count = 3.0
messages = ['240151', '240162', '240163']
nosy_count = 9.0
nosy_names = ['janssen', 'pitrou', 'giampaolo.rodola', 'christian.heimes', 'benjamin.peterson', 'alex', 'python-dev', 'serhiy.storchaka', 'dstufft']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue23875'
versions = ['Python 3.5']

Activity

  1. serhiy-storchaka commented on Apr 6, 2015

    @serhiy-storchaka
    MemberAuthor

    Argument parsing code for functions _ssl.enum_certificates() and _ssl.enum_crls() look not correct.

        if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|s:enum_certificates",
                                         kwlist, &store_name)) {
            return NULL;
        }

    The format contains codes for two string arguments. But only one address (&store_name) is passed. And kwlist contains only one member, "store_name".

    These functions are provided only on Windows, so I can't check what happen if call them with two string arguments. May be crash or memory corruption.

  2. benjaminp commented on Apr 6, 2015

    @benjaminp
    Contributor

    Good catch.

  3. python-dev commented on Apr 6, 2015

    python-devmannequin
    Mannequin

    New changeset e0ba8d3bed7e by Benjamin Peterson in branch '3.4':
    remove extra arguments in arg parsing format codes (closes bpo-23875)
    https://hg.python.org/cpython/rev/e0ba8d3bed7e

    New changeset 5f27e13faae2 by Benjamin Peterson in branch '2.7':
    remove extra arguments in arg parsing format codes (closes bpo-23875)
    https://hg.python.org/cpython/rev/5f27e13faae2

    New changeset c9b9fb86d3fa by Benjamin Peterson in branch 'default':
    merge 3.4 (bpo-23875)
    https://hg.python.org/cpython/rev/c9b9fb86d3fa

  4. 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 dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions