diff options
author | Aric Belsito <lluixhi@gmail.com> | 2015-10-16 17:28:21 -0700 |
---|---|---|
committer | Aric Belsito <lluixhi@gmail.com> | 2015-10-16 17:28:21 -0700 |
commit | 9ebb9135d8e8f864dd9504cb0cc777c67a74a53b (patch) | |
tree | 450e57443b3cba5a517d4401ba3bcb2ac2db6993 /dev-libs | |
parent | net-wireless/wpa_supplicant: use pushd/popd instead of cd (diff) | |
download | libressl-9ebb9135d8e8f864dd9504cb0cc777c67a74a53b.tar.gz libressl-9ebb9135d8e8f864dd9504cb0cc777c67a74a53b.tar.bz2 libressl-9ebb9135d8e8f864dd9504cb0cc777c67a74a53b.zip |
Add Patch to LibreSSL 2.3.0 for vuln fixed in LibreSSL 2.2.4.
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/libressl/files/libressl-2.3.0-buffer-overrun.patch | 51 | ||||
-rw-r--r-- | dev-libs/libressl/libressl-2.3.0-r1.ebuild (renamed from dev-libs/libressl/libressl-2.3.0.ebuild) | 2 |
2 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/libressl/files/libressl-2.3.0-buffer-overrun.patch b/dev-libs/libressl/files/libressl-2.3.0-buffer-overrun.patch new file mode 100644 index 0000000..f570f9d --- /dev/null +++ b/dev-libs/libressl/files/libressl-2.3.0-buffer-overrun.patch @@ -0,0 +1,51 @@ +diff -Naurw libressl-2.3.0.orig/crypto/objects/obj_dat.c libressl-2.3.0/crypto/objects/obj_dat.c +--- libressl-2.3.0.orig/crypto/objects/obj_dat.c 2014-12-06 15:15:50.000000000 -0800 ++++ libressl-2.3.0/crypto/objects/obj_dat.c 2015-10-16 17:18:54.534556199 -0700 +@@ -491,7 +491,6 @@ + { + int i, ret = 0, len, nid, first = 1, use_bn; + BIGNUM *bl = NULL; +- char *bndec = NULL; + unsigned long l; + const unsigned char *p; + +@@ -567,14 +566,16 @@ + } + + if (use_bn) { ++ char *bndec; ++ + bndec = BN_bn2dec(bl); + if (!bndec) + goto err; + i = snprintf(buf, buf_len, ".%s", bndec); ++ free(bndec); + if (i == -1) + goto err; + if (i >= buf_len) { +- buf += buf_len; + buf_len = 0; + } else { + buf += i; +@@ -586,7 +587,6 @@ + if (i == -1) + goto err; + if (i >= buf_len) { +- buf += buf_len; + buf_len = 0; + } else { + buf += i; +@@ -598,13 +598,11 @@ + } + + out: +- free(bndec); + BN_free(bl); + return ret; + + err: + ret = 0; +- buf[0] = '\0'; + goto out; + } + diff --git a/dev-libs/libressl/libressl-2.3.0.ebuild b/dev-libs/libressl/libressl-2.3.0-r1.ebuild index 57ab3b8..6ed1d0e 100644 --- a/dev-libs/libressl/libressl-2.3.0.ebuild +++ b/dev-libs/libressl/libressl-2.3.0-r1.ebuild @@ -18,6 +18,8 @@ IUSE="+asm static-libs" PDEPEND="app-misc/ca-certificates" src_prepare() { + epatch "${FILESDIR}"/${P}-buffer-overrun.patch + # Fix for MUSL epatch "${FILESDIR}"/${P}-musl.patch |