From 2092d25107a2f7a13b37522f66279668738ebe30df45762069a5f89ff4d3c691 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 20 Aug 2020 10:50:21 +0000 Subject: [PATCH] Accepting request 827401 from home:michals - Update to upstream version 1637 * fixes build of ibmtss 1.5.0 * Refresh makefile.patch * Drop upstreamed patches - ibmswtpm2-fix-uninitialized.patch - ibmswtpm2-fix-empty-decrypt.patch * Fix use of uninitialized value: + ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch OBS-URL: https://build.opensuse.org/request/show/827401 OBS-URL: https://build.opensuse.org/package/show/security/ibmswtpm2?expand=0&rev=20 --- ...Posix-Fix-use-of-uninitialized-value.patch | 30 +++++++++++++++++++ ibmswtpm2-fix-uninitialized.patch | 20 ------------- ibmswtpm2.changes | 12 ++++++++ ibmswtpm2.spec | 9 +++--- ibmtpm1332.tar.gz | 3 -- ibmtpm1637.tar.gz | 3 ++ makefile.patch | 21 +++++++------ 7 files changed, 59 insertions(+), 39 deletions(-) create mode 100644 ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch delete mode 100644 ibmswtpm2-fix-uninitialized.patch delete mode 100644 ibmtpm1332.tar.gz create mode 100644 ibmtpm1637.tar.gz diff --git a/ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch b/ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch new file mode 100644 index 0000000..f7906ea --- /dev/null +++ b/ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch @@ -0,0 +1,30 @@ +From 03efa66788ca4828392664c4f6123ad4f190c865 Mon Sep 17 00:00:00 2001 +From: Michal Suchanek +Date: Mon, 17 Aug 2020 19:28:51 +0200 +Subject: [PATCH] TcpServerPosix: Fix use of uninitialized value. + +ReadUINT32 does not modify the output when it fails. Do not use the +output in that case. + +Signed-off-by: Michal Suchanek +--- + src/TcpServerPosix.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/TcpServerPosix.c b/src/TcpServerPosix.c +index 20fcb29352a2..5bcc47aaeac7 100644 +--- a/src/TcpServerPosix.c ++++ b/src/TcpServerPosix.c +@@ -278,7 +278,8 @@ PlatformServer( + { + UINT32 actHandle; + ok = ReadUINT32(s, &actHandle); +- WriteUINT32(s, _rpc__ACT_GetSignaled(actHandle)); ++ if(ok) ++ WriteUINT32(s, _rpc__ACT_GetSignaled(actHandle)); + break; + } + default: +-- +2.26.2 + diff --git a/ibmswtpm2-fix-uninitialized.patch b/ibmswtpm2-fix-uninitialized.patch deleted file mode 100644 index 692aca1..0000000 --- a/ibmswtpm2-fix-uninitialized.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ibmswtpm2-1332/src/TcpServerPosix.c~ 2018-09-07 16:20:51.000000000 +0200 -+++ ibmswtpm2-1332/src/TcpServerPosix.c 2019-07-04 19:58:14.736607559 +0200 -@@ -292,7 +292,7 @@ - int res, i; - int nSock = 0; - socklen_t length[2]; -- BOOL continueServing; -+ BOOL continueServing = 0; - - if (CreateSocket(PortNumber, &listenSocket[nSock], &length[nSock], - AF_INET) == 0) { -@@ -424,7 +424,7 @@ - int res, i; - int nSock = 0; - socklen_t length[2]; -- BOOL continueServing; -+ BOOL continueServing = 0; - - if (CreateSocket(*PortNumber, &listenSocket[nSock], &length[nSock], - AF_INET) == 0) { diff --git a/ibmswtpm2.changes b/ibmswtpm2.changes index abdc39a..527a372 100644 --- a/ibmswtpm2.changes +++ b/ibmswtpm2.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Aug 17 16:59:04 UTC 2020 - Michal Suchanek + +- Update to upstream version 1637 + * fixes build of ibmtss 1.5.0 + * Refresh makefile.patch + * Drop upstreamed patches + - ibmswtpm2-fix-uninitialized.patch + - ibmswtpm2-fix-empty-decrypt.patch + * Fix use of uninitialized value: + + ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch + ------------------------------------------------------------------- Mon Dec 23 12:06:22 UTC 2019 - mgerstner diff --git a/ibmswtpm2.spec b/ibmswtpm2.spec index c1054d8..fc7e6ef 100644 --- a/ibmswtpm2.spec +++ b/ibmswtpm2.spec @@ -1,7 +1,7 @@ # # spec file for package ibmswtpm2 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,16 +25,15 @@ %endif Name: ibmswtpm2 -Version: 1332 +Version: 1637 Release: 0 Summary: IBM's Software TPM 2.0 License: BSD-3-Clause Group: Development/Tools/Other URL: https://sourceforge.net/projects/ibmswtpm2 Source: https://sourceforge.net/projects/ibmswtpm2/files/ibmtpm%{version}.tar.gz -Patch1: makefile.patch -Patch2: ibmswtpm2-fix-uninitialized.patch -Patch3: ibmswtpm2-fix-empty-decrypt.patch +Patch: makefile.patch +Patch1: ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch BuildRequires: libopenssl-devel >= 1.0 %description diff --git a/ibmtpm1332.tar.gz b/ibmtpm1332.tar.gz deleted file mode 100644 index 0616c62..0000000 --- a/ibmtpm1332.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e8193af3d11d9ff6a951dda8cd1f4693cb01934a8ad7876b84e92c6148ab0fd -size 590005 diff --git a/ibmtpm1637.tar.gz b/ibmtpm1637.tar.gz new file mode 100644 index 0000000..e6f6f04 --- /dev/null +++ b/ibmtpm1637.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd3a4c3f7724243bc9ebcd5c39bbf87b82c696d1c1241cb8e5883534f6e2e327 +size 665378 diff --git a/makefile.patch b/makefile.patch index 5b29d5b..eeb9faf 100644 --- a/makefile.patch +++ b/makefile.patch @@ -1,8 +1,6 @@ -Index: ibmswtpm2-1119/src/makefile -=================================================================== ---- ibmswtpm2-1119.orig/src/makefile 2018-01-16 12:46:54.412486803 +0100 -+++ ibmswtpm2-1119/src/makefile 2018-01-16 12:48:38.498125716 +0100 -@@ -41,17 +41,17 @@ +--- ibmswtpm2-1637.orig/src/makefile 2019-12-19 23:35:43.000000000 +0100 ++++ ibmswtpm2-1637/src/makefile 2020-08-17 18:56:34.607550789 +0200 +@@ -40,10 +40,10 @@ CC = /usr/bin/gcc @@ -12,15 +10,16 @@ Index: ibmswtpm2-1119/src/makefile - -Werror -Wsign-compare \ - -c -ggdb -O0 \ + -Werror -Wsign-compare -Wno-unused-value -Wno-aggressive-loop-optimizations \ -+ -c -ggdb -O \ ++ -c -ggdb \ -DTPM_POSIX \ -D_POSIX_ \ - -DTPM_NUVOTON \ - -I../utils \ - -I. + -DTPM_NUVOTON +@@ -54,7 +54,7 @@ + # --coverage \ + # -fprofile-arcs -ftest-coverage -LNFLAGS = -ggdb \ +LNFLAGS += -ggdb \ - -DTPM_POSIX \ - -DTPM_NUVOTON \ -lcrypto \ + -lpthread \ + -lrt \