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

Integer overflow in _hashopenssl.c (CVE-2008-2316) #48136

Closed
brettcannon opened this issue Sep 17, 2008 · 11 comments
Closed

Integer overflow in _hashopenssl.c (CVE-2008-2316) #48136

brettcannon opened this issue Sep 17, 2008 · 11 comments
Labels
deferred-blocker extension-modules C modules in the Modules dir type-security A security issue

Comments

@brettcannon
Copy link
Member

BPO 3886
Nosy @loewis, @brettcannon, @gpshead, @matejcik, @benjaminp
Files
  • CVE-2008-2316-trunk.diff: Sent to PSRT
  • 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 2008-09-26.22:25:31.915>
    created_at = <Date 2008-09-17.01:01:57.653>
    labels = ['type-security', 'extension-modules', 'deferred-blocker']
    title = 'Integer overflow in _hashopenssl.c (CVE-2008-2316)'
    updated_at = <Date 2008-09-26.22:25:31.913>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2008-09-26.22:25:31.913>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-09-26.22:25:31.915>
    closer = 'benjamin.peterson'
    components = ['Extension Modules']
    creation = <Date 2008-09-17.01:01:57.653>
    creator = 'brett.cannon'
    dependencies = []
    files = ['11507']
    hgrepos = []
    issue_num = 3886
    keywords = ['patch', '64bit']
    message_count = 11.0
    messages = ['73321', '73343', '73349', '73350', '73372', '73374', '73392', '73402', '73406', '73760', '73900']
    nosy_count = 6.0
    nosy_names = ['loewis', 'brett.cannon', 'gregory.p.smith', 'schmir', 'matejcik', 'benjamin.peterson']
    pr_nums = []
    priority = 'deferred blocker'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'security'
    url = 'https://bugs.python.org/issue3886'
    versions = ['Python 3.0']

    @brettcannon
    Copy link
    Member Author

    CVE-2008-2316
    (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2316) notes that
    _hashopenssl.c has a potential integer overflow. Attached is the patch
    sent to PSRT.

    @brettcannon brettcannon added release-blocker extension-modules C modules in the Modules dir type-security A security issue labels Sep 17, 2008
    @benjaminp
    Copy link
    Contributor

    I'm ok with this patch.

    @benjaminp
    Copy link
    Contributor

    Fixed in r66496.

    @benjaminp
    Copy link
    Contributor

    Hmm. It's seems 3.0 will require a different patch. I can't get the
    merging to work...

    @schmir
    Copy link
    Mannequin

    schmir mannequin commented Sep 18, 2008

    http://bugs.python.org/issue3026 is about the same issue (with a working
    patch added 2 months ago). It's really sad that it sat there for so
    long. I could have spent that time on something else...

    (btw. my patch also made the hash functions interruptible, this is
    something you might consider).

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Sep 18, 2008

    As a security issue, the patch should also be backport to 2.5 (and 2.4
    if applicable)

    @brettcannon
    Copy link
    Member Author

    Sorry about missing your work, Ralf. In the rush to getting a fix in for
    2.6rc2 we went with the patch Apple sent to the security mailing list
    when the CVE was reported to us.

    And 2.5 has already been patched by r66497, so removing that as a
    version that needs a patch.

    @benjaminp
    Copy link
    Contributor

    hashlib doesn't exist in Python 2.4, so I'm not very worried about it. :)

    @gpshead
    Copy link
    Member

    gpshead commented Sep 18, 2008

    Python 2.4 uses an 'int' for ob_size so it does not appear at first
    glance that its sha module (what hashlib was derived from) is
    susceptible to this bug when compiled as 64-bit.

    @benjaminp
    Copy link
    Contributor

    Got 3.0 in r66615. Somebody should really test it, though.

    @benjaminp
    Copy link
    Contributor

    I'm going to close this because 2.5, 2.6, and 3.0 have been patched.
    Gregory, if you're concerned about 2.4, I think you should make a
    different 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
    deferred-blocker extension-modules C modules in the Modules dir type-security A security issue
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants