Bug 20723 - libarchive new security issues CVE-2016-10209, CVE-2016-10349 and CVE-2016-10350
Summary: libarchive new security issues CVE-2016-10209, CVE-2016-10349 and CVE-2016-10350
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA5-32-OK MGA5-64-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2017-04-23 00:48 CEST by David Walser
Modified: 2017-05-07 22:31 CEST (History)
5 users (show)

See Also:
Source RPM: libarchive-3.2.2-1.1.mga5.src.rpm
CVE: CVE-2016-10209, CVE-2016-10349, CVE-2016-10350
Status comment:


Attachments

Description David Walser 2017-04-23 00:48:15 CEST
Fedora has issued an advisory on April 21:
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/X6XSEKB66L7HSSU7YBNH4K6BNY64HLGK/

We already fixed CVE-2017-5601 in Bug 20223.

Mageia 5 is also affected.
David Walser 2017-04-23 00:48:22 CEST

Whiteboard: (none) => MGA5TOO

Comment 1 Nicolas Salguero 2017-04-24 10:08:39 CEST
I verified that CVE-2016-10209 is already fixed in libarchive-3.3.1 so Cauldron is not affected.
Comment 2 Nicolas Salguero 2017-04-24 10:12:14 CEST
Suggested advisory:
========================

The updated packages fix a security vulnerability:

The archive_wstring_append_from_mbs function in archive_string.c in libarchive 3.2.2 allows remote attackers to cause a denial of service (NULL pointer dereference and application crash) via a crafted archive file. (CVE-2016-10209)

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10209
========================

Updated packages in core/updates_testing:
========================
lib(64)archive13-3.2.2-1.2.mga5
lib(64)archive-devel-3.2.2-1.2.mga5
bsdtar-3.2.2-1.2.mga5
bsdcpio-3.2.2-1.2.mga5
bsdcat-3.2.2-1.2.mga5

from SRPMS:
libarchive-3.2.2-1.2.mga5.src.rpm

Assignee: nicolas.salguero => qa-bugs
Source RPM: libarchive-3.3.1-1.mga6.src.rpm => libarchive-3.2.2-1.1.mga5.src.rpm
Whiteboard: MGA5TOO => (none)
Version: Cauldron => 5

Nicolas Salguero 2017-04-24 10:12:30 CEST

CC: (none) => nicolas.salguero
Status: NEW => ASSIGNED

Comment 3 Brian Rockwell 2017-04-25 04:14:07 CEST
$ uname -a
Linux localhost.localdomain 4.4.59-desktop586-1.mga5 #1 SMP Thu Mar 30 21:18:19 UTC 2017 i686 i686 i686 GNU/Linux
---------------

The following 4 packages are going to be installed:

- bsdcat-3.2.2-1.2.mga5.i586
- bsdcpio-3.2.2-1.2.mga5.i586
- bsdtar-3.2.2-1.2.mga5.i586
- libarchive13-3.2.2-1.2.mga5.i586

158KB of additional disk space will be used.

437KB of packages will be retrieved.

Is it ok to continue?


bsdtar -czf hello.tar.gz helloworld.java

used file to review and open the tar file - worked as designed

bsdcat helloworld.java  - produced the output file

CC: (none) => brtians1
Whiteboard: (none) => mga5-32-ok

Comment 4 David Walser 2017-05-02 02:29:25 CEST
Nicolas, do we have fixes for CVE-2016-10349 and CVE-2016-10350?
http://openwall.com/lists/oss-security/2017/05/01/12

They would only affect Mageia 5.
Comment 5 Brian Rockwell 2017-05-02 04:44:35 CEST
$ uname -a
Linux localhost 4.4.59-desktop-1.mga5 #1 SMP Thu Mar 30 21:28:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

The following 15 packages are going to be installed:

- bsdcat-3.2.2-1.2.mga5.x86_64
- bsdcpio-3.2.2-1.2.mga5.x86_64
- bsdtar-3.2.2-1.2.mga5.x86_64
- glibc-devel-2.20-24.mga5.x86_64
- kernel-userspace-headers-4.4.65-1.mga5.x86_64
- lib64acl-devel-2.2.52-5.mga5.x86_64
- lib64archive-devel-3.2.2-1.2.mga5.x86_64
- lib64archive13-3.2.2-1.2.mga5.x86_64
- lib64attr-devel-2.4.47-5.mga5.x86_64
- lib64bzip2-devel-1.0.6-7.1.mga5.x86_64
- lib64lzma-devel-5.2.0-1.mga5.x86_64
- lib64lzo-devel-2.09-1.mga5.x86_64
- lib64openssl-devel-1.0.2k-1.mga5.x86_64
- lib64xml2-devel-2.9.4-1.1.mga5.x86_64
- lib64zlib-devel-1.2.8-7.1.mga5.x86_64

28MB of additional disk space will be used.

7.2MB of packages will be retrieved.

Is it ok to continue?

$ bsdcat --version
bsdcat 3.2.2 - libarchive 3.2.2 zlib/1.2.8 liblzma/5.2.0 bz2lib/1.0.6

$ bsdtar -czf file.tar.gz filelist.txt clamdoc.pdf

$ bsdcat filelist.txt

$ bsdcpio -o < filelist.txt > file

It created a file I could review and extract with arc.

From what I can tell everything is working as designed.

Whiteboard: mga5-32-ok => mga5-32-ok mga5-64-ok

Comment 6 David Walser 2017-05-02 05:00:16 CEST
Adding the feedback tag until we get an answer for Comment 4.

Whiteboard: mga5-32-ok mga5-64-ok => mga5-32-ok mga5-64-ok feedback

Comment 7 Nicolas Salguero 2017-05-02 10:12:40 CEST
According to https://github.com/libarchive/libarchive/issues/834 (CVE-2016-10349) and https://github.com/libarchive/libarchive/issues/835 (CVE-2016-10350), this commit fixes both issues: https://github.com/libarchive/libarchive/commit/88eb9e1d73fef46f04677c25b1697b8e25777ed3 so I added the patch.

Suggested advisory:
========================

The updated packages fix security vulnerabilities:

The archive_wstring_append_from_mbs function in archive_string.c in libarchive 3.2.2 allows remote attackers to cause a denial of service (NULL pointer dereference and application crash) via a crafted archive file. (CVE-2016-10209)

The archive_le32dec function in archive_endian.h in libarchive 3.2.2 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted file. (CVE-2016-10349)

The archive_read_format_cab_read_header function in archive_read_support_format_cab.c in libarchive 3.2.2 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted file. (CVE-2016-10350)

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10209
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10349
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10350
http://openwall.com/lists/oss-security/2017/05/01/12
========================

Updated packages in core/updates_testing:
========================
lib(64)archive13-3.2.2-1.3.mga5
lib(64)archive-devel-3.2.2-1.3.mga5
bsdtar-3.2.2-1.3.mga5
bsdcpio-3.2.2-1.3.mga5
bsdcat-3.2.2-1.3.mga5

from SRPMS:
libarchive-3.2.2-1.3.mga5.src.rpm

Whiteboard: mga5-32-ok mga5-64-ok feedback => mga5-32-ok mga5-64-ok

Nicolas Salguero 2017-05-02 10:13:30 CEST

Whiteboard: mga5-32-ok mga5-64-ok => (none)

Nicolas Salguero 2017-05-02 10:32:31 CEST

CVE: (none) => CVE-2016-10209, CVE-2016-10349, CVE-2016-10350
Summary: libarchive new security issue CVE-2016-10209 => libarchive new security issues CVE-2016-10209, CVE-2016-10349 and CVE-2016-10350

Comment 8 Herman Viaene 2017-05-05 14:48:49 CEST
MGA-32 on Asus A6000VM Xfce
No installation issues.
Ref bug 20223 Comment 2, did similar test with engrampa archiving a 125Mb folder containing all sorts of documents and a few pictures. Copying the resulting tar.gz to another location and unpacking there was OK.

CC: (none) => herman.viaene
Whiteboard: (none) => MGA5-32-OK

Comment 9 Lewis Smith 2017-05-07 12:50:37 CEST
Testing M5-64

After update:-
 bsdcat-3.2.2-1.3.mga5
 bsdcpio-3.2.2-1.3.mga5 bsdtar-3.2.2-1.3.mga5
 bsdtar-3.2.2-1.3.mga5
 lib64archive13-3.2.2-1.3.mga5

 $ gzip cycleRockies2.txt            [to have a .gz text file]
 $ bsdcat cycleRockies2.txt.gz | less
gave correct output.

 $ find . | bsdcpio -ov  > ../tmp/test.cpio      [archive current directory]
 $ cd ../tmp
 $ bsdcpio -itvF test.cpio | less
gave good output. The library is called:
 $ strace bsdcpio -itvF test.cpio 2>&1 | grep libarchive
 open("/lib64/libarchive.so.13", O_RDONLY|O_CLOEXEC) = 3
Probed the archive (including its embedded CPIO file) with both FileRoller and Ark, all inspections good.
 $ bsdcpio -ivF test.cpio
reproduced the original directory tree in the current directory.

 $ bsdtar -cvf test.tar .     [65Mb mixed, including one .cpio]
The result viewed correctly with:
 $ bsdtar -tf test.tar
and the library is called:
 $ strace bsdtar -tf test.tar 2>&1 | grep libarchive
 open("/lib64/libarchive.so.13", O_RDONLY|O_CLOEXEC) = 3
Probed the archive (including its embedded CPIO file) with both FileRoller and Ark, all inspections good.
 $ bsdtar -xvf test.tar
reproduced the original directory tree in the current directory.

The update looks good. Validating. Advisory (Comment 7) to follow.

Whiteboard: MGA5-32-OK => MGA5-32-OK MGA5-64-OK
Keywords: (none) => validated_update
CC: (none) => lewyssmith, sysadmin-bugs

Lewis Smith 2017-05-07 12:57:01 CEST

Whiteboard: MGA5-32-OK MGA5-64-OK => MGA5-32-OK MGA5-64-OK advisory

Comment 10 Mageia Robot 2017-05-07 22:31:44 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGASA-2017-0132.html

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.