Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803128 (CVE-2021-31566, CVE-2021-36976) - <app-arch/libarchive-3.5.3: multiple vulnerabilities
Summary: <app-arch/libarchive-3.5.3: multiple vulnerabilities
Status: RESOLVED FIXED
Alias: CVE-2021-31566, CVE-2021-36976
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://bugs.chromium.org/p/oss-fuzz/...
Whiteboard: B3 [glsa+]
Keywords:
Depends on: 832897
Blocks:
  Show dependency tree
 
Reported: 2021-07-20 23:29 UTC by John Helmert III
Modified: 2022-08-14 16:10 UTC (History)
1 user (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 23:29:45 UTC
CVE-2021-36976:

libarchive 3.4.1 through 3.5.1 has a use-after-free in copy_string (called from do_uncompress_block and process_block).


I guess this is unfixed? No references in the CVE to a fix, nor the oss-fuzz
issue.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-07-21 07:40:49 UTC
This is one of the most useless reports I've seen.  There's literally zero detail on what's happening, only name of the function (which luckily seems to be used only once, so apparently it's affecting libarchive/archive_read_support_format_rar5.c).  The detailed report does not seem to be public, the bug has apparently been kept secret for 3 months without bothering to report it upstream, and now CVE was released with practically no details and apparently still nobody cared to report it.
Comment 2 NATTkA bot gentoo-dev 2021-07-29 17:20:48 UTC Comment hidden (obsolete)
Comment 3 NATTkA bot gentoo-dev 2021-07-29 17:28:55 UTC Comment hidden (obsolete)
Comment 4 NATTkA bot gentoo-dev 2021-07-29 17:36:51 UTC Comment hidden (obsolete)
Comment 5 NATTkA bot gentoo-dev 2021-07-29 17:44:54 UTC Comment hidden (obsolete)
Comment 6 NATTkA bot gentoo-dev 2021-07-29 17:52:57 UTC Comment hidden (obsolete)
Comment 7 NATTkA bot gentoo-dev 2021-07-29 17:56:53 UTC Comment hidden (obsolete)
Comment 8 NATTkA bot gentoo-dev 2021-07-29 18:00:53 UTC Comment hidden (obsolete)
Comment 9 NATTkA bot gentoo-dev 2021-07-29 18:09:11 UTC
Package list is empty or all packages have requested keywords.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-08-23 05:45:57 UTC
The fixes are apparently still work-in-progress.
Comment 11 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-01-13 05:22:14 UTC
oss-fuzz shows this as fixed as of d3ae4163e1d51b1b0c039fd2140e9f3aae4c6559: https://github.com/libarchive/libarchive/commit/d3ae4163e1d51b1b0c039fd2140e9f3aae4c6559

There's also https://github.com/libarchive/libarchive/commit/b9675888c288fb8b293a69783712bbc2a4573773 which apparently fixes some OOB reads.
Comment 12 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-02-07 15:41:42 UTC
This pull request was merged: https://github.com/libarchive/libarchive/pull/1491
Comment 13 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-02-08 01:48:08 UTC
Someone commented on the PR that this fixed these oss-fuzz issues (comment now deleted?):

"OSS-Fuzz has just reported that this buxfix has resolved the issues:
[#31890](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31890#c4)
[#38744](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38744#c4)
[#38754](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38754#c4)
[#38770](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38770#c4)
[#39951](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39951#c4)"

Release seemingly incoming: https://github.com/libarchive/libarchive/pull/1491#issuecomment-1031989787
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-02-08 10:00:57 UTC
Libarchive 3.5.3 is a security release

Security Fixes:
- extended fix for following symlinks when processing the fixup list (#1566, #1617, CVE-2021-31566)
- fix invalid memory access and out of bounds read in RAR5 reader (#1491, #1492, #1493, CVE-2021-36976)


So I guess they've fixed it finally.
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-02-11 13:37:02 UTC
Cleanup done.
Comment 16 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-14 04:47:53 UTC
GLSA request filed
Comment 17 Larry the Git Cow gentoo-dev 2022-08-14 16:09:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/glsa.git/commit/?id=876025c7afca0f5ee13ac2b34bc49c9928ab4128

commit 876025c7afca0f5ee13ac2b34bc49c9928ab4128
Author:     GLSAMaker <glsamaker@gentoo.org>
AuthorDate: 2022-08-14 16:08:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-14 16:09:43 +0000

    [ GLSA 202208-26 ] libarchive: Multiple Vulnerabilities
    
    Bug: https://bugs.gentoo.org/803128
    Bug: https://bugs.gentoo.org/836352
    Bug: https://bugs.gentoo.org/837266
    Signed-off-by: GLSAMaker <glsamaker@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 glsa-202208-26.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-14 16:10:20 UTC
GLSA done, all done.