mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
tar: add patch for CVE-2016-6321
This commit is contained in:
parent
1d0e762831
commit
d95a0b0706
2 changed files with 28 additions and 1 deletions
27
srcpkgs/tar/patches/tar-1.29-extract-pathname-bypass.patch
Normal file
27
srcpkgs/tar/patches/tar-1.29-extract-pathname-bypass.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
--- lib/paxnames.c.orig 2016-04-06 00:04:47.314860045 +0300
|
||||||
|
+++ lib/paxnames.c 2016-04-06 02:08:44.962297881 +0300
|
||||||
|
@@ -18,6 +18,7 @@
|
||||||
|
#include <system.h>
|
||||||
|
#include <hash.h>
|
||||||
|
#include <paxlib.h>
|
||||||
|
+#include <quotearg.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* Hash tables of strings. */
|
||||||
|
@@ -114,7 +115,15 @@
|
||||||
|
for (p = file_name + prefix_len; *p; )
|
||||||
|
{
|
||||||
|
if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
|
||||||
|
- prefix_len = p + 2 - file_name;
|
||||||
|
+ {
|
||||||
|
+ static char const *const diagnostic[] =
|
||||||
|
+ {
|
||||||
|
+ N_("%s: Member name contains '..'"),
|
||||||
|
+ N_("%s: Hard link target contains '..'")
|
||||||
|
+ };
|
||||||
|
+ ERROR ((0, 0, _(diagnostic[link_target]),
|
||||||
|
+ quotearg_colon (file_name)));
|
||||||
|
+ }
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
|
@ -1,7 +1,7 @@
|
||||||
# Template build file for 'tar'.
|
# Template build file for 'tar'.
|
||||||
pkgname=tar
|
pkgname=tar
|
||||||
version=1.29
|
version=1.29
|
||||||
revision=1
|
revision=2
|
||||||
bootstrap=yes
|
bootstrap=yes
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="gl_cv_struct_dirent_d_ino=yes"
|
configure_args="gl_cv_struct_dirent_d_ino=yes"
|
||||||
|
|
Loading…
Add table
Reference in a new issue