Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803065 (CVE-2021-3246, CVE-2021-4156) - <media-libs/libsndfile-1.1.0: multiple vulnerabilities
Summary: <media-libs/libsndfile-1.1.0: multiple vulnerabilities
Status: RESOLVED FIXED
Alias: CVE-2021-3246, CVE-2021-4156
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL: https://github.com/libsndfile/libsndf...
Whiteboard: B2 [glsa+]
Keywords:
Depends on: 836394
Blocks:
  Show dependency tree
 
Reported: 2021-07-20 17:47 UTC by John Helmert III
Modified: 2023-09-29 11:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-07-20 17:47:33 UTC
CVE-2021-3246:

A heap buffer overflow vulnerability in msadpcm_decode_block of libsndfile 1.0.30 allows attackers to execute arbitrary code via a crafted WAV file.
Comment 1 Miroslav Šulc gentoo-dev 2021-07-21 05:22:50 UTC
that one has been removed in april:

commit 9eefbb31d261ef84d2360e47acdaa890507c732b
Author: Miroslav Šulc <fordfrog@gentoo.org>
Date:   Tue Apr 6 12:42:30 2021 +0200

    media-libs/libsndfile: removed obsolete 1.0.30
    
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-07-24 00:26:41 UTC
(In reply to Miroslav Šulc from comment #1)
> that one has been removed in april:
> 
> commit 9eefbb31d261ef84d2360e47acdaa890507c732b
> Author: Miroslav Šulc <fordfrog@gentoo.org>
> Date:   Tue Apr 6 12:42:30 2021 +0200
> 
>     media-libs/libsndfile: removed obsolete 1.0.30
>     
>     Package-Manager: Portage-3.0.18, Repoman-3.0.3
>     Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

Thank you. Unfortunately MITRE doesn't care about writing CVE descriptions that are useful for much longer past the time they're written. In other words, 1.0.30 is in the description, but MITRE doesn't care about misleading us into thinking versions greater than 1.0.30 are fixed.
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-07-24 00:41:41 UTC
I suppose this is the fix:

commit deb669ee8be55a94565f6f8a6b60890c2e7c6f32
Author: bobsayshilol <bobsayshilol@live.co.uk>
Date:   Thu Feb 18 21:52:09 2021 +0000

    ms_adpcm: Fix and extend size checks

    'blockalign' is the size of a block, and each block contains 7 samples
    per channel as part of the preamble, so check against 'samplesperblock'
    rather than 'blockalign'. Also add an additional check that the block
    is big enough to hold the samples it claims to hold.

    https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26803


The oss-fuzz issue shows the same size overwrite in the same function as the Github issue. Patch is only in the 1.1.0beta1 tag.
Comment 4 NATTkA bot gentoo-dev 2021-07-29 17:20:54 UTC Comment hidden (obsolete)
Comment 5 NATTkA bot gentoo-dev 2021-07-29 17:29:01 UTC Comment hidden (obsolete)
Comment 6 NATTkA bot gentoo-dev 2021-07-29 17:36:58 UTC Comment hidden (obsolete)
Comment 7 NATTkA bot gentoo-dev 2021-07-29 17:45:00 UTC Comment hidden (obsolete)
Comment 8 NATTkA bot gentoo-dev 2021-07-29 17:53:04 UTC Comment hidden (obsolete)
Comment 9 NATTkA bot gentoo-dev 2021-07-29 17:57:00 UTC Comment hidden (obsolete)
Comment 10 NATTkA bot gentoo-dev 2021-07-29 18:01:00 UTC Comment hidden (obsolete)
Comment 11 NATTkA bot gentoo-dev 2021-07-29 18:09:17 UTC
Package list is empty or all packages have requested keywords.
Comment 12 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-03-24 00:03:54 UTC
CVE-2021-4156 (https://bugzilla.redhat.com/show_bug.cgi?id=2027690):

An out-of-bounds read flaw was found in libsndfile's FLAC codec functionality. An attacker who is able to submit a specially crafted file (via tricking a user to open or otherwise) to an application linked with libsndfile and using the FLAC codec, could trigger an out-of-bounds read that would most likely cause a crash but could potentially leak memory information that could be used in further exploitation of other flaws.
Comment 13 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-03-24 00:05:38 UTC
(In reply to John Helmert III from comment #12)
> CVE-2021-4156 (https://bugzilla.redhat.com/show_bug.cgi?id=2027690):
> 
> An out-of-bounds read flaw was found in libsndfile's FLAC codec
> functionality. An attacker who is able to submit a specially crafted file
> (via tricking a user to open or otherwise) to an application linked with
> libsndfile and using the FLAC codec, could trigger an out-of-bounds read
> that would most likely cause a crash but could potentially leak memory
> information that could be used in further exploitation of other flaws.

https://github.com/libsndfile/libsndfile/issues/731
https://github.com/libsndfile/libsndfile/pull/732/commits/4c30646abf7834e406f7e2429c70bc254e18beab

Fixed in upcoming 1.1.0.
Comment 14 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-05-04 14:52:52 UTC
Please cleanup
Comment 15 Larry the Git Cow gentoo-dev 2022-05-04 18:52:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34b05bb68cc2a795b056982c28f7baaced537b99

commit 34b05bb68cc2a795b056982c28f7baaced537b99
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2022-05-04 18:52:25 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2022-05-04 18:52:25 +0000

    media-libs/libsndfile: dropped 1.0.31
    
    Bug: https://bugs.gentoo.org/836394
    Bug: https://bugs.gentoo.org/803065
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 media-libs/libsndfile/Manifest                 |  1 -
 media-libs/libsndfile/libsndfile-1.0.31.ebuild | 74 --------------------------
 2 files changed, 75 deletions(-)
Comment 16 Miroslav Šulc gentoo-dev 2022-05-04 18:53:02 UTC
the tree is clean now, you can proceed.
Comment 17 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-05-04 19:42:10 UTC
Thanks!
Comment 18 Larry the Git Cow gentoo-dev 2023-09-29 11:30:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/glsa.git/commit/?id=7ca60e60d2fc3615cdd15c4400fb2e73e4f146b8

commit 7ca60e60d2fc3615cdd15c4400fb2e73e4f146b8
Author:     GLSAMaker <glsamaker@gentoo.org>
AuthorDate: 2023-09-29 11:28:49 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2023-09-29 11:29:52 +0000

    [ GLSA 202309-11 ] libsndfile: Multiple Vulnerabilities
    
    Bug: https://bugs.gentoo.org/803065
    Signed-off-by: GLSAMaker <glsamaker@gentoo.org>
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 glsa-202309-11.xml | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)