Compare commits

...

7 Commits

Author SHA1 Message Date
Peter Korsgaard
9f0610c188 Update for 2015.11.1
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-12-05 23:05:32 +01:00
Gustavo Zacarias
c76f557eef libpng: security bump to version 1.6.20
Fixes:
CVE-2015-8126 - incorrect implementation of png_set_PLTE() that uses
png_ptr not info_ptr, that left png_set_PLTE() open to this vuln.

(fix in previous release was incomplete)

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 371e2f7f3c)
2015-12-04 22:02:01 +01:00
Gustavo Zacarias
c0c568ddd6 openssl: security bump to version 1.0.2e
Fixes:
CVE-2015-3193 - BN_mod_exp may produce incorrect results on x86_64
CVE-2015-3194 - Certificate verify crash with missing PSS parameter
CVE-2015-3195 - X509_ATTRIBUTE memory leak

Enable IDEA as well since otherwise the build breaks (always great
upstream) - it's no longer patent encumbered.

[Peter: correct sha256]
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

(cherry picked from commit e9fb14ecef)
2015-12-04 22:01:15 +01:00
Gustavo Zacarias
45c566ea5d dropbear: bump to version 2015.71
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit c2505381d0)
2015-12-04 21:59:54 +01:00
Arnout Vandecappelle (Essensium/Mind)
be26df751b busybox: add another upstream patch to fix (g)unzip
0002-unzip.patch was added in 69516e0 to fix a segmentation fault in the
gunzip applet.  However, it introduced a new issue that made the unzipping
of some files fail.

Add an upstream patch that fixes this new issue.

Fixes #8501.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Jason Rush <rush0033@hotmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 63fdab6b4f)
2015-12-03 00:02:02 +01:00
Yann E. MORIN
fa047bb052 package/gawk: do not use readeline or mpfr in host variant
gawk has an optional dependency on mpfr (and thus gmp) and readline,
and will probe for them. If they are present, they are used; if they
are missing, that's not an error. mpfr (and gmp) is used for "BIGNUM"
support on gawk; readline is used by the gawk debugger.

However, mpfr (bringing gmp) are also host-packages in Buildroot, but in
the standard build order (i.e. a plain 'make'), they are built after
gawk. Ditto readline (from ncurses).

If the user has the development files for gmp and mpfr, then gawk is
linked to them. Ditto readline.

Now, further on in the build, we build gmp and mpfr (for gcci or guile),
so we install them in the host dir. Ditto readline (for gdb, ncurses
itself and a few other packages...)

But because we forcibly set an RPATH tag on all our host binaries, our
host gawk will now dynamically link with our versions, when it was in
fact built against the host ones.

This did not seem to cause any harm so far, but is far from ideal.

Since we do not really need BIGNUM or the debugger in our host gawk, we
just forcibly disable them and configure gawk without readline or mpfr
(there's no switch for gmp, but it's not a direct dependency, it comes
just with mpfr).

[Adjust comment as suggested by Thomas/Yann]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

(cherry picked from commit fc08a57305)
2015-12-03 00:01:52 +01:00
Yann E. MORIN
0da6f8f518 support/check-host-rpath: remove trailing '/' in host dir
Despite the comment saying so, the trailing '/' in the host directory is
not removed. Note however that it is properly removed from extracted
RPATH tags.

This is not visible when the host directory is our default $(O)/host
location, but breaks for user-supplied external host directory, when
the user leaves a trailing slash in the path.

Fix that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit f42e262199)
2015-12-03 00:01:31 +01:00
11 changed files with 158 additions and 13 deletions

10
CHANGES
View File

@@ -1,3 +1,13 @@
2015.11.1, Released December 5th, 2015
Fix for issue with the host package RPATH check when a custom host
directory (BR2_HOST_DIR=/path/to/somewhere) is used.
Important (and/or security related) bugfixes for busybox,
dropbear, libpng and openssl.
Updated/fixed packages: busybox, dropbear, gawk, libpng, openssl
2015.11, Released November 30th, 2015
Minor fixes.

View File

@@ -41,7 +41,7 @@ else # umask
all:
# Set and export the version string
export BR2_VERSION := 2015.11
export BR2_VERSION := 2015.11.1
# Save running make version since it's clobbered by the make package
RUNNING_MAKE_VERSION := $(MAKE_VERSION)

View File

@@ -0,0 +1,134 @@
From 6bd3fff51aa74e2ee2d87887b12182a3b09792ef Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Fri, 30 Oct 2015 23:41:53 +0100
Subject: [PATCH] [g]unzip: fix recent breakage.
Also, do emit error message we so painstakingly pass from gzip internals
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
testsuite/unzip.tests | 1 +
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
index 30bf451..20e4d9a 100644
--- a/archival/libarchive/decompress_gunzip.c
+++ b/archival/libarchive/decompress_gunzip.c
@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
huft_t *q; /* points to current table */
huft_t r; /* table entry for structure assignment */
huft_t *u[BMAX]; /* table stack */
- unsigned v[N_MAX]; /* values in order of bit length */
- unsigned v_end;
+ unsigned v[N_MAX + 1]; /* values in order of bit length. last v[] is never used */
int ws[BMAX + 1]; /* bits decoded stack */
int w; /* bits decoded */
unsigned x[BMAX + 1]; /* bit offsets, then code stack */
@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
*xp++ = j;
}
- /* Make a table of values in order of bit lengths */
+ /* Make a table of values in order of bit lengths.
+ * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
+ * In particular, last v[i] is never filled and must not be accessed.
+ */
+ memset(v, 0xff, sizeof(v));
p = b;
i = 0;
- v_end = 0;
do {
j = *p++;
if (j != 0) {
v[x[j]++] = i;
- v_end = x[j];
}
} while (++i < n);
@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
/* set up table entry in r */
r.b = (unsigned char) (k - w);
- if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
+ if (/*p >= v + n || -- redundant, caught by the second check: */
+ *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
+ ) {
r.e = 99; /* out of values--invalid code */
} else if (*p < s) {
r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
e = t->e;
if (e > 16)
do {
- if (e == 99)
- abort_unzip(PASS_STATE_ONLY);;
+ if (e == 99) {
+ abort_unzip(PASS_STATE_ONLY);
+ }
bb >>= t->b;
k -= t->b;
e -= 16;
@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
e = t->e;
if (e > 16)
do {
- if (e == 99)
+ if (e == 99) {
abort_unzip(PASS_STATE_ONLY);
+ }
bb >>= t->b;
k -= t->b;
e -= 16;
@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
b_dynamic >>= 4;
k_dynamic -= 4;
- if (nl > 286 || nd > 30)
+ if (nl > 286 || nd > 30) {
abort_unzip(PASS_STATE_ONLY); /* bad lengths */
+ }
/* read in bit-length-code lengths */
for (j = 0; j < nb; j++) {
@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
bl = lbits;
i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
- if (i != 0)
+ if (i != 0) {
abort_unzip(PASS_STATE_ONLY);
+ }
bd = dbits;
i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
- if (i != 0)
+ if (i != 0) {
abort_unzip(PASS_STATE_ONLY);
+ }
/* set up data for inflate_codes() */
inflate_codes_setup(PASS_STATE bl, bd);
@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
error_msg = "corrupted data";
if (setjmp(error_jmp)) {
/* Error from deep inside zip machinery */
+ bb_error_msg(error_msg);
n = -1;
goto ret;
}
diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
index ca0a458..d8738a3 100755
--- a/testsuite/unzip.tests
+++ b/testsuite/unzip.tests
@@ -34,6 +34,7 @@ rm foo.zip
testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
"Archive: bad.zip
inflating: ]3j½r«IK-%Ix
+unzip: corrupted data
unzip: inflate error
1
" \
--
2.6.2

View File

@@ -1,2 +1,2 @@
# From https://matt.ucc.asn.au/dropbear/releases/SHA256SUM.asc
sha256 62a8cc3df1d0f136d46f50d4f8d92f7ab7ce1addac76b25446b3f6aaf80bf257 dropbear-2015.70.tar.bz2
sha256 376214169c0e187ee9f48ae1a99b3f835016ad5b98ede4bfd1cf581deba783af dropbear-2015.71.tar.bz2

View File

@@ -4,7 +4,7 @@
#
################################################################################
DROPBEAR_VERSION = 2015.70
DROPBEAR_VERSION = 2015.71
DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
DROPBEAR_LICENSE = MIT, BSD-2c-like, BSD-2c

View File

@@ -16,9 +16,11 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
GAWK_DEPENDENCIES += busybox
endif
# We don't have a host-busybox
# We don't have a host-busybox, and we don't want to use readline or mpfr
HOST_GAWK_DEPENDENCIES =
HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr
define GAWK_CREATE_SYMLINK
ln -sf /usr/bin/gawk $(TARGET_DIR)/usr/bin/awk
endef

View File

@@ -1,3 +1,3 @@
# From http://sourceforge.net/projects/libpng/files/libpng16/1.6.19/
md5 1e6a458429e850fc93c1f3b6dc00a48f libpng-1.6.19.tar.xz
sha1 483d72ced11c9258f9d1119105273d9af9ff151c libpng-1.6.19.tar.xz
# From http://sourceforge.net/projects/libpng/files/libpng16/1.6.20/
md5 3968acb7c66ef81a9dab867f35d0eb4b libpng-1.6.20.tar.xz
sha1 c4f02051e0b86613076ce390fd15824f3506a148 libpng-1.6.20.tar.xz

View File

@@ -4,7 +4,7 @@
#
################################################################################
LIBPNG_VERSION = 1.6.19
LIBPNG_VERSION = 1.6.20
LIBPNG_SERIES = 16
LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.xz
LIBPNG_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG_SERIES}/$(LIBPNG_VERSION)

View File

@@ -1,2 +1,2 @@
# From https://www.openssl.org/source/openssl-1.0.2d.tar.gz.sha256
sha256 671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8 openssl-1.0.2d.tar.gz
# From https://www.openssl.org/source/openssl-1.0.2e.tar.gz.sha256
sha256 e23ccafdb75cfcde782da0151731aa2185195ac745eea3846133f2e05c0e0bff openssl-1.0.2e.tar.gz

View File

@@ -4,7 +4,7 @@
#
################################################################################
OPENSSL_VERSION = 1.0.2d
OPENSSL_VERSION = 1.0.2e
OPENSSL_SITE = http://www.openssl.org/source
OPENSSL_LICENSE = OpenSSL or SSLeay
OPENSSL_LICENSE_FILES = LICENSE
@@ -77,7 +77,6 @@ define OPENSSL_CONFIGURE_CMDS
--libdir=/lib \
$(if $(BR2_TOOLCHAIN_HAS_THREADS),threads,no-threads) \
$(if $(BR2_STATIC_LIBS),no-shared,shared) \
no-idea \
no-rc5 \
enable-camellia \
enable-mdc2 \

View File

@@ -14,7 +14,7 @@ main() {
local file ret
# Remove duplicate and trailing '/' for proper match
hostdir="$( sed -r -e 's:/+:/:g;' <<<"${hostdir}" )"
hostdir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${hostdir}" )"
ret=0
while read file; do