Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
b7aeace1f0
!47 [sync] PR-46: fix CVE-2023-39804
From: @openeuler-sync-bot 
Reviewed-by: @gaoruoshu 
Signed-off-by: @gaoruoshu
2023-12-22 03:15:32 +00:00
zhoupengcheng
964f157d2e fix CVE-2023-39804
(cherry picked from commit 46929109b7f9bd7dc5024299d23bf29548b537f9)
2023-12-22 10:38:15 +08:00
openeuler-ci-bot
f01538491d
!30 [sync] PR-27: fix CVE-2022-48303
From: @openeuler-sync-bot 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2023-02-09 09:21:41 +00:00
wangjiang
f541cbda16 fix CVE-2022-48303
(cherry picked from commit 1f1003635ed4de8cbbea97d87c51a70f8893f27f)
2023-02-09 16:21:06 +08:00
openeuler-ci-bot
1db11d444b
!24 [sync] PR-18: 添加sw架构
From: @openeuler-sync-bot 
Reviewed-by: @lvying6 
Signed-off-by: @lvying6
2022-12-06 09:30:10 +00:00
Wu Zixuan
dd6ad39cc3 Add sw64 architecture
Signed-off-by: Wu Zixuan <wuzx1226@qq.com>
(cherry picked from commit 89bd7e68579e1af487e615c5331fe12676e976e9)
2022-12-02 11:20:04 +08:00
openeuler-ci-bot
431fb62412
!21 【轻量级 PR】:Rebuild for next release
From: @dongyuzhen 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-10-29 02:32:29 +00:00
dongyuzhen
43566000de
update for mass rebuild and upgrade verification
Signed-off-by: dongyuzhen <dongyuzhen@h-partners.com>
2022-10-27 06:53:16 +00:00
openeuler-ci-bot
eb4ba90e48 !17 [sync] PR-16: update version to 1.34
Merge pull request !17 from openeuler-sync-bot/sync-pr16-master-to-openEuler-22.03-LTS-Next
2021-12-23 10:30:34 +00:00
shixuantong
abf571a702 update version to 1.34
(cherry picked from commit 3cabbb155bb9f5428f3ae7af424c5703f01c2821)
2021-12-20 12:40:53 +08:00
13 changed files with 209 additions and 42 deletions

View 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

View 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

View File

@ -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

View File

@ -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

View File

@ -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 (&current_header, &current_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

View File

@ -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

View File

@ -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

Binary file not shown.

View File

@ -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

Binary file not shown.

7
tar-1.34.tar.xz.sig Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAmAnuBMACgkQNgKwf1XQxzJIVgCfR5Z7coRkU2+aOW4KNhumGl/1
jn4AoI9OuQPpyzZN1CIwejDYxbV7u59P
=mfma
-----END PGP SIGNATURE-----

View 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

View File

@ -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