Bugzilla – Bug 950707
VUL-0: CVE-2015-5333: libressl: Memory Leak
Last modified: 2016-05-18 12:08:46 UTC
From http://seclists.org/oss-sec/2015/q4/87 [...] Memory Leak (CVE-2015-5333) [...] In order to achieve remote code execution against the vulnerabilities that we recently discovered in OpenSMTPD (CVE-2015-7687), a memory leak is needed. Because we could not find one in OpenSMTPD itself, we started to review the malloc()s and free()s of its libraries, and eventually found a memory leak in LibreSSL's OBJ_obj2txt() function; we then realized that this function also contains a buffer overflow (an off-by-one, usually stack-based). The vulnerable function OBJ_obj2txt() is reachable through X509_NAME_oneline() and d2i_X509(), which is called automatically to decode the X.509 certificates exchanged during an SSL handshake (both client-side, unless an anonymous mode is used, and server-side, if client authentication is requested). These vulnerabilities affect all LibreSSL versions, including LibreSSL 2.0.0 (the first public release) and LibreSSL 2.3.0 (the latest release at the time of writing). OpenSSL is not affected. ======================================================================== Memory Leak (CVE-2015-5333) ======================================================================== OBJ_obj2txt() converts an ASN.1 object identifier (the ASN1_OBJECT a) into a null-terminated string of numerical subidentifiers separated by dots (at most buf_len bytes are written to buf). Large subidentifiers are temporarily stored in a BIGNUM (bl) and converted by BN_bn2dec() into a printable string of decimal characters (bndec). Many such bndec strings can be malloc()ated and memory-leaked in a loop, because only the last one will be free()d, after the end of the loop: 489 int 490 OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) 491 { ... 494 char *bndec = NULL; ... 516 len = a->length; ... 519 while (len > 0) { ... 570 bndec = BN_bn2dec(bl); 571 if (!bndec) 572 goto err; 573 i = snprintf(buf, buf_len, ".%s", bndec); ... 598 } ... 601 free(bndec); ... 609 } This memory leak allows remote attackers to cause a denial of service (memory exhaustion) or trigger the buffer overflow described below. [...] References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-5333 http://seclists.org/oss-sec/2015/q4/87
OpenBSD Errata for LibreSSL 2.2.4, 2.1.8, 2.0.6 (Oct 15, 2015) for both boo#950708 and boO#950708 http://ftp.openbsd.org/pub/OpenBSD/patches/5.8/common/007_obj2txt.patch.sig
This is an autogenerated message for OBS integration: This bug (950707) was mentioned in https://build.opensuse.org/request/show/339220 13.2 / libressl
(In reply to comment #2) > https://build.opensuse.org/request/show/339220 13.2 / libressl Unfortunately, libressl is 2.3.0 affected by both bug 950707 and 950708. comment #1 references a patch that you could apply to the 2.2.1 version, possibly going for 2.2.4 + this patch for openSUSE 13.2.
This is an autogenerated message for OBS integration: This bug (950707) was mentioned in https://build.opensuse.org/request/show/339322 Factory / libressl
This is an autogenerated message for OBS integration: This bug (950707) was mentioned in https://build.opensuse.org/request/show/339338 13.2+Leap:42.1 / libressl.openSUSE_Leap_42.1+libressl
bugbot adjusting priority
Update running, thanks.
openSUSE-SU-2015:1830-1: An update that fixes two vulnerabilities is now available. Category: security (moderate) Bug References: 950707,950708 CVE References: CVE-2015-5333,CVE-2015-5334 Sources used: openSUSE 13.2 (src): libressl-2.2.1-2.6.1
All done.
openSUSE-SU-2015:1830-2: An update that fixes two vulnerabilities is now available. Category: security (moderate) Bug References: 950707,950708 CVE References: CVE-2015-5333,CVE-2015-5334 Sources used: openSUSE (src): libressl-2.3.0-3.1
openSUSE-SU-2016:1327-1: An update that solves four vulnerabilities and has two fixes is now available. Category: security (moderate) Bug References: 950707,950708,957812,957815,977584,978492 CVE References: CVE-2015-3194,CVE-2015-3195,CVE-2015-5333,CVE-2015-5334 Sources used: openSUSE 13.2 (src): libressl-2.2.7-2.13.1