Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
1abe3c80d1
!63 [sync] PR-59: 【openEuler-22.03-LTS-SP2】backport upstream patch
From: @openeuler-sync-bot 
Reviewed-by: @zcfsite 
Signed-off-by: @zcfsite
2023-06-14 07:31:43 +00:00
yixiangzhike
31d53f50ce backport upstream patch
(cherry picked from commit 8b05750238c3ba5450491013d2b14e834059bb42)
2023-06-14 14:45:38 +08:00
openeuler-ci-bot
336a849373
!56 [sync] PR-54: 【openEuler-22.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:12:14 +00:00
yixiangzhike
fb71c1f427 add BuildRequires:gnutls-devel to support TLS
(cherry picked from commit 7e7265109a865b3590743d1c1d56d7b90de602fa)
2023-04-19 17:04:21 +08:00
openeuler-ci-bot
7fe91991b9
!47 【openEuler-22.03-LTS-Next】Fix CVE-2022-34903
From: @yixiangzhike 
Reviewed-by: @zcfsite 
Signed-off-by: @zcfsite
2022-08-15 07:08:26 +00:00
yixiangzhike
84d5794702 Fix CVE-2022-34903
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
2022-08-15 10:16:32 +08:00
openeuler-ci-bot
173ea7a19c
!42 【openEuler-22.03-LTS-Next】Need require new version libgpg-error(1.41) and libgcrypt(1.9.4)
From: @yixiangzhike 
Reviewed-by: @zhujianwei001 
Signed-off-by: @zhujianwei001
2022-07-05 06:30:28 +00:00
yixiangzhike
38f555b5a6 need require new version libgpg-error(1.41) and libgcrypt(1.9.4)
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
2022-06-27 16:03:41 +08:00
openeuler-ci-bot
36cde2f510 !35 【openEuler-22.03-LTS-Next】Update to 2.2.32
Merge pull request !35 from yixiangzhike/openEuler-22.03-LTS-Next
2021-12-14 11:10:19 +00:00
yixiangzhike
d3d569f43f Update to 2.2.32 2021-12-10 16:09:38 +08:00
7 changed files with 109 additions and 6 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

Binary file not shown.

Binary file not shown.

BIN
gnupg-2.2.32.tar.bz2 Normal file

Binary file not shown.

BIN
gnupg-2.2.32.tar.bz2.sig Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
Name: gnupg2
Version: 2.2.27
Release: 4
Version: 2.2.32
Release: 5
Summary: Utility for secure communication and data storage
License: GPLv3+
@ -20,16 +20,20 @@ Patch8: gnupg-2.2.18-tests-add-test-cases-for-import-without-uid.patch
Patch9: gnupg-2.2.20-file-is-digest.patch
Patch10: gnupg-2.2.21-coverity.patch
Patch11: common-Avoid-undefined-behavior-of-left-shift-operat.patch
Patch12: backport-CVE-2022-34903.patch
Patch13: backport-common-Protect-against-a-theoretical-integer-overflow.patch
BuildRequires: gcc
BuildRequires: zlib-devel, npth-devel, texinfo
BuildRequires: libgpg-error-devel >= 1.31
BuildRequires: libgcrypt-devel >= 1.7.0
BuildRequires: libgpg-error-devel >= 1.41
BuildRequires: libgcrypt-devel >= 1.9.4
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
Requires: libgcrypt >= 1.9.4
Requires: libgpg-error >= 1.41
Recommends: pinentry
Recommends: gnupg2-smime
@ -115,6 +119,21 @@ make check
%changelog
* Wed Jun 14 2023 yixiangzhike <yixiangzhike007@163.com> - 2.2.32-5
- backport upstream patch
* Wed Apr 19 2023 yixiangzhike <yixiangzhike007@163.com> - 2.2.32-4
- add BuildRequires:gnutls-devel to support TLS
* Mon Aug 15 2022 yixiangzhike <yixiangzhike007@163.com> - 2.2.32-3
- fix CVE-2022-34903
* Mon Jun 27 2022 yixiangzhike <yixiangzhike007@163.com> - 2.2.32-2
- need require new version libgpg-error(1.41) and libgcrypt(1.9.4)
* Fri Dec 10 2021 yixiangzhike <yixiangzhike007@163.com> - 2.2.32-1
- update to 2.2.32
* Mon Aug 2 2021 yixiangzhike <zhangxingliang3@huawei.com> - 2.2.27-4
- fix the insttools patch