Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security] Bump pear/archive_tar from 1.4.11 to 1.4.12 #602

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -31,6 +31,7 @@ doctrine/inflector/tests
doctrine/lexer/composer.json
doctrine/lexer/LICENSE

pear/archive_tar/.github
pear/archive_tar/.travis.sh
pear/archive_tar/.travis.yml
pear/archive_tar/tests/
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -29,7 +29,7 @@
"nikic/php-parser": "^4.2",
"patchwork/jsqueeze": "^2.0",
"patchwork/utf8": "1.3.1",
"pear/archive_tar": "1.4.11",
"pear/archive_tar": "1.4.12",
"pear/pear-core-minimal": "^v1.10",
"phpseclib/phpseclib": "2.0.23",
"php-opencloud/openstack": "3.0.6",
Expand Down
23 changes: 17 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion composer/include_paths.php
Expand Up @@ -6,8 +6,8 @@
$baseDir = $vendorDir;

return array(
$vendorDir . '/pear/archive_tar',
$vendorDir . '/pear/console_getopt',
$vendorDir . '/pear/pear-core-minimal/src',
$vendorDir . '/pear/pear_exception',
$vendorDir . '/pear/archive_tar',
);
22 changes: 16 additions & 6 deletions composer/installed.json
Expand Up @@ -2094,17 +2094,17 @@
},
{
"name": "pear/archive_tar",
"version": "1.4.11",
"version_normalized": "1.4.11.0",
"version": "1.4.12",
"version_normalized": "1.4.12.0",
"source": {
"type": "git",
"url": "https://github.com/pear/Archive_Tar.git",
"reference": "17d355cb7d3c4ff08e5729f29cd7660145208d9d"
"reference": "19bb8e95490d3e3ad92fcac95500ca80bdcc7495"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/17d355cb7d3c4ff08e5729f29cd7660145208d9d",
"reference": "17d355cb7d3c4ff08e5729f29cd7660145208d9d",
"url": "https://api.github.com/repos/pear/Archive_Tar/zipball/19bb8e95490d3e3ad92fcac95500ca80bdcc7495",
"reference": "19bb8e95490d3e3ad92fcac95500ca80bdcc7495",
"shasum": ""
},
"require": {
Expand All @@ -2119,7 +2119,7 @@
"ext-xz": "Lzma2 compression support.",
"ext-zlib": "Gzip compression support."
},
"time": "2020-11-19T22:10:24+00:00",
"time": "2021-01-18T19:32:54+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -2158,6 +2158,16 @@
"keywords": [
"archive",
"tar"
],
"funding": [
{
"url": "https://github.com/mrook",
"type": "github"
},
{
"url": "https://www.patreon.com/michielrook",
"type": "patreon"
}
]
},
{
Expand Down
22 changes: 17 additions & 5 deletions pear/archive_tar/Archive/Tar.php
Expand Up @@ -1397,16 +1397,20 @@ public function _writeHeader($p_filename, $p_stored_filename)

$v_magic = 'ustar ';
$v_version = ' ';
$v_uname = '';
$v_gname = '';

if (function_exists('posix_getpwuid')) {
$userinfo = posix_getpwuid($v_info[4]);
$groupinfo = posix_getgrgid($v_info[5]);

$v_uname = $userinfo['name'];
$v_gname = $groupinfo['name'];
} else {
$v_uname = '';
$v_gname = '';
if (isset($userinfo['name'])) {
$v_uname = $userinfo['name'];
}

if (isset($groupinfo['name'])) {
$v_gname = $groupinfo['name'];
}
}

$v_devmajor = '';
Expand Down Expand Up @@ -2120,6 +2124,14 @@ public function _extractList(
}
}
} elseif ($v_header['typeflag'] == "2") {
if (strpos(realpath(dirname($v_header['link'])), realpath($p_path)) !== 0) {
$this->_error(
'Out-of-path file extraction {'
. $v_header['filename'] . ' --> ' .
$v_header['link'] . '}'
);
return false;
}
if (!$p_symlinks) {
$this->_warning('Symbolic links are not allowed. '
. 'Unable to extract {'
Expand Down
26 changes: 20 additions & 6 deletions pear/archive_tar/package.xml
Expand Up @@ -32,10 +32,10 @@ Also Lzma2 compressed archives are supported with xz extension.</description>
<email>stig@php.net</email>
<active>no</active>
</helper>
<date>2020-11-19</date>
<time>22:06:48</time>
<date>2021-01-18</date>
<time>19:29:56</time>
<version>
<release>1.4.11</release>
<release>1.4.12</release>
<api>1.4.0</api>
</version>
<stability>
Expand All @@ -44,8 +44,7 @@ Also Lzma2 compressed archives are supported with xz extension.</description>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
* Fix Bug #27002: Filename manipulation vulnerabilities (CVE-2020-28948 /
CVE-2020-28949) [mrook]
* Fix Bug #27008: Symlink out-of-path write vulnerability (CVE-2020-36193) [mrook]
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -75,7 +74,22 @@ Also Lzma2 compressed archives are supported with xz extension.</description>
</dependencies>
<phprelease />
<changelog>
<release>
<release>
<version>
<release>1.4.11</release>
<api>1.4.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2020-11-19</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
* Fix Bug #27002: Filename manipulation vulnerabilities (CVE-2020-28948 / CVE-2020-28949) [mrook]
</notes>
</release>
<release>
<version>
<release>1.4.10</release>
<api>1.4.0</api>
Expand Down