package/wavpack: security bump to version 5.2.0
PATCH 1/2 package/wavpack: security bump to version 5.2.0
- Switch to github to get latest version
- Drop patches (already in version)
- Fix CVE-2018-19840: The function WavpackPackInit in pack_utils.c in libwavpack.a in WavPack through 5.1.0 allows attackers to cause a denial-of-service (resource exhaustion caused by an infinite loop) via a crafted wav audio file because WavpackSetConfiguration64 mishandles a sample rate of zero.
- Fix CVE-2018-19841: The function WavpackVerifySingleBlock in open_utils.c in libwavpack.a in WavPack through 5.1.0 allows attackers to cause a denial-of-service (out-of-bounds read and application crash) via a crafted WavPack Lossless Audio file, as demonstrated by wvunpack.
- Add hash for license file
--- ...ew-dependency-on-wchar-t-by-removing.patch | 70 ----------- ...overwrite-stack-on-corrupt-RF64-file.patch | 118 ------------------ ...overwrite-heap-on-corrupt-DSDIFF-fil.patch | 38 ------ ...fer-overflows-and-bad-allocs-on-corr.patch | 72 ----------- ...1-issue-32-no-multiple-format-chunks.patch | 64 ---------- ...e-size-of-unknown-chunks-before-mall.patch | 75 ----------- package/wavpack/wavpack.hash | 3 +- package/wavpack/wavpack.mk | 7 +- 8 files changed, 6 insertions(+), 441 deletions(-) delete mode 100644 package/wavpack/0001-fix-Github-issue-19-new-dependency-on-wchar-t-by-removing.patch delete mode 100644 package/wavpack/0002-issue-27-do-not-overwrite-stack-on-corrupt-RF64-file.patch delete mode 100644 package/wavpack/0003-issue-28-do-not-overwrite-heap-on-corrupt-DSDIFF-fil.patch delete mode 100644 package/wavpack/0004-issue-28-fix-buffer-overflows-and-bad-allocs-on-corr.patch delete mode 100644 package/wavpack/0005-issue-30-issue-31-issue-32-no-multiple-format-chunks.patch delete mode 100644 package/wavpack/0006-issue-33-sanitize-size-of-unknown-chunks-before-mall.patch
package/wavpack/0001-fix-Github-issue-19-new-dependency-on-wchar-t-by-removing.patch deleted +0 -70
@@ -1,70 +0,0 @@ -From 876fc3f3907e871d0938ac6c8c5252f5f31abd1f Mon Sep 17 00:00:00 2001 -From: David Bryant <[email protected]> -Date: Thu, 16 Feb 2017 17:11:12 -0800 -Subject: [PATCH] fix GitHub issue #19 (new dependency on wchar_t) by removing - dependency - -[Upstream commit: https://github.com/dbry/WavPack/commit/876fc3f3907e871d0938ac6c8c5252f5f31abd1f] -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - cli/import_id3.c | 10 +++++----- - cli/wvtag.c | 2 ++ - 2 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/cli/import_id3.c b/cli/import_id3.c -index 51e54ee..fc30aeb 100644 ---- a/cli/import_id3.c -+++ b/cli/import_id3.c -@@ -34,7 +34,7 @@ static struct { - - #define NUM_TEXT_TAG_ITEMS (sizeof (text_tag_table) / sizeof (text_tag_table [0])) - --static int WideCharToUTF8 (const wchar_t *Wide, unsigned char *pUTF8, int len); -+static int WideCharToUTF8 (const uint16_t *Wide, unsigned char *pUTF8, int len); - static void Latin1ToUTF8 (void *string, int len); - - // Import specified ID3v2.3 tag. The WavPack context accepts the tag items, and can be -@@ -163,7 +163,7 @@ int ImportID3v2 (WavpackContext *wpc, unsigned char *tag_data, int tag_size, cha - } - else if (frame_body [0] == 1 && frame_size > 2 && frame_body [1] == 0xFF && frame_body [2] == 0xFE) { - int nchars = (frame_size - 3) / 2; -- wchar_t *wide_string = malloc ((nchars + 1) * sizeof (wchar_t)); -+ uint16_t *wide_string = malloc ((nchars + 1) * sizeof (uint16_t)); - unsigned char *fp = frame_body + 3; - - utf8_string = malloc ((nchars + 1) * 3); -@@ -297,9 +297,9 @@ int ImportID3v2 (WavpackContext *wpc, unsigned char *tag_data, int tag_size, cha - // may be less than the number of characters in the wide string if the buffer - // length is exceeded. - --static int WideCharToUTF8 (const wchar_t *Wide, unsigned char *pUTF8, int len) -+static int WideCharToUTF8 (const uint16_t *Wide, unsigned char *pUTF8, int len) - { -- const wchar_t *pWide = Wide; -+ const uint16_t *pWide = Wide; - int outndx = 0; - - while (*pWide) { -@@ -335,7 +335,7 @@ static int WideCharToUTF8 (const wchar_t *Wide, unsigned char *pUTF8, int len) - static void Latin1ToUTF8 (void *string, int len) - { - int max_chars = (int) strlen (string); -- wchar_t *temp = (wchar_t *) malloc ((max_chars + 1) * 2); -+ uint16_t *temp = (uint16_t *) malloc ((max_chars + 1) * sizeof (uint16_t)); - - MultiByteToWideChar (28591, 0, string, -1, temp, max_chars + 1); - WideCharToUTF8 (temp, (unsigned char *) string, len); -diff --git a/cli/wvtag.c b/cli/wvtag.c -index 6e6512a..45e621e 100644 ---- a/cli/wvtag.c -+++ b/cli/wvtag.c -@@ -1344,7 +1344,9 @@ static void dump_UTF8_string (char *string, FILE *dst) - // resulting string will not fit in the specified buffer size then it is - // truncated. - -+#if defined (_WIN32) - static int UTF8ToWideChar (const unsigned char *pUTF8, wchar_t *pWide); -+#endif - - static void UTF8ToAnsi (char *string, int len) - {
package/wavpack/0002-issue-27-do-not-overwrite-stack-on-corrupt-RF64-file.patch deleted +0 -118
118 lines not on this page · raw message
package/wavpack/0003-issue-28-do-not-overwrite-heap-on-corrupt-DSDIFF-fil.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From 36a24c7881427d2e1e4dc1cef58f19eee0d13aec Mon Sep 17 00:00:00 2001 -From: David Bryant <[email protected]> -Date: Sat, 10 Feb 2018 16:01:39 -0800 -Subject: [PATCH] issue #28, do not overwrite heap on corrupt DSDIFF file - -Fixes CVE-2018-7253 - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - cli/dsdiff.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/cli/dsdiff.c b/cli/dsdiff.c -index 410dc1c..c016df9 100644 ---- a/cli/dsdiff.c -+++ b/cli/dsdiff.c -@@ -153,7 +153,17 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa - error_line ("dsdiff file version = 0x%08x", version); - } - else if (!strncmp (dff_chunk_header.ckID, "PROP", 4)) { -- char *prop_chunk = malloc ((size_t) dff_chunk_header.ckDataSize); -+ char *prop_chunk; -+ -+ if (dff_chunk_header.ckDataSize < 4 || dff_chunk_header.ckDataSize > 1024) { -+ error_line ("%s is not a valid .DFF file!", infilename); -+ return WAVPACK_SOFT_ERROR; -+ } -+ -+ if (debug_logging_mode) -+ error_line ("got PROP chunk of %d bytes total", (int) dff_chunk_header.ckDataSize); -+ -+ prop_chunk = malloc ((size_t) dff_chunk_header.ckDataSize); - - if (!DoReadFile (infile, prop_chunk, (uint32_t) dff_chunk_header.ckDataSize, &bcount) || - bcount != dff_chunk_header.ckDataSize) { --- -2.11.0 -
package/wavpack/0004-issue-28-fix-buffer-overflows-and-bad-allocs-on-corr.patch deleted +0 -72
72 lines not on this page · raw message
package/wavpack/0005-issue-30-issue-31-issue-32-no-multiple-format-chunks.patch deleted +0 -64
64 lines not on this page · raw message
package/wavpack/0006-issue-33-sanitize-size-of-unknown-chunks-before-mall.patch deleted +0 -75
75 lines not on this page · raw message
package/wavpack/wavpack.hash +2 -1
@@ -1,2 +1,3 @@ # locally computed hash -sha256 1939627d5358d1da62bc6158d63f7ed12905552f3a799c799ee90296a7612944 wavpack-5.1.0.tar.bz2 +sha256 77e5b1cfa26e387e4275b362f0c3fb9a27106447d9bce00f9f794f30badb77e3 wavpack-5.2.0.tar.xz +sha256 2ab58075e26305cc16920e9867c1d43f46ce81adab2051100dd316a3a93a2619 COPYING
package/wavpack/wavpack.mk +4 -3
@@ -4,9 +4,10 @@ # ################################################################################ -WAVPACK_VERSION = 5.1.0 -WAVPACK_SITE = http://www.wavpack.com -WAVPACK_SOURCE = wavpack-$(WAVPACK_VERSION).tar.bz2 +WAVPACK_VERSION = 5.2.0 +WAVPACK_SITE = \ + https://github.com/dbry/WavPack/releases/download/$(WAVPACK_VERSION) +WAVPACK_SOURCE = wavpack-$(WAVPACK_VERSION).tar.xz WAVPACK_INSTALL_STAGING = YES WAVPACK_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),,libiconv) WAVPACK_LICENSE = BSD-3-Clause
Signature · 1 line
2.24.0
PATCH 2/2 package/wavpack: add openssl optional dependency
wavpack optionally depends on libcrypto since version 5.2.0 and
https://github.com/dbry/WavPack/commit/e158df5353b57ac7002d5cac4b3a040eba4c0c9f
--- package/wavpack/wavpack.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/wavpack/wavpack.mk +7 -0
@@ -17,6 +17,13 @@ ifeq ($(BR2_PACKAGE_LIBICONV),y) WAVPACK_CONF_OPTS += LIBS=-liconv endif +ifeq ($(BR2_PACKAGE_OPENSSL),y) +WAVPACK_DEPENDENCIES += openssl +WAVPACK_CONF_OPTS += --enable-libcrypto +else +WAVPACK_CONF_OPTS += --disable-libcrypto +endif + # WavPack "autodetects" CPU type to enable ASM code. However, the assembly code # for ARM is written for ARMv7 only and building WavPack for an ARM-non-v7 # architecture will fail. We explicitly enable ASM for the supported
Signature · 1 line
2.24.0
PATCH 2/2 package/wavpack: add openssl optional dependency
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
wavpack optionally depends on libcrypto since version 5.2.0 and
https://github.com/dbry/WavPack/commit/e158df5353b57ac7002d5cac4b3a040eba4c0c9fSigned-off-by Fabrice Fontaine <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 package/wavpack: security bump to version 5.2.0
In reply to Fabrice FontaineQuoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
- Switch to github to get latest version
- Drop patches (already in version)
- Fix CVE-2018-19840: The function WavpackPackInit inpack_utils.cin libwavpack.a in WavPack through 5.1.0 allows attackers to cause a denial-of-service (resource exhaustion caused by an infinite loop) via a crafted wav audio file because WavpackSetConfiguration64 mishandles a sample rate of zero.
- Fix CVE-2018-19841: The function WavpackVerifySingleBlock inopen_utils.cin libwavpack.a in WavPack through 5.1.0 allows attackers to cause a denial-of-service (out-of-bounds read and application crash) via a crafted WavPack Lossless Audio file, as demonstrated by wvunpack.
- Add hash for license file
Quoted 1 line
Signed-off-by Fabrice Fontaine <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 package/wavpack: security bump to version 5.2.0
In reply to Fabrice FontaineQuoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
- Switch to github to get latest version
- Drop patches (already in version)
- Fix CVE-2018-19840: The function WavpackPackInit inpack_utils.cin libwavpack.a in WavPack through 5.1.0 allows attackers to cause a denial-of-service (resource exhaustion caused by an infinite loop) via a crafted wav audio file because WavpackSetConfiguration64 mishandles a sample rate of zero.
- Fix CVE-2018-19841: The function WavpackVerifySingleBlock inopen_utils.cin libwavpack.a in WavPack through 5.1.0 allows attackers to cause a denial-of-service (out-of-bounds read and application crash) via a crafted WavPack Lossless Audio file, as demonstrated by wvunpack.
- Add hash for license file
Quoted 1 line
Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2019.02.x and 2019.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard