Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package tpm2.0-tools for openSUSE:Factory checked in at 2021-08-02 12:04:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tpm2.0-tools (Old) and /work/SRC/openSUSE:Factory/.tpm2.0-tools.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tpm2.0-tools" Mon Aug 2 12:04:31 2021 rev:31 rq:909338 version:5.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/tpm2.0-tools/tpm2.0-tools.changes 2021-07-18 23:44:48.267112852 +0200 +++ /work/SRC/openSUSE:Factory/.tpm2.0-tools.new.1899/tpm2.0-tools.changes 2021-08-02 12:04:42.657660613 +0200 @@ -1,0 +2,6 @@ +Thu Jul 29 14:15:11 UTC 2021 - Alberto Planas Dominguez <apla...@suse.com> + +- Add 0001-tpm2_eventlog-fix-buffer-offset-when-reading-the-eve.patch to +fix the offset of the read buffer + +------------------------------------------------------------------- New: ---- 0001-tpm2_eventlog-fix-buffer-offset-when-reading-the-eve.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tpm2.0-tools.spec ++++++ --- /var/tmp/diff_new_pack.Xysgsy/_old 2021-08-02 12:04:44.601660200 +0200 +++ /var/tmp/diff_new_pack.Xysgsy/_new 2021-08-02 12:04:44.601660200 +0200 @@ -30,6 +30,7 @@ Patch0: fix_bogus_warning.patch Patch2: 0001-tpm2_checkquote-fix-uninitialized-variable.patch Patch3: 0001-tpm2_eventlog-read-eventlog-file-in-chunks.patch +Patch4: 0001-tpm2_eventlog-fix-buffer-offset-when-reading-the-eve.patch BuildRequires: gcc-c++ BuildRequires: libcurl-devel BuildRequires: libopenssl-devel ++++++ 0001-tpm2_eventlog-fix-buffer-offset-when-reading-the-eve.patch ++++++ >From 24e193412eac3985baea5e83e3245a4315c86ebe Mon Sep 17 00:00:00 2001 From: Alberto Planas <apla...@suse.com> Date: Thu, 29 Jul 2021 16:02:50 +0200 Subject: [PATCH 1/1] tpm2_eventlog: fix buffer offset when reading the event log The event log is read in chunks of CHUNK_SIZE blocks (16KB), always checking when the EOF is reached, so it is compatible with virtual files that lives in securityfs and we do not know the full size. The current code is not taking care of adjusting the offset when the next chunk is read. This patch add "size" to the base buffer where the event log is stored in memory. Fix #2778 Signed-off-by: Alberto Planas <apla...@suse.com> --- tools/misc/tpm2_eventlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: tpm2-tools-5.1.1/tools/misc/tpm2_eventlog.c =================================================================== --- tpm2-tools-5.1.1.orig/tools/misc/tpm2_eventlog.c +++ tpm2-tools-5.1.1/tools/misc/tpm2_eventlog.c @@ -90,7 +90,7 @@ static tool_rc tpm2_tool_onrun(ESYS_CONT } unsigned long size = 0; - while (files_read_bytes_chunk(fileptr, eventlog, CHUNK_SIZE, &size)) { + while (files_read_bytes_chunk(fileptr, eventlog + size, CHUNK_SIZE, &size)) { UINT8 *eventlog_tmp = realloc(eventlog, size + CHUNK_SIZE); if (eventlog_tmp == NULL){ LOG_ERR("failed to allocate %lu bytes: %s", size + CHUNK_SIZE, strerror(errno));