package/libsndfile: add upstream security fixes
PATCH 1/1 package/libsndfile: add upstream security fixes
- Fix CVE-2017-6892: In libsndfile version 1.0.28, an error in the "aiff_read_chanmap()" function (aiff.c) can be exploited to cause an out-of-bounds read memory access via a specially crafted AIFF file.
- Fix CVE-2017-8361: The flac_buffer_copy function in flac.c in libsndfile 1.0.28 allows remote attackers to cause a denial of service (buffer overflow and application crash) or possibly have unspecified other impact via a crafted audio file.
- Fix CVE-2017-8362: The flac_buffer_copy function in flac.c in libsndfile 1.0.28 allows remote attackers to cause a denial of service (invalid read and application crash) via a crafted audio file.
- Fix CVE-2017-8363: The flac_buffer_copy function in flac.c in libsndfile 1.0.28 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted audio file.
- Fix CVE-2017-8365: The i2les_array function in pcm.c in libsndfile 1.0.28 allows remote attackers to cause a denial of service (buffer over-read and application crash) via a crafted audio file.
- Fix CVE-2017-12562: Heap-based Buffer Overflow in the psf_binheader_writef function in common.c in libsndfile through 1.0.28 allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact.
--- ...rc-aiff.c-Fix-a-buffer-read-overflow.patch | 29 ++++++ .../0007-FLAC-Fix-a-buffer-read-overrun.patch | 68 ++++++++++++++ ...rc-flac.c-Fix-a-buffer-read-overflow.patch | 54 +++++++++++ ...9-src-flac-c-Fix-another-memory-leak.patch | 32 +++++++ ...er-overflows-when-writing-strings-in.patch | 92 +++++++++++++++++++ package/libsndfile/libsndfile.mk | 10 ++ 6 files changed, 285 insertions(+) create mode 100644 package/libsndfile/0006-src-aiff.c-Fix-a-buffer-read-overflow.patch create mode 100644 package/libsndfile/0007-FLAC-Fix-a-buffer-read-overrun.patch create mode 100644 package/libsndfile/0008-src-flac.c-Fix-a-buffer-read-overflow.patch create mode 100644 package/libsndfile/0009-src-flac-c-Fix-another-memory-leak.patch create mode 100644 package/libsndfile/0010-src-common-c-Fix-heap-buffer-overflows-when-writing-strings-in.patch
package/libsndfile/0006-src-aiff.c-Fix-a-buffer-read-overflow.patch new file +29 -0
@@ -0,0 +1,29 @@ +From f833c53cb596e9e1792949f762e0b33661822748 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <[email protected]> +Date: Tue, 23 May 2017 20:15:24 +1000 +Subject: [PATCH] src/aiff.c: Fix a buffer read overflow + +Secunia Advisory SA76717. + +Found by: Laurent Delosieres, Secunia Research at Flexera Software + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Retrieved from: +https://github.com/erikd/libsndfile/commit/f833c53cb596e9e1792949f762e0b33661822748] +--- + src/aiff.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/aiff.c b/src/aiff.c +index 5b5f9f53..45864b76 100644 +--- a/src/aiff.c ++++ b/src/aiff.c +@@ -1759,7 +1759,7 @@ aiff_read_chanmap (SF_PRIVATE * psf, unsigned dword) + psf_binheader_readf (psf, "j", dword - bytesread) ; + + if (map_info->channel_map != NULL) +- { size_t chanmap_size = psf->sf.channels * sizeof (psf->channel_map [0]) ; ++ { size_t chanmap_size = SF_MIN (psf->sf.channels, layout_tag & 0xffff) * sizeof (psf->channel_map [0]) ; + + free (psf->channel_map) ; +
package/libsndfile/0007-FLAC-Fix-a-buffer-read-overrun.patch new file +68 -0
68 lines not on this page · raw message
package/libsndfile/0008-src-flac.c-Fix-a-buffer-read-overflow.patch new file +54 -0
54 lines not on this page · raw message
package/libsndfile/0009-src-flac-c-Fix-another-memory-leak.patch new file +32 -0
@@ -0,0 +1,32 @@ +From cd7da8dbf6ee4310d21d9e44b385d6797160d9e8 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <[email protected]> +Date: Wed, 12 Apr 2017 20:19:34 +1000 +Subject: [PATCH] src/flac.c: Fix another memory leak + +When the FLAC decoder was passed a malformed file, the associated +`FLAC__StreamDecoder` object was not getting released. + +Closes: https://github.com/erikd/libsndfile/issues/233 + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Retrieved from: +https://github.com/erikd/libsndfile/commit/cd7da8dbf6ee4310d21d9e44b385d6797160d9e8] +--- + src/flac.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/flac.c b/src/flac.c +index 986a7b8f..5a4f8c21 100644 +--- a/src/flac.c ++++ b/src/flac.c +@@ -841,7 +841,9 @@ flac_read_header (SF_PRIVATE *psf) + + psf_log_printf (psf, "End\n") ; + +- if (psf->error == 0) ++ if (psf->error != 0) ++ FLAC__stream_decoder_delete (pflac->fsd) ; ++ else + { FLAC__uint64 position ; + + FLAC__stream_decoder_get_decode_position (pflac->fsd, &position) ;
package/libsndfile/0010-src-common-c-Fix-heap-buffer-overflows-when-writing-strings-in.patch new file +92 -0
92 lines not on this page · raw message
package/libsndfile/libsndfile.mk +10 -0
@@ -24,6 +24,16 @@ LIBSNDFILE_IGNORE_CVES += CVE-2018-13419 LIBSNDFILE_IGNORE_CVES += CVE-2018-19758 # 0005-wav_write_header-don-t-read-past-the-array-end.patch LIBSNDFILE_IGNORE_CVES += CVE-2019-3832 +# 0006-src-aiff.c-Fix-a-buffer-read-overflow.patch +LIBSNDFILE_IGNORE_CVES += CVE-2017-6892 +# 0007-FLAC-Fix-a-buffer-read-overrun.patch +LIBSNDFILE_IGNORE_CVES += CVE-2017-8361 +# 0008-src-flac.c-Fix-a-buffer-read-overflow.patch +LIBSNDFILE_IGNORE_CVES += CVE-2017-8362 CVE-2017-8365 +# 0009-src-flac-c-Fix-another-memory-leak.patch +LIBSNDFILE_IGNORE_CVES += CVE-2017-8363 +# 0010-src-common-c-Fix-heap-buffer-overflows-when-writing-strings-in.patch +LIBSNDFILE_IGNORE_CVES += CVE-2017-12562 LIBSNDFILE_CONF_OPTS = \ --disable-sqlite \
Signature · 1 line
2.25.1
PATCH 1/1 package/libsndfile: add upstream security fixes
Quoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
- Fix CVE-2017-6892: In libsndfile version 1.0.28, an error in the "
aiff_read_chanmap()" function (aiff.c) can be exploited to cause an out-of-bounds read memory access via a specially crafted AIFF file.- Fix CVE-2017-8361: The
flac_buffer_copyfunction inflac.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (buffer overflow and application crash) or possibly have unspecified other impact via a crafted audio file.- Fix CVE-2017-8362: The
flac_buffer_copyfunction inflac.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (invalid read and application crash) via a crafted audio file.- Fix CVE-2017-8363: The
flac_buffer_copyfunction inflac.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted audio file.- Fix CVE-2017-8365: The
i2les_arrayfunction inpcm.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (buffer over-read and application crash) via a crafted audio file.
Quoted 6 lines
- Fix CVE-2017-12562: Heap-based Buffer Overflow in the
psf_binheader_writeffunction incommon.cin libsndfile through 1.0.28 allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact.Signed-off-by Fabrice Fontaine <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/libsndfile: add upstream security fixes
In reply to Fabrice FontaineQuoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
- Fix CVE-2017-6892: In libsndfile version 1.0.28, an error in the "
aiff_read_chanmap()" function (aiff.c) can be exploited to cause an out-of-bounds read memory access via a specially crafted AIFF file.- Fix CVE-2017-8361: The
flac_buffer_copyfunction inflac.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (buffer overflow and application crash) or possibly have unspecified other impact via a crafted audio file.- Fix CVE-2017-8362: The
flac_buffer_copyfunction inflac.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (invalid read and application crash) via a crafted audio file.- Fix CVE-2017-8363: The
flac_buffer_copyfunction inflac.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted audio file.- Fix CVE-2017-8365: The
i2les_arrayfunction inpcm.cin libsndfile 1.0.28 allows remote attackers to cause a denial of service (buffer over-read and application crash) via a crafted audio file.
Quoted 6 lines
- Fix CVE-2017-12562: Heap-based Buffer Overflow in the
psf_binheader_writeffunction incommon.cin libsndfile through 1.0.28 allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact.Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2019.02.x, 2019.11.x and 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard