libsndfile1: Backport fix for CVE-2021-4156
PATCH 1/1 libsndfile1: Backport fix for CVE-2021-4156
CVE: CVE-2021-4156
Signed-off-by Martin Jansa <[email protected]>
--- ...flac-Fix-improper-buffer-reusing-732.patch | 29 +++++++++++++++++++ .../libsndfile/libsndfile1_1.0.31.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/0001-flac-Fix-improper-buffer-reusing-732.patch
meta/recipes-multimedia/libsndfile/libsndfile1/0001-flac-Fix-improper-buffer-reusing-732.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 9e4e9224c39195bde8ec14d1295944f713adb79a Mon Sep 17 00:00:00 2001 +From: yuan <[email protected]> +Date: Tue, 20 Apr 2021 16:16:32 +0800 +Subject: [PATCH] flac: Fix improper buffer reusing (#732) + +Upstream-Status: Backport [https://github.com/libsndfile/libsndfile/commit/ced91d7b971be6173b604154c39279ce90ad87cc] +CVE: CVE-2021-4156 + +Signed-off-by: Martin Jansa <[email protected]> +--- + src/flac.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/flac.c b/src/flac.c +index 64d0172e..e3320450 100644 +--- a/src/flac.c ++++ b/src/flac.c +@@ -948,7 +948,11 @@ flac_read_loop (SF_PRIVATE *psf, unsigned len) + /* Decode some more. */ + while (pflac->pos < pflac->len) + { if (FLAC__stream_decoder_process_single (pflac->fsd) == 0) ++ { psf_log_printf (psf, "FLAC__stream_decoder_process_single returned false\n") ; ++ /* Current frame is busted, so NULL the pointer. */ ++ pflac->frame = NULL ; + break ; ++ } ; + state = FLAC__stream_decoder_get_state (pflac->fsd) ; + if (state >= FLAC__STREAM_DECODER_END_OF_STREAM) + { psf_log_printf (psf, "FLAC__stream_decoder_get_state returned %s\n", FLAC__StreamDecoderStateString [state]) ;
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb +1 -0
@@ -10,6 +10,7 @@ LICENSE = "LGPL-2.1-only" SRC_URI = "https://github.com/libsndfile/libsndfile/releases/download/${PV}/libsndfile-${PV}.tar.bz2 \ file://noopus.patch \ + file://0001-flac-Fix-improper-buffer-reusing-732.patch \ " UPSTREAM_CHECK_URI = "https://github.com/libsndfile/libsndfile/releases/"
Signature · 1 line
2.38.1