forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Instrumented libraries] Fix libgnutls30 build for Focal
R=thestig Bug: 1260217 Change-Id: I7d280890ca4954f71812ab54a9c97fe4059f0336 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3268801 Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#939694}
- Loading branch information
1 parent
1da0df9
commit 435b5b1
Showing
3 changed files
with
33 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 16 additions & 26 deletions
42
third_party/instrumented_libraries/focal/patches/libgnutls30.2.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,37 @@ | ||
diff -rup gnutls28-3.4.10.bak/lib/gnutls_mbuffers.c gnutls28-3.4.10/lib/gnutls_mbuffers.c | ||
--- gnutls28-3.4.10.bak/lib/gnutls_mbuffers.c 2021-09-28 19:32:36.657779361 +0000 | ||
+++ gnutls28-3.4.10/lib/gnutls_mbuffers.c 2021-09-28 19:57:20.893828258 +0000 | ||
@@ -330,7 +330,7 @@ mbuffer_st *_mbuffer_alloc_align16(size_ | ||
diff -rup gnutls28-3.6.13/lib/mbuffers.c gnutls28-3.6.13.new/lib/mbuffers.c | ||
--- gnutls28-3.6.13/lib/mbuffers.c 2020-01-01 20:11:40.000000000 +0000 | ||
+++ gnutls28-3.6.13.new/lib/mbuffers.c 2021-11-08 23:30:49.519648440 +0000 | ||
@@ -284,7 +284,7 @@ mbuffer_st *_mbuffer_alloc(size_t maximu | ||
} | ||
|
||
/* set the structure to zero */ | ||
- memset(st, 0, sizeof(*st)); | ||
+ memset(st, 0, maximum_size + sizeof(mbuffer_st) + ALIGN_SIZE); | ||
+ memset(st, 0, maximum_size + sizeof(mbuffer_st)); | ||
|
||
/* payload points after the mbuffer_st structure */ | ||
st->msg.data = (uint8_t *) st + sizeof(mbuffer_st); | ||
diff -rup gnutls28-3.4.10.bak/lib/gnutls_state.c gnutls28-3.4.10/lib/gnutls_state.c | ||
--- gnutls28-3.4.10.bak/lib/gnutls_state.c 2021-09-28 19:32:36.689779620 +0000 | ||
+++ gnutls28-3.4.10/lib/gnutls_state.c 2021-09-28 19:51:38.311029189 +0000 | ||
@@ -804,6 +804,7 @@ P_hash(gnutls_mac_algorithm_t algorithm, | ||
mac_hd_st td2; | ||
int i, times, how, blocksize, A_size; | ||
uint8_t final[MAX_HASH_SIZE], Atmp[MAX_SEED_SIZE]; | ||
+ memset(final, 0, MAX_HASH_SIZE); | ||
int output_bytes, result; | ||
const mac_entry_st *me = mac_to_entry(algorithm); | ||
|
||
Binary files gnutls28-3.4.10.bak/lib/nettle/.libs/cipher.o and gnutls28-3.4.10/lib/nettle/.libs/cipher.o differ | ||
Binary files gnutls28-3.4.10.bak/lib/nettle/.libs/libcrypto.a and gnutls28-3.4.10/lib/nettle/.libs/libcrypto.a differ | ||
diff -rup gnutls28-3.4.10.bak/lib/nettle/cipher.c gnutls28-3.4.10/lib/nettle/cipher.c | ||
--- gnutls28-3.4.10.bak/lib/nettle/cipher.c 2021-09-28 19:32:36.681779555 +0000 | ||
+++ gnutls28-3.4.10/lib/nettle/cipher.c 2021-09-28 19:47:34.521036429 +0000 | ||
@@ -664,6 +664,7 @@ wrap_nettle_cipher_aead_decrypt(void *_c | ||
Only in gnutls28-3.6.13.new/lib: mbuffers.c~ | ||
diff -rup gnutls28-3.6.13/lib/nettle/cipher.c gnutls28-3.6.13.new/lib/nettle/cipher.c | ||
--- gnutls28-3.6.13/lib/nettle/cipher.c 2020-03-24 08:26:29.000000000 +0000 | ||
+++ gnutls28-3.6.13.new/lib/nettle/cipher.c 2021-11-08 23:24:35.104648910 +0000 | ||
@@ -1020,6 +1020,7 @@ wrap_nettle_cipher_aead_decrypt(void *_c | ||
if (ctx->cipher->aead_decrypt == NULL) { | ||
/* proper AEAD cipher */ | ||
uint8_t tag[MAX_HASH_SIZE]; | ||
+ memset(tag, 0, MAX_HASH_SIZE); | ||
|
||
ctx->cipher->set_iv(ctx->ctx_ptr, nonce_size, nonce); | ||
ctx->cipher->auth(ctx->ctx_ptr, auth_size, auth); | ||
diff -rup gnutls28-3.4.10/lib/nettle/pk.c gnutls28-3.4.10.new/lib/nettle/pk.c | ||
--- gnutls28-3.4.10/lib/nettle/pk.c 2015-07-21 09:42:08.000000000 +0000 | ||
+++ gnutls28-3.4.10.new/lib/nettle/pk.c 2021-09-28 20:25:00.439384325 +0000 | ||
@@ -248,6 +248,7 @@ dh_cleanup: | ||
Only in gnutls28-3.6.13.new/lib/nettle: cipher.c~ | ||
diff -rup gnutls28-3.6.13/lib/nettle/pk.c gnutls28-3.6.13.new/lib/nettle/pk.c | ||
--- gnutls28-3.6.13/lib/nettle/pk.c 2020-03-13 20:17:54.000000000 +0000 | ||
+++ gnutls28-3.6.13.new/lib/nettle/pk.c 2021-11-08 23:24:58.344835111 +0000 | ||
@@ -369,6 +369,7 @@ dh_cleanup: | ||
case GNUTLS_PK_EC: | ||
{ | ||
struct ecc_scalar ecc_priv; | ||
+ memset(&ecc_priv, 0, sizeof(ecc_priv)); | ||
struct ecc_point ecc_pub; | ||
const struct ecc_curve *curve; | ||
|
||
Only in gnutls28-3.6.13.new/lib/nettle: pk.c~ |