Compare commits
10 Commits
56fc384cb4
...
b7aeace1f0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7aeace1f0 | ||
|
|
964f157d2e | ||
|
|
f01538491d | ||
|
|
f541cbda16 | ||
|
|
1db11d444b | ||
|
|
dd6ad39cc3 | ||
|
|
431fb62412 | ||
|
|
43566000de | ||
|
|
eb4ba90e48 | ||
|
|
abf571a702 |
31
backport-CVE-2022-48303.patch
Normal file
31
backport-CVE-2022-48303.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 1d530107a24d71e798727d7f0afa0833473d1074 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Mužila <mmuzila@gmail.com>
|
||||
Date: Wed, 11 Jan 2023 08:55:58 +0100
|
||||
Subject: [PATCH] Fix savannah bug #62387
|
||||
|
||||
* src/list.c (from_header): Check for the end of field after leading byte
|
||||
(0x80 or 0xff) of base-256 encoded header value
|
||||
---
|
||||
src/list.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/list.c b/src/list.c
|
||||
index 9fafc425..bf41b581 100644
|
||||
--- a/src/list.c
|
||||
+++ b/src/list.c
|
||||
@@ -899,6 +899,12 @@ from_header (char const *where0, size_t digs, char const *type,
|
||||
<< (CHAR_BIT * sizeof (uintmax_t)
|
||||
- LG_256 - (LG_256 - 2)));
|
||||
value = (*where++ & ((1 << (LG_256 - 2)) - 1)) - signbit;
|
||||
+ if (where == lim)
|
||||
+ {
|
||||
+ if (type && !silent)
|
||||
+ ERROR ((0, 0, _("Archive base-256 value is invalid")));
|
||||
+ return -1;
|
||||
+ }
|
||||
for (;;)
|
||||
{
|
||||
value = (value << LG_256) + (unsigned char) *where++;
|
||||
--
|
||||
2.38.1
|
||||
|
||||
59
backport-CVE-2023-39804.patch
Normal file
59
backport-CVE-2023-39804.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From a339f05cd269013fa133d2f148d73f6f7d4247e4 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Poznyakoff <gray@gnu.org>
|
||||
Date: Sat, 28 Aug 2021 16:02:12 +0300
|
||||
Subject: Fix handling of extended header prefixes
|
||||
|
||||
* src/xheader.c (locate_handler): Recognize prefix keywords only
|
||||
when followed by a dot.
|
||||
(xattr_decoder): Use xmalloc/xstrdup instead of alloc
|
||||
---
|
||||
src/xheader.c | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/xheader.c b/src/xheader.c
|
||||
index 4f8b2b2..3cd694d 100644
|
||||
--- a/src/xheader.c
|
||||
+++ b/src/xheader.c
|
||||
@@ -637,11 +637,11 @@ static struct xhdr_tab const *
|
||||
locate_handler (char const *keyword)
|
||||
{
|
||||
struct xhdr_tab const *p;
|
||||
-
|
||||
for (p = xhdr_tab; p->keyword; p++)
|
||||
if (p->prefix)
|
||||
{
|
||||
- if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0)
|
||||
+ size_t kwlen = strlen (p->keyword);
|
||||
+ if (keyword[kwlen] == '.' && strncmp (p->keyword, keyword, kwlen) == 0)
|
||||
return p;
|
||||
}
|
||||
else
|
||||
@@ -1716,19 +1716,20 @@ xattr_decoder (struct tar_stat_info *st,
|
||||
char const *keyword, char const *arg, size_t size)
|
||||
{
|
||||
char *xstr, *xkey;
|
||||
-
|
||||
+
|
||||
/* copy keyword */
|
||||
- size_t klen_raw = strlen (keyword);
|
||||
- xkey = alloca (klen_raw + 1);
|
||||
- memcpy (xkey, keyword, klen_raw + 1) /* including null-terminating */;
|
||||
+ xkey = xstrdup (keyword);
|
||||
|
||||
/* copy value */
|
||||
- xstr = alloca (size + 1);
|
||||
+ xstr = xmalloc (size + 1);
|
||||
memcpy (xstr, arg, size + 1); /* separator included, for GNU tar '\n' */;
|
||||
|
||||
xattr_decode_keyword (xkey);
|
||||
|
||||
- xheader_xattr_add (st, xkey + strlen("SCHILY.xattr."), xstr, size);
|
||||
+ xheader_xattr_add (st, xkey + strlen ("SCHILY.xattr."), xstr, size);
|
||||
+
|
||||
+ free (xkey);
|
||||
+ free (xstr);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
cgit v1.1
|
||||
@ -16,10 +16,10 @@ http://lists.gnu.org/archive/html/bug-tar/2009-06/msg00016.html
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/create.c b/src/create.c
|
||||
index e2f4ede..f644f23 100644
|
||||
index 6c99c74..4ee8334 100644
|
||||
--- a/src/create.c
|
||||
+++ b/src/create.c
|
||||
@@ -1824,7 +1824,8 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
|
||||
@@ -1840,7 +1840,8 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
|
||||
}
|
||||
else if (atime_preserve_option == replace_atime_preserve
|
||||
&& fd && (is_dir || original_size != 0)
|
||||
@ -30,5 +30,5 @@ index e2f4ede..f644f23 100644
|
||||
}
|
||||
|
||||
--
|
||||
1.9.3
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@ -15,10 +15,10 @@ Related: #903666
|
||||
1 file changed, 67 insertions(+)
|
||||
|
||||
diff --git a/doc/tar.texi b/doc/tar.texi
|
||||
index a000f3f..2695d22 100644
|
||||
index ff002a9..b66b163 100644
|
||||
--- a/doc/tar.texi
|
||||
+++ b/doc/tar.texi
|
||||
@@ -8051,6 +8051,73 @@ The following table summarizes pattern-matching default values:
|
||||
@@ -8441,6 +8441,73 @@ The following table summarizes pattern-matching default values:
|
||||
@item Exclusion @tab @option{--wildcards --no-anchored --wildcards-match-slash}
|
||||
@end multitable
|
||||
|
||||
@ -93,5 +93,5 @@ index a000f3f..2695d22 100644
|
||||
@section Quoting Member Names
|
||||
|
||||
--
|
||||
1.9.3
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@ -10,10 +10,10 @@ Resolves: #135601
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/list.c b/src/list.c
|
||||
index b4277e0..0c7a740 100644
|
||||
index d7ef441..0bf1ef8 100644
|
||||
--- a/src/list.c
|
||||
+++ b/src/list.c
|
||||
@@ -240,6 +240,14 @@ read_and (void (*do_something) (void))
|
||||
@@ -241,6 +241,14 @@ read_and (void (*do_something) (void))
|
||||
|
||||
if (!ignore_zeros_option)
|
||||
{
|
||||
@ -28,7 +28,7 @@ index b4277e0..0c7a740 100644
|
||||
char buf[UINTMAX_STRSIZE_BOUND];
|
||||
|
||||
status = read_header (¤t_header, ¤t_stat_info,
|
||||
@@ -249,6 +257,9 @@ read_and (void (*do_something) (void))
|
||||
@@ -250,6 +258,9 @@ read_and (void (*do_something) (void))
|
||||
WARNOPT (WARN_ALONE_ZERO_BLOCK,
|
||||
(0, 0, _("A lone zero block at %s"),
|
||||
STRINGIFY_BIGINT (current_block_ordinal (), buf)));
|
||||
@ -39,5 +39,5 @@ index b4277e0..0c7a740 100644
|
||||
}
|
||||
status = prev_status;
|
||||
--
|
||||
1.9.3
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@ -17,10 +17,10 @@ http://lists.gnu.org/archive/html/bug-tar/2006-02/msg00000.html
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/system.c b/src/system.c
|
||||
index 9414233..37e9a3e 100644
|
||||
index 9e273bc..e62edd8 100644
|
||||
--- a/src/system.c
|
||||
+++ b/src/system.c
|
||||
@@ -243,8 +243,25 @@ sys_compare_links (struct stat *link_data, struct stat *stat_data)
|
||||
@@ -244,8 +244,25 @@ sys_compare_links (struct stat *link_data, struct stat *stat_data)
|
||||
int
|
||||
sys_truncate (int fd)
|
||||
{
|
||||
@ -48,5 +48,5 @@ index 9414233..37e9a3e 100644
|
||||
|
||||
/* Return nonzero if NAME is the name of a regular file, or if the file
|
||||
--
|
||||
1.9.3
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@ -14,10 +14,10 @@ Resolves: #206841
|
||||
3 files changed, 10 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/doc/tar.texi b/doc/tar.texi
|
||||
index a8969e0..0185157 100644
|
||||
index fba10ae..ff002a9 100644
|
||||
--- a/doc/tar.texi
|
||||
+++ b/doc/tar.texi
|
||||
@@ -8439,7 +8439,7 @@ The following table summarizes pattern-matching default values:
|
||||
@@ -8437,7 +8437,7 @@ The following table summarizes pattern-matching default values:
|
||||
|
||||
@multitable @columnfractions .3 .7
|
||||
@headitem Members @tab Default settings
|
||||
@ -26,7 +26,7 @@ index a8969e0..0185157 100644
|
||||
@item Exclusion @tab @option{--wildcards --no-anchored --wildcards-match-slash}
|
||||
@end multitable
|
||||
|
||||
@@ -12915,6 +12915,9 @@ version of this document is available at
|
||||
@@ -12948,6 +12948,9 @@ is available at
|
||||
@table @asis
|
||||
@item Use of globbing patterns when listing and extracting.
|
||||
|
||||
@ -37,19 +37,19 @@ index a8969e0..0185157 100644
|
||||
extracting from or listing an archive. For example:
|
||||
|
||||
diff --git a/src/names.c b/src/names.c
|
||||
index 037b869..d96ad71 100644
|
||||
index 272653d..a592faa 100644
|
||||
--- a/src/names.c
|
||||
+++ b/src/names.c
|
||||
@@ -137,7 +137,7 @@ static struct argp_option names_options[] = {
|
||||
@@ -142,7 +142,7 @@ static struct argp_option names_options[] = {
|
||||
{"no-ignore-case", NO_IGNORE_CASE_OPTION, 0, 0,
|
||||
N_("case sensitive matching (default)"), GRID+1 },
|
||||
N_("case sensitive matching (default)"), GRID_MATCH },
|
||||
{"wildcards", WILDCARDS_OPTION, 0, 0,
|
||||
- N_("use wildcards (default for exclusion)"), GRID+1 },
|
||||
+ N_("use wildcards (default)"), GRID+1 },
|
||||
- N_("use wildcards (default for exclusion)"), GRID_MATCH },
|
||||
+ N_("use wildcards (default)"), GRID_MATCH },
|
||||
{"no-wildcards", NO_WILDCARDS_OPTION, 0, 0,
|
||||
N_("verbatim string matching"), GRID+1 },
|
||||
N_("verbatim string matching"), GRID_MATCH },
|
||||
{"wildcards-match-slash", WILDCARDS_MATCH_SLASH_OPTION, 0, 0,
|
||||
@@ -195,8 +195,7 @@ names_parse_opt (int key, char *arg, struct argp_state *state)
|
||||
@@ -225,8 +225,7 @@ names_parse_opt (int key, char *arg, struct argp_state *state)
|
||||
/* Wildcard matching settings */
|
||||
enum wildcards
|
||||
{
|
||||
@ -59,7 +59,7 @@ index 037b869..d96ad71 100644
|
||||
disable_wildcards,
|
||||
enable_wildcards
|
||||
};
|
||||
@@ -214,7 +213,7 @@ static int include_anchored = EXCLUDE_ANCHORED;
|
||||
@@ -244,7 +243,7 @@ static int include_anchored = EXCLUDE_ANCHORED;
|
||||
| recursion_option)
|
||||
|
||||
#define INCLUDE_OPTIONS \
|
||||
@ -68,7 +68,7 @@ index 037b869..d96ad71 100644
|
||||
| include_anchored \
|
||||
| matching_flags \
|
||||
| recursion_option)
|
||||
@@ -1234,8 +1233,7 @@ regex_usage_warning (const char *name)
|
||||
@@ -1393,8 +1392,7 @@ regex_usage_warning (const char *name)
|
||||
|
||||
/* Warn about implicit use of the wildcards in command line arguments.
|
||||
(Default for tar prior to 1.15.91, but changed afterwards) */
|
||||
@ -78,7 +78,7 @@ index 037b869..d96ad71 100644
|
||||
{
|
||||
warned_once = 1;
|
||||
WARN ((0, 0,
|
||||
@@ -1618,10 +1616,7 @@ collect_and_sort_names (void)
|
||||
@@ -1768,10 +1766,7 @@ collect_and_sort_names (void)
|
||||
|
||||
if (name->found_count || name->directory)
|
||||
continue;
|
||||
@ -91,7 +91,7 @@ index 037b869..d96ad71 100644
|
||||
|
||||
if (name->name[0] == 0)
|
||||
diff --git a/tests/exclude01.at b/tests/exclude01.at
|
||||
index c3cd10b..c590047 100644
|
||||
index a813c6e..3a546fc 100644
|
||||
--- a/tests/exclude01.at
|
||||
+++ b/tests/exclude01.at
|
||||
@@ -61,6 +61,7 @@ testdir/dir2/file2
|
||||
@ -103,5 +103,5 @@ index c3cd10b..c590047 100644
|
||||
testdir/dir1/*
|
||||
NEXT
|
||||
--
|
||||
2.5.5
|
||||
1.8.3.1
|
||||
|
||||
|
||||
BIN
tar-1.32.tar.xz
BIN
tar-1.32.tar.xz
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iG4EABECAC4WIQQyX2UMTCtq1YgHMno2ArB/VdDHMgUCXHFHdhAcZ3JheUBnbnUu
|
||||
b3JnLnVhAAoJEDYCsH9V0Mcy61oAni2Gwnao+qzsebDfH3ePo4FWdHKEAJ9IP8h7
|
||||
f96xDOstDrfKQjY/tqUrWg==
|
||||
=eh8f
|
||||
-----END PGP SIGNATURE-----
|
||||
BIN
tar-1.34.tar.xz
Normal file
BIN
tar-1.34.tar.xz
Normal file
Binary file not shown.
7
tar-1.34.tar.xz.sig
Normal file
7
tar-1.34.tar.xz.sig
Normal file
@ -0,0 +1,7 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1
|
||||
|
||||
iEYEABECAAYFAmAnuBMACgkQNgKwf1XQxzJIVgCfR5Z7coRkU2+aOW4KNhumGl/1
|
||||
jn4AoI9OuQPpyzZN1CIwejDYxbV7u59P
|
||||
=mfma
|
||||
-----END PGP SIGNATURE-----
|
||||
60
tar-Add-sw64-architecture.patch
Normal file
60
tar-Add-sw64-architecture.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From 7e8239c9e6dd50431f221d72716b20c0411eab0e Mon Sep 17 00:00:00 2001
|
||||
From: Wu Zixuan <wuzx1226@qq.com>
|
||||
Date: Thu, 24 Nov 2022 14:59:00 +0800
|
||||
Subject: [PATCH] Add sw64 architecture
|
||||
|
||||
Add sw64 architecture in file m4/host-cpu-c-abi.m4 to support sw64 architecture.
|
||||
|
||||
Signed-off-by: wzx <wuzx1226@qq.com>
|
||||
---
|
||||
m4/host-cpu-c-abi.m4 | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
|
||||
index 7dc830e..b4c0830 100644
|
||||
--- a/m4/host-cpu-c-abi.m4
|
||||
+++ b/m4/host-cpu-c-abi.m4
|
||||
@@ -90,6 +90,12 @@ changequote([,])dnl
|
||||
[gl_cv_host_cpu_c_abi=i386])
|
||||
;;
|
||||
|
||||
+changequote(,)dnl
|
||||
+ sw_64* )
|
||||
+changequote([,])dnl
|
||||
+ gl_cv_host_cpu_c_abi=sw_64
|
||||
+ ;;
|
||||
+
|
||||
changequote(,)dnl
|
||||
alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
|
||||
changequote([,])dnl
|
||||
@@ -355,6 +361,9 @@ EOF
|
||||
#ifndef __x86_64__
|
||||
#undef __x86_64__
|
||||
#endif
|
||||
+#ifndef __sw_64__
|
||||
+#undef __sw_64__
|
||||
+#endif
|
||||
#ifndef __alpha__
|
||||
#undef __alpha__
|
||||
#endif
|
||||
@@ -468,7 +477,7 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
|
||||
case "$gl_cv_host_cpu_c_abi" in
|
||||
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
|
||||
gl_cv_host_cpu_c_abi_32bit=yes ;;
|
||||
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
||||
+ x86_64 | sw_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
|
||||
gl_cv_host_cpu_c_abi_32bit=no ;;
|
||||
*)
|
||||
gl_cv_host_cpu_c_abi_32bit=unknown ;;
|
||||
@@ -498,7 +507,7 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
|
||||
|
||||
# CPUs that only support a 64-bit ABI.
|
||||
changequote(,)dnl
|
||||
- alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
||||
+ sw_64* | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
|
||||
| mmix )
|
||||
changequote([,])dnl
|
||||
gl_cv_host_cpu_c_abi_32bit=no
|
||||
--
|
||||
2.33.0
|
||||
|
||||
31
tar.spec
31
tar.spec
@ -1,6 +1,6 @@
|
||||
Name: tar
|
||||
Version: 1.32
|
||||
Release: 3
|
||||
Version: 1.34
|
||||
Release: 5
|
||||
Epoch: 2
|
||||
Summary: An organized and systematic method of controlling a large amount of data
|
||||
License: GPLv3+
|
||||
@ -8,17 +8,19 @@ URL: http://www.gnu.org/software/tar/
|
||||
Source0: https://ftp.gnu.org/gnu/tar/tar-%{version}.tar.xz
|
||||
Source1: https://ftp.gnu.org/gnu/tar/tar-%{version}.tar.xz.sig
|
||||
|
||||
Patch6000: backport-CVE-2021-20193.patch
|
||||
|
||||
BuildRequires: autoconf automake texinfo gettext libacl-devel attr acl policycoreutils
|
||||
BuildRequires: gcc
|
||||
Provides: bundled(gnulib) /bin/tar /bin/gtar
|
||||
|
||||
Patch6000: backport-CVE-2022-48303.patch
|
||||
|
||||
Patch0001: tar-1.28-loneZeroWarning.patch
|
||||
Patch0002: tar-1.28-vfatTruncate.patch
|
||||
Patch0003: tar-1.29-wildcards.patch
|
||||
Patch0004: tar-1.28-atime-rofs.patch
|
||||
Patch0005: tar-1.28-document-exclude-mistakes.patch
|
||||
Patch0006: tar-Add-sw64-architecture.patch
|
||||
Patch0007: backport-CVE-2023-39804.patch
|
||||
|
||||
%description
|
||||
GNU Tar provides the ability to create tar archives, as well as various other
|
||||
@ -77,13 +79,28 @@ make check
|
||||
%{_infodir}/tar.info*
|
||||
|
||||
%changelog
|
||||
* Thu Jun 10 2021 shixuantong <shixuantong> - 1.32-3
|
||||
* Mon Dec 04 2023 liningjie <liningjie@xfusion.com> 2:1.34-5
|
||||
- fix CVE-2023-39840
|
||||
|
||||
* Wed Feb 08 2023 wangjiang <wangjiang37@h-partners.com> 2:1.34-4
|
||||
- fix CVE-2022-48303
|
||||
|
||||
* Fri Nov 11 2022 wuzx<wuzx1226@qq.com> - 2:1.34-3
|
||||
- Add sw64 architecture
|
||||
|
||||
* Thu Oct 27 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2:1.34-2
|
||||
- Rebuild for next release
|
||||
|
||||
* Sat Nov 13 2021 shixuantong <shixuantong> - 2:1.34-1
|
||||
- update version to 1.34
|
||||
|
||||
* Thu Jun 10 2021 shixuantong <shixuantong> - 2:1.32-3
|
||||
- add gcc to BuildRequires
|
||||
|
||||
* Wed Apr 14 2021 shixuantong <shixuantong> - 1.32-2
|
||||
* Wed Apr 14 2021 shixuantong <shixuantong> - 2:1.32-2
|
||||
- fix CVE-2021-20193
|
||||
|
||||
* Mon Jul 27 2020 shixuantong <shixuantong> - 1.32-1
|
||||
* Mon Jul 27 2020 shixuantong <shixuantong> - 2:1.32-1
|
||||
- update to 1.32-1
|
||||
|
||||
* Tue Feb 18 2020 openEuler Buildteam <buildteam@openeuler.org> - 2:1.30-11
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user