Bug 2073923 (CVE-2022-26612) - CVE-2022-26612 hadoop: Arbitrary file write in FileUtil#unpackEntries on Windows
Summary: CVE-2022-26612 hadoop: Arbitrary file write in FileUtil#unpackEntries on Windows
Keywords:
Status: NEW
Alias: CVE-2022-26612
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2076231 2076233 2076234 2076232 2076235 2076236
Blocks: 2073924
TreeView+ depends on / blocked
 
Reported: 2022-04-11 06:53 UTC by Avinash Hanwate
Modified: 2024-02-01 03:42 UTC (History)
62 users (show)

Fixed In Version: Apache Hadoop 3.2.3
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Apache Hadoop, where an unTar function bypasses a check. This flaw allows an attacker to write outside of the expected base directory on Windows.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Avinash Hanwate 2022-04-11 06:53:10 UTC
In Apache Hadoop, The unTar function uses unTarUsingJava function on Windows and the built-in tar utility on Unix and other OSes. As a result, a TAR entry may create a symlink under the expected extraction directory which points to an external directory. A subsequent TAR entry may extract an arbitrary file into the external directory using the symlink name. This however would be caught by the same targetDirPath check on Unix because of the getCanonicalPath call. However on Windows, getCanonicalPath doesn't resolve symbolic links, which bypasses the check. unpackEntries during TAR extraction follows symbolic links which allows writing outside expected base directory on Windows. This was addressed in Apache Hadoop 3.2.3

https://lists.apache.org/thread/hslo7wzw2449gv1jyjk8g6ttd7935fyz

Comment 1 Avinash Hanwate 2022-04-18 12:39:15 UTC
Created hadoop tracking bugs for this issue:

Affects: epel-all [bug 2076231]
Affects: fedora-all [bug 2076232]


Created openstack-sahara-tests tracking bugs for this issue:

Affects: openstack-rdo [bug 2076233]


Created python-sahara-plugin-mapr tracking bugs for this issue:

Affects: openstack-rdo [bug 2076234]


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