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
This commit is contained in:
Marcus Meissner 2020-08-20 10:50:21 +00:00 committed by Git OBS Bridge
parent 09bad69cfd
commit 2092d25107
7 changed files with 59 additions and 39 deletions

View File

@ -0,0 +1,30 @@
From 03efa66788ca4828392664c4f6123ad4f190c865 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
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 <msuchanek@suse.de>
---
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

View File

@ -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) {

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Aug 17 16:59:04 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- 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 <matthias.gerstner@suse.com>

View File

@ -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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8e8193af3d11d9ff6a951dda8cd1f4693cb01934a8ad7876b84e92c6148ab0fd
size 590005

3
ibmtpm1637.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd3a4c3f7724243bc9ebcd5c39bbf87b82c696d1c1241cb8e5883534f6e2e327
size 665378

View File

@ -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 \