libsndfile: Security fix for CVE-2021-3246
PATCH 1/1 libsndfile: Security fix for CVE-2021-3246
From: Armin Kuster <[email protected]>
Source: https://github.com/libsndfile/libsndfile
MR: 112098
Type: Security Fix
Disposition: Backport from https://github.com/libsndfile/libsndfile/pull/713
ChangeID: 10d137de063b7a1e543ee96fbcf948945a452869
Description:
Signed-off-by Armin Kuster <[email protected]>
--- .../libsndfile1/CVE-2021-3246_1.patch | 36 +++++++++++++++ .../libsndfile1/CVE-2021-3246_2.patch | 44 +++++++++++++++++++ .../libsndfile/libsndfile1_1.0.28.bb | 2 + 3 files changed, 82 insertions(+) create mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-3246_1.patch create mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-3246_2.patch
meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-3246_1.patch new file +36 -0
@@ -0,0 +1,36 @@ +From a9815b3f228df00086e0a40bcc43162fc19896a1 Mon Sep 17 00:00:00 2001 +From: bobsayshilol <[email protected]> +Date: Wed, 17 Feb 2021 23:21:48 +0000 +Subject: [PATCH 1/2] wavlike: Fix incorrect size check + +The SF_CART_INFO_16K struct has an additional 4 byte field to hold +the size of 'tag_text' which the file header doesn't, so don't +include it as part of the check when looking for the max length. + +https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26026 + +Upstream-Status: Backport +CVE: CVE-2021-3246 patch 1 +Signed-off-by: Armin Kuster <[email protected]> + +--- + src/wavlike.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +Index: libsndfile-1.0.28/src/wavlike.c +=================================================================== +--- libsndfile-1.0.28.orig/src/wavlike.c ++++ libsndfile-1.0.28/src/wavlike.c +@@ -803,7 +803,11 @@ wavlike_read_cart_chunk (SF_PRIVATE *psf + return 0 ; + } ; + +- if (chunksize >= sizeof (SF_CART_INFO_16K)) ++ /* ++ ** SF_CART_INFO_16K has an extra field 'tag_text_size' that isn't part ++ ** of the chunk, so don't include it in the size check. ++ */ ++ if (chunksize >= sizeof (SF_CART_INFO_16K) - 4) + { psf_log_printf (psf, "cart : %u too big to be handled\n", chunksize) ; + psf_binheader_readf (psf, "j", chunksize) ; + return 0 ;
meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-3246_2.patch new file +44 -0
44 lines not on this page · raw message
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb +2 -0
@@ -20,6 +20,8 @@ SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \ file://CVE-2017-12562.patch \ file://CVE-2018-19758.patch \ file://CVE-2019-3832.patch \ + file://CVE-2021-3246_1.patch \ + file://CVE-2021-3246_2.patch \ " SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"
Signature · 1 line
2.25.1