Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
4e43dcd476
!61 [sync] PR-58: 【openEuler-20.03-LTS-SP1】backport upstream patch
From: @openeuler-sync-bot 
Reviewed-by: @zcfsite 
Signed-off-by: @zcfsite
2023-06-14 07:30:58 +00:00
yixiangzhike
e9fddb7a65 backport upstream patch
(cherry picked from commit b7ae2d775a885c446fef3fadfbeed39d36dd47ed)
2023-06-14 14:45:12 +08:00
openeuler-ci-bot
4e13489e6b
!55 [sync] PR-53: 【openEuler-20.03-LTS-SP1】add BuildRequires:gnutls-devel to support TLS
From: @openeuler-sync-bot 
Reviewed-by: @zcfsite 
Signed-off-by: @zcfsite
2023-04-20 01:11:55 +00:00
yixiangzhike
4601fc2092 add BuildRequires:gnutls-devel to support TLS
(cherry picked from commit 314eff2ee7056f3e215b57f46864db8119851230)
2023-04-19 17:03:48 +08:00
openeuler-ci-bot
5d9d61d376
!49 【openEuler-20.03-LTS-SP3】Fix CVE-2022-34903
From: @yixiangzhike 
Reviewed-by: @zcfsite 
Signed-off-by: @zcfsite
2022-08-15 07:09:53 +00:00
yixiangzhike
da1c88e624 Fix CVE-2022-34903
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
2022-08-15 10:27:00 +08:00
openeuler-ci-bot
e7c902ea9e !31 【openEuler-20.03-LTS-Next】Fix the insttools patch
From: @yixiangzhike
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
2021-08-02 06:38:39 +00:00
yixiangzhike
f0023e38ab Fix the insttools patch 2021-08-02 10:00:19 +08:00
openeuler-ci-bot
e1b6377fbc !26 【openEuler-20.03-LTS-Next】Add gcc to BuildRequires
From: @yixiangzhike
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
2021-05-26 14:40:55 +08:00
yixiangzhike
f6b0e756f7 Add gcc to BuildRequires 2021-05-26 11:28:01 +08:00
4 changed files with 106 additions and 2 deletions

View File

@ -0,0 +1,50 @@
From 34c649b3601383cd11dbc76221747ec16fd68e1b Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Tue, 14 Jun 2022 11:33:27 +0200
Subject: [PATCH] g10: Fix garbled status messages in NOTATION_DATA
* g10/cpr.c (write_status_text_and_buffer): Fix off-by-one
--
Depending on the escaping and line wrapping the computed remaining
buffer length could be wrong. Fixed by always using a break to
terminate the escape detection loop. Might have happened for all
status lines which may wrap.
GnuPG-bug-id: T6027
---
g10/cpr.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/g10/cpr.c b/g10/cpr.c
index 9bfdd3c34..fa8005d6f 100644
--- a/g10/cpr.c
+++ b/g10/cpr.c
@@ -372,20 +372,15 @@ write_status_text_and_buffer (int no, const char *string,
}
first = 0;
}
- for (esc=0, s=buffer, n=len; n && !esc; s++, n--)
+ for (esc=0, s=buffer, n=len; n; s++, n--)
{
if (*s == '%' || *(const byte*)s <= lower_limit
|| *(const byte*)s == 127 )
esc = 1;
if (wrap && ++count > wrap)
- {
- dowrap=1;
- break;
- }
- }
- if (esc)
- {
- s--; n++;
+ dowrap=1;
+ if (esc || dowrap)
+ break;
}
if (s != buffer)
es_fwrite (buffer, s-buffer, 1, statusfp);
--
2.27.0

View File

@ -0,0 +1,34 @@
From c300253181cfc591cbcae9251eda5296ed29591b Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Fri, 7 Oct 2022 14:12:33 +0200
Subject: [PATCH] common: Protect against a theoretical integer overflow in
tlv.c
* common/tlv.c (parse_ber_header): Protect agains integer overflow.
--
Although there is no concrete case where we use the (nhdr + length),
it is better to protect against this already here.
---
common/tlv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/common/tlv.c b/common/tlv.c
index abef83a37..9618d04cb 100644
--- a/common/tlv.c
+++ b/common/tlv.c
@@ -222,6 +222,11 @@ parse_ber_header (unsigned char const **buffer, size_t *size,
*r_length = len;
}
+ if (*r_length > *r_nhdr && (*r_nhdr + *r_length) < *r_length)
+ {
+ return gpg_err_make (default_errsource, GPG_ERR_EOVERFLOW);
+ }
+
/* Without this kludge some example certs can't be parsed. */
if (*r_class == CLASS_UNIVERSAL && !*r_tag)
*r_length = 0;
--
2.27.0

View File

@ -7,7 +7,7 @@ diff -up gnupg-2.1.21/tools/Makefile.am.insttools gnupg-2.1.21/tools/Makefile.am
if HAVE_USTAR
-# bin_SCRIPTS += gpg-zip
-noinst_SCRIPTS = gpg-zip
+bin_PROGRAMS += gpg-zip
+bin_SCRIPTS = gpg-zip
+#noinst_SCRIPTS = gpg-zip
endif

View File

@ -1,6 +1,6 @@
Name: gnupg2
Version: 2.2.21
Release: 2
Release: 7
Summary: Utility for secure communication and data storage
License: GPLv3+
@ -20,12 +20,17 @@ Patch9: gnupg-2.2.18-tests-add-test-cases-for-import-without-uid.patch
Patch10: gnupg-2.2.20-file-is-digest.patch
Patch11: gnupg-2.2.21-coverity.patch
Patch12: backport-CVE-2020-25125.patch
Patch13: backport-CVE-2022-34903.patch
Patch14: backport-common-Protect-against-a-theoretical-integer-overflow.patch
BuildRequires: gcc
BuildRequires: zlib-devel, npth-devel, gdb, texinfo
BuildRequires: libgpg-error-devel >= 1.31
BuildRequires: libgcrypt-devel >= 1.7.0
BuildRequires: libksba-devel >= 1.3.0
BuildRequires: libassuan-devel >= 2.1.0
# for TLS support
BuildRequires: gnutls-devel
Requires: libgcrypt >= 1.7.0
Requires: libgpg-error >= 1.31
@ -114,6 +119,21 @@ make check
%changelog
* Wed Jun 14 2023 yixiangzhike <yixiangzhike007@163.com> - 2.2.21-7
- backport upstream patch
* Wed Apr 19 2023 yixiangzhike <yixiangzhike007@163.com> - 2.2.21-6
- add BuildRequires:gnutls-devel to support TLS
* Mon Aug 15 2022 yixiangzhike <yixiangzhike007@163.com> - 2.2.21-5
- fix CVE-2022-34903
* Mon Aug 2 2021 yixiangzhike <zhangxingliang3@huawei.com> - 2.2.21-4
- fix the insttools patch
* Wed May 26 2021 yixiangzhike <zhangxingliang3@huawei.com> - 2.2.21-3
- add gcc to BuildRequires
* Mon Dec 28 2020 yixiangzhike <zhangxingliang3@huawei.com> - 2.2.21-2
- fix CVE-2020-25125