From 75a937d97f4fefc6f9b08e3791f151445f551cb3 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 29 Jan 2021 14:06:23 +0100 Subject: [PATCH 2/2] pre_shared_key: avoid use-after-free around realloc Signed-off-by: Daiki Ueno --- lib/ext/pre_shared_key.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/ext/pre_shared_key.c b/lib/ext/pre_shared_key.c index a042c6488..380bf39ed 100644 --- a/lib/ext/pre_shared_key.c +++ b/lib/ext/pre_shared_key.c @@ -267,7 +267,7 @@ client_send_params(gnutls_session_t session, size_t spos; gnutls_datum_t username = {NULL, 0}; gnutls_datum_t user_key = {NULL, 0}, rkey = {NULL, 0}; - gnutls_datum_t client_hello; + unsigned client_hello_len; unsigned next_idx; const mac_entry_st *prf_res = NULL; const mac_entry_st *prf_psk = NULL; @@ -428,8 +428,7 @@ client_send_params(gnutls_session_t session, assert(extdata->length >= sizeof(mbuffer_st)); assert(ext_offset >= (ssize_t)sizeof(mbuffer_st)); ext_offset -= sizeof(mbuffer_st); - client_hello.data = extdata->data+sizeof(mbuffer_st); - client_hello.size = extdata->length-sizeof(mbuffer_st); + client_hello_len = extdata->length-sizeof(mbuffer_st); next_idx = 0; @@ -440,6 +439,11 @@ client_send_params(gnutls_session_t session, } if (prf_res && rkey.size > 0) { + gnutls_datum_t client_hello; + + client_hello.data = extdata->data+sizeof(mbuffer_st); + client_hello.size = client_hello_len; + ret = compute_psk_binder(session, prf_res, binders_len, binders_pos, ext_offset, &rkey, &client_hello, 1, @@ -474,6 +478,11 @@ client_send_params(gnutls_session_t session, } if (prf_psk && user_key.size > 0 && info) { + gnutls_datum_t client_hello; + + client_hello.data = extdata->data+sizeof(mbuffer_st); + client_hello.size = client_hello_len; + ret = compute_psk_binder(session, prf_psk, binders_len, binders_pos, ext_offset, &user_key, &client_hello, 0, -- 2.30.2 6cb1da584cffda96'>root/doc/images
AgeCommit message (Expand)Author
2024-04-14doc: Use "dejavu sans" instead of "Helvetica" or "sans" in dot images....Font-dejavu is (now) an input of fontconfig. Specifying "dejavu sans" makes generated images reproducible even when other fonts are installed (notably font-google-noto). * doc/images/bootstrap-graph.dot, doc/images/bootstrap-packages.dot, doc/images/coreutils-bag-graph.dot, doc/images/coreutils-graph.dot, doc/images/gcc-core-mesboot0-graph.dot, doc/images/service-graph.dot, doc/images/shepherd-graph.dot: Use fontname = "dejavu sans". * doc/guix.texi (Full-Source Bootstrap): Update gcc-core-mesboot0.dot recipe accordingly. Change-Id: If21d7d39d45c66de5bceafb7b825a057d540ee50 Janneke Nieuwenhuizen
2022-05-12doc: Add the "Full-source Bootstrap"....* doc/guix.texi (Reduced Binary Seed Bootstrap): Update and rename to... (Full-Source Bootstrap): ...this. * doc/images/gcc-core-mesboot0-graph.dot: Regenerate. Jan (janneke) Nieuwenhuizen
2020-05-22doc: Update 'Bootstrapping' for further binary seed reduction....* doc/images/gcc-core-mesboot0-graph.dot: New image, replacing * doc/images/gcc-mesboot0-bag-graph.dot: ... remove file. * doc/local.mk (DOT_FILES): Update for new image file. * doc/guix.texi (Reduced Binary Seed Bootstrap): Use it in updated description of further reduction of the trusted computing base. Jan Nieuwenhuizen
2019-03-14Merge branch 'staging' into core-updatesMarius Bakke
2019-03-13doc: Document the graphical installer some more....* doc/guix.texi (Preparing for Installation): Rewrite to specify the two installation modes. (Guided Graphical Installation): New node. (Manual Installation): New node, with the former sections. (After System Installation): New node. * doc/images/installer-network.png, doc/images/installer-partitions.png, doc/images/installer-resume.png: New files. * doc/local.mk (dist_infoimage_DATA): Add them. Ludovic Courtès