Summary: | vendor/libarchive: directory traversal vulnerability/local denial of services | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Jason Unovitch <junovitch> | ||||||||
Component: | bin | Assignee: | Security Team <secteam> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Many People | CC: | delphij, emaste, op, secteam | ||||||||
Priority: | --- | Keywords: | patch, patch-ready, security | ||||||||
Version: | CURRENT | Flags: | junovitch:
mfc-stable10?
junovitch: mfc-stable9? |
||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Bug Depends on: | 200191 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Jason Unovitch
2016-01-18 23:57:27 UTC
Issue #2 Segfault/infinite loop on malformed CPIO archives. This was patched by delphij@ in head at 282932 [1]. It is in 10.2-RELEASE as part of stable/10 in r283259 [2]. 9.3-RELEASE does not seem to be impacted (too old?). 10.1-RELEASE is impacted. I've validated this in a Poudriere 10.1-RELEASE jail that the base `tar' will spin at 100% CPU while extracting the `crash_dos.tar' available at the upstream bug report [3]. I've also noticed Debian has assigned a temporary bug idea on their security page [4]. It feels like while we are here we can address this in 10.1-RELEASE. [1] https://svnweb.freebsd.org/base?view=revision&revision=282932 [2] https://svnweb.freebsd.org/base?view=revision&revision=283259 [3] https://github.com/libarchive/libarchive/issues/502 [4] https://security-tracker.debian.org/tracker/TEMP-0784213-45868B REPLICATION CASES: ##### FreeBSD 101amd64-default 10.1-RELEASE-p27 FreeBSD 10.1-RELEASE-p27 amd64 # tar xvf crash_dos.tar x .: Can't replace existing directory with non-directory 3251 root 1 92 0 27804K 2612K RUN 0 1:04 64.36% bsdtar ##### FreeBSD 101i386-default 10.1-RELEASE-p27 FreeBSD 10.1-RELEASE-p27 i386 # tar xvf crash_dos.tar x .: Can't replace existing directory with non-directory Fatal Internal Error in libarchive: Negative skip requested. ##### Fixed port # /usr/local/bin/bsdtar xvf crash_dos.tar x .: Can't replace existing directory with non-directory bsdtar: End of file trying to read next cpio header bsdtar: Error exit delayed from previous errors. Created attachment 165786 [details] vendor/libarchive/dist: Apply CVE-2013-0211 patch Affects: FreeBSD 9.3 CVE Name: CVE-2015-2304 Mitre's description: Integer signedness error in the archive_write_zip_data function in archive_write_set_format_zip.c in libarchive 3.1.2 and earlier, when running on 64-bit machines, allows context-dependent attackers to cause a denial of service (crash) via unspecified vectors, which triggers an improper conversion between unsigned and signed types, leading to a buffer overflow. Discussion: Fixed in head r248664 (https://svnweb.FreeBSD.org/base?view=revision&revision=248664) which has was part of 10.0-RELEASE. As this was not properly applied to vendor/libarchive, should the attached patch be applied? I was confused until I seen that r248664 was a direct commit to head without the MFV the other patches have taken. I haven't dug into the impact yet past this as this was the last issue I came across and I've already added it to the port. References: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0211 (In reply to Jason Unovitch from comment #1) Last comment: Add "depends on" closed bug 200191 as that was the original report for the crash/infinite loop issue described in comment 1 that still impacts releng/10.1. Created attachment 165895 [details] security/vuxml port: add base to existing libarchive entry Draft patch with some "XX"'s to fill in the blanks on entry in https://vuxml.FreeBSD.org/freebsd/7c63775e-be31-11e5-b5fe-002590263bf5.html Setting 'patch-ready'... `make universe' was good to go. Add to CC; are we going to look at lumping this in with the pre-announced OpenSSL security releases tomorrow? libarchive 3.2 with the fixes is due out in mid-March. https://github.com/libarchive/libarchive/issues/610 (In reply to Jason Unovitch from comment #0) CVE-2015-2304 -- https://www.freebsd.org/security/advisories/FreeBSD-SA-16:22.libarchive.asc (In reply to Jason Unovitch from comment #1) Never got a CVE (In reply to Jason Unovitch from comment #2) CVE-2013-0211 -- https://www.freebsd.org/security/advisories/FreeBSD-SA-16:23.libarchive.asc @delphij/@secteam feel free to close. Fix assignee for review and closure by someone on secteam@. |