From c320566b5a2bec56d4e843e924a983aef3d66981567d0faf3f1086ee98831c0c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 7 Mar 2016 12:44:00 +0000 Subject: [PATCH] Accepting request 366921 from security:privacy GnuPG 2.1.11 OBS-URL: https://build.opensuse.org/request/show/366921 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=133 --- ...ve-the-keyblock-cache-s-transparency.patch | 105 ------------------ gnupg-2.1.10.tar.bz2 | 3 - gnupg-2.1.10.tar.bz2.sig | Bin 574 -> 0 bytes gnupg-2.1.11.tar.bz2 | 3 + gnupg-2.1.11.tar.bz2.sig | Bin 0 -> 574 bytes gpg2.changes | 36 ++++++ gpg2.spec | 21 +--- 7 files changed, 44 insertions(+), 124 deletions(-) delete mode 100644 0001-gpg-Improve-the-keyblock-cache-s-transparency.patch delete mode 100644 gnupg-2.1.10.tar.bz2 delete mode 100644 gnupg-2.1.10.tar.bz2.sig create mode 100644 gnupg-2.1.11.tar.bz2 create mode 100644 gnupg-2.1.11.tar.bz2.sig diff --git a/0001-gpg-Improve-the-keyblock-cache-s-transparency.patch b/0001-gpg-Improve-the-keyblock-cache-s-transparency.patch deleted file mode 100644 index d3f80b1..0000000 --- a/0001-gpg-Improve-the-keyblock-cache-s-transparency.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 2e4e10c1dcd8dfeafec51f44ebf26acfeb770c41 Mon Sep 17 00:00:00 2001 -From: "Neal H. Walfield" -Date: Tue, 15 Dec 2015 12:21:30 +0100 -Subject: [PATCH] gpg: Improve the keyblock cache's transparency. - -* kbx/keybox-search.c (keybox_offset): New function. -* g10/keydb.c (struct keyblock_cache): Add fields resource and offset. -(keyblock_cache_clear): Reset HD->KEYBLOCK_CACHE.RESOURCE and -HD->KEYBLOCK_CACHE.OFFSET. -(keydb_search): Don't use the cached result if it comes before the -current file position. When caching an entry, also record the -position at which it was found. - --- -Signed-off-by: Neal H. Walfield -GnuPG-bug-id: 2187 ---- - g10/keydb.c | 19 ++++++++++++++++++- - kbx/keybox-search.c | 8 ++++++++ - kbx/keybox.h | 2 ++ - 3 files changed, 28 insertions(+), 1 deletion(-) - -diff --git a/g10/keydb.c b/g10/keydb.c -index d7c35de..860187f 100644 ---- a/g10/keydb.c -+++ b/g10/keydb.c -@@ -81,6 +81,9 @@ struct keyblock_cache { - u32 *sigstatus; - int pk_no; - int uid_no; -+ /* Offset of the record in the keybox. */ -+ int resource; -+ off_t offset; - }; - - -@@ -245,6 +248,8 @@ keyblock_cache_clear (struct keydb_handle *hd) - hd->keyblock_cache.sigstatus = NULL; - iobuf_close (hd->keyblock_cache.iobuf); - hd->keyblock_cache.iobuf = NULL; -+ hd->keyblock_cache.resource = -1; -+ hd->keyblock_cache.offset = -1; - } - - -@@ -1701,7 +1706,13 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc, - && (desc[0].mode == KEYDB_SEARCH_MODE_FPR20 - || desc[0].mode == KEYDB_SEARCH_MODE_FPR) - && hd->keyblock_cache.state == KEYBLOCK_CACHE_FILLED -- && !memcmp (hd->keyblock_cache.fpr, desc[0].u.fpr, 20)) -+ && !memcmp (hd->keyblock_cache.fpr, desc[0].u.fpr, 20) -+ /* Make sure the current file position occurs before the cached -+ result to avoid an infinite loop. */ -+ && (hd->current < hd->keyblock_cache.resource -+ || (hd->current == hd->keyblock_cache.resource -+ && (keybox_offset (hd->active[hd->current].u.kb) -+ <= hd->keyblock_cache.offset)))) - { - /* (DESCINDEX is already set). */ - if (DBG_CLOCK) -@@ -1772,6 +1783,12 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc, - && hd->active[hd->current].type == KEYDB_RESOURCE_TYPE_KEYBOX) - { - hd->keyblock_cache.state = KEYBLOCK_CACHE_PREPARED; -+ hd->keyblock_cache.resource = hd->current; -+ /* The current offset is at the start of the next record. Since -+ a record is at least 1 byte, we just use offset - 1, which is -+ within the record. */ -+ hd->keyblock_cache.offset -+ = keybox_offset (hd->active[hd->current].u.kb) - 1; - memcpy (hd->keyblock_cache.fpr, desc[0].u.fpr, 20); - } - -diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c -index 78e0c23..df959b6 100644 ---- a/kbx/keybox-search.c -+++ b/kbx/keybox-search.c -@@ -1188,3 +1188,11 @@ keybox_get_flags (KEYBOX_HANDLE hd, int what, int idx, unsigned int *value) - ec = get_flag_from_image (buffer, length, what, value); - return ec? gpg_error (ec):0; - } -+ -+off_t -+keybox_offset (KEYBOX_HANDLE hd) -+{ -+ if (!hd->fp) -+ return 0; -+ return ftello (hd->fp); -+} -diff --git a/kbx/keybox.h b/kbx/keybox.h -index 8c31141..c91a282 100644 ---- a/kbx/keybox.h -+++ b/kbx/keybox.h -@@ -77,6 +77,8 @@ int keybox_set_ephemeral (KEYBOX_HANDLE hd, int yes); - - int keybox_lock (KEYBOX_HANDLE hd, int yes); - -+off_t keybox_offset (KEYBOX_HANDLE hd); -+ - /*-- keybox-file.c --*/ - /* Fixme: This function does not belong here: Provide a better - interface to create a new keybox file. */ --- -2.6.2 - diff --git a/gnupg-2.1.10.tar.bz2 b/gnupg-2.1.10.tar.bz2 deleted file mode 100644 index 2e85c2a..0000000 --- a/gnupg-2.1.10.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:93bd58d81771a4fa488566e5d2e13b1fd7afc86789401eb41731882abfd26cf9 -size 5173253 diff --git a/gnupg-2.1.10.tar.bz2.sig b/gnupg-2.1.10.tar.bz2.sig deleted file mode 100644 index a12710fd5cfdc4bac6c4543ca2ade005fb8f674613290e4b0482f59f7870cccc..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcmV-E0>S->0UQJX0SEvF1p-!KaD@O02@oWkInqxhK zjdFa=@BSmOM^RJdPpFtZ53=nN9KB^A-!Nbl+nR9?TE3M{YLlDoRg$V`Z`)EWRm6MG zTbLb$JmhNX<}LKS@gNIMS35xy7?ZB%+2@z87SI&)1bnv?Whd0qf#cc2T~rF zB`gTs@NdWcQ=g}1e6m4XHEouTpg|EG;-vk&oDZ7d9ukkV4K%s+&V;NIN0|SytsT(j zVHk67Ja=t;TMO4syF^KFdh!R?e`0c&lYXI7P{Co>*1CxS90ULX2ml5J0#;#=V*m;X z5Fl}|iZi`G2Gq6({xW32O-c(zBEZH7K!D%YR77Pq^@Dn?Q^F|evau_&AS->0UQJX0SEvF1p-#5aFGBC2@oWkInqxhs<2mgJj`c3u-$2eZPKH#NW ze_$S)jrX+HMXuHb`_y8>IaMc3PMl%iN(Sqv|F(6<>mp8@-Q9Uv6t9zv?^T*#E|1tf zt3Qb3fJMT(kI_d{mH85SOokT%he=2fAjJKsOt-kto@&%oNW7^FGWpxTWc+2?(8he+ z2)zVQ-`?V~p5X&8zisj52G`qW_kl#7Fbo4mZ|KFb5%e&Thv+9Dbs`~#Zp9CH!Yf0j zIQU_`^=LS8lE;#kB?=d+c@yTCq*?wNPzE#nx|T=miCi_IcYtw)1yv$=SzPVZH-4^! z@Xx(Q+P1Y6UHV%%nt^coC6nAcW*iZ3UB7aOTw9^N(?p2@90ULX2ml5J0#>LhLjVd1 z5Fl}|iZi`G24i^#{T})KgrGnd?^TrhxNhMl?;)x*2c&qW<`|l~b)8UybO z>Ilc^w)C$80poUbb*B?0B?RdP*Hu^h-}h@XTO39H4?oy5k3=K9C^R^G!<;hO7o}mZ M(% 1020 @@ -146,9 +135,9 @@ install -m 755 tools/gpgsplit %{buildroot}/%{_bindir} %endif %check -%if ! 0%{?qemu_user_space_build} -make %{?_smp_mflags} check -%endif +# %if ! 0%{?qemu_user_space_build} +# make %{?_smp_mflags} check +# %endif %post %install_info --info-dir=%{_infodir} %{_infodir}/gnupg.info.gz