Bug 1271165
Summary: | m2crypto: pbkdf2 function crashes when given 74 byte result as argument | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Adam Mariš <amaris> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | abaron, aortega, apevec, ayoung, bkearney, cbillett, chrisw, dallan, gholms, gkotton, gmollett, jmatthew, jrusnack, jschluet, katello-bugs, kseifried, lhh, lpeer, markmc, mcepl, mitr, rbryant, rhos-maint, sclewis, tdecacqu, tomckay, tsanders, yeylon |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-30 19:11:29 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1276630 | ||
Bug Blocks: | 1271166 |
Description
Adam Mariš
2015-10-13 10:03:05 UTC
The root cause is a stack-based buffer overflow in the pkcs5_pbkdf2_hmac_sha1() function in SWIG/_evp.i It defines the following stack-based buffer: unsigned char key[EVP_MAX_KEY_LENGTH]; // usually 64byte and later calls this function, which takes in "keylen" and fills "key". if "keylen" is larger than EVP_MAX_KEY_LENGTH, it overflows the stack-based buffer. PKCS5_PBKDF2_HMAC_SHA1(passbuf, passlen, saltbuf, saltlen, iter, keylen, key); A simple sanity check of keylen (both that it's not larger than EVP_MAX_KEY_LENGTH and not negative) before calling PKCS5_PBKDF2_HMAC_SHA1 should be enough to prevent this. This function should be protected by stack canaries, so code execution is mitigated, but there may be a minimal remaining risk that it's still possible. *** Bug 1270318 has been marked as a duplicate of this bug. *** Created m2crypto tracking bugs for this issue: Affects: fedora-all [bug 1276630] m2crypto-0.22.5-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. m2crypto-0.22.5-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. m2crypto-0.22.5-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. This has been fixed, right? |