Bug 1593020 - CVE-2018-8009 hadoop: arbitrary file write vulnerability / arbitrary code execution using a specially crafted zip file [fedora-all]
Summary: CVE-2018-8009 hadoop: arbitrary file write vulnerability / arbitrary code exe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hadoop
Version: 28
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Christopher Tubbs
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2018-8009
TreeView+ depends on / blocked
 
Reported: 2018-06-19 21:06 UTC by Laura Pardo
Modified: 2018-07-15 03:32 UTC (History)
4 users (show)

Fixed In Version: hadoop-2.7.6-4.fc28
Doc Type: Release Note
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-15 03:32:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Laura Pardo 2018-06-19 21:06:12 UTC
This is an automatically created tracking bug!  It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.

For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.

For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs

When submitting as an update, use the fedpkg template provided in the next
comment(s).  This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.

Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.

NOTE: this issue affects multiple supported versions of Fedora. While only
one tracking bug has been filed, please correct all affected versions at
the same time.  If you need to fix the versions independent of each other,
you may clone this bug as appropriate.

Comment 1 Laura Pardo 2018-06-19 21:06:17 UTC
Use the following template to for the 'fedpkg update' request to submit an
update for this issue as it contains the top-level parent bug(s) as well as
this tracking bug.  This will ensure that all associated bugs get updated
when new packages are pushed to stable.

=====

# bugfix, security, enhancement, newpackage (required)
type=security

# testing, stable
request=testing

# Bug numbers: 1234,9876
bugs=1593018,1593020

# Description of your update
notes=Security fix for [PUT CVEs HERE]

# Enable request automation based on the stable/unstable karma thresholds
autokarma=True
stable_karma=3
unstable_karma=-3

# Automatically close bugs when this marked as stable
close_bugs=True

# Suggest that users restart after update
suggest_reboot=False

======

Additionally, you may opt to use the bodhi web interface to submit updates:

https://bodhi.fedoraproject.org/updates/new

Comment 2 Christopher Tubbs 2018-07-04 02:31:39 UTC
There are no details on this "reserved" CVE, and the description does not appear to be relevant to the Hadoop package (any bug pertaining to zip file extraction would be in libraries Hadoop uses, not in Hadoop code). The security tracking bug that this blocks has already been closed as NOTABUG. I also can't find any mention of this CVE number in the upstream mailing lists. I'm closing this one for now also as NOTABUG... feel free to re-open if there's actually a security bug to report against Hadoop.

Comment 3 Tomas Hoger 2018-07-04 12:12:45 UTC
(In reply to Christopher Tubbs from comment #2)
> There are no details on this "reserved" CVE, and the description does not
> appear to be relevant to the Hadoop package (any bug pertaining to zip file
> extraction would be in libraries Hadoop uses, not in Hadoop code).

See bug 1593018 comment 0 that has link to Hadoop upstream commit that fixes directory traversal in the Zip extraction code.

> The security tracking bug that this blocks has already been closed as NOTABUG.

That's because it did not affect any Red Hat product.  That state should not be assumed to make any implications about affectedness of upstream Hadoop or Hadoop packages in Fedora.

> I also can't find any mention of this CVE number in the upstream mailing
> lists. I'm closing this one for now also as NOTABUG... feel free to re-open
> if there's actually a security bug to report against Hadoop.

Not sure how upstream decided to handle it wrt announcing it as security, but they did apply the fix as noted above.

Comment 4 Christopher Tubbs 2018-07-04 17:09:15 UTC
I can certainly reopen and backport the patch... it's just this whole CVE was handled very poorly.

First, the parent security tracking bug should not have been closed since it was blocked by this one for fedora-all and RedHat's private one, rhbz#1593021. Since it was closed as NOTABUG, it implies that none of the issues blocking it are bugs.

Second, the CVE still isn't a proper CVE, but merely reserved as a placeholder, making it difficult to research whether this applies to any actual fedora product, and I'm not familiar enough with the issue to know if it's definitely a bug or just a possible bug.

Third, it doesn't appear upstream was ever notified as it was never discussed on their mailing lists.

Fourth, the patch in the upstream git repo which has been alleged to fix this bug makes no such claim in its log message, and is simply identified as "Additional checks". There is no upstream bug tracker for this issue and no way to associate it with a CVE or any particular bug. There also seems to be an additional commit in other parts of the code that may be related, with a similar "Additional checks" log message.

It appears that the upstream patches have been applied to the not-yet-released 2.7.7 version, and 3.0.3 and I'm not sure about the latest 3.1.x or higher:

git clone git:apache/hadoop && cd hadoop
for x in $(git graph --no-color $(git ba | awk '{print $1}' | cut -c9- | grep origin)  | cat | grep 'Additional check when unpacking archives' | tr -d '|*' | cut -f1 -dA | grep -o '[^ ]*'); do git tag --contains $x | cat; done | sort -u

We can either backport the two upstream commits from 2.7.7 or we can wait until 2.7.7 is released and update from 2.7.6 to 2.7.7.

Comment 5 Christopher Tubbs 2018-07-04 17:11:27 UTC
In the above command, `git graph` is an alias for `git log --graph --oneline --decorate` and `git ba` is an alias for `git branch -avv`. I forgot I had those local aliases.

Comment 6 Christopher Tubbs 2018-07-04 17:18:12 UTC
Also, because upstream has the terrible habit of cherry-picking across multiple incomprehensible maintenance branches without consistent naming, amidst a vast haystack full of inactive branches, it's nearly impossible to track which versions are fixed and which aren't without an upstream issue, which doesn't exist in this case. 2.7 appears to have a fix pending, 2.8 and 2.9 appear untouched. 3.0.3 appears to have a release with the fix, but 3.1 does not. It's *so* confusing.

Comment 7 Fedora Update System 2018-07-06 04:38:56 UTC
hadoop-2.7.6-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e5a8b72d0d

Comment 8 Fedora Update System 2018-07-06 17:53:27 UTC
hadoop-2.7.6-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e5a8b72d0d

Comment 9 Fedora Update System 2018-07-15 03:32:16 UTC
hadoop-2.7.6-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


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