Bugfixes for stable release

This commit is contained in:
Stefan Berger 2020-12-26 15:30:42 -05:00
parent 15719b9d51
commit cab809cc0c
4 changed files with 10 additions and 25 deletions

1
.gitignore vendored
View File

@ -18,3 +18,4 @@
/swtpm-b931e10.tar.gz
/swtpm-390f5bd.tar.gz
/swtpm-96f5a04.tar.gz
/swtpm-e59c0c1.tar.gz

View File

@ -1 +1 @@
SHA512 (swtpm-96f5a04.tar.gz) = 7d33756ea8109e0ca61400cac7a80de5d2614ba3b89108df445aa5a23b5b854299dd5daaa4426737065b27da2c144e38355e1ce1e92667134562156977b0e924
SHA512 (swtpm-e59c0c1.tar.gz) = ba89301c266c6727ff3ca67c1761b67dce052f79d45d9120077812bef42147ad12ad6ac5632bc84404fc21bc53b26b295dd48ce81acaf075ac8a9a094a07483a

View File

@ -1,18 +0,0 @@
diff --git a/src/swtpm/ctrlchannel.c b/src/swtpm/ctrlchannel.c
index f76a68b..f847960 100644
--- a/src/swtpm/ctrlchannel.c
+++ b/src/swtpm/ctrlchannel.c
@@ -691,7 +691,12 @@ int ctrlchannel_process_fd(int fd,
data = (ptm_hdata *)&output.body;
- data->u.resp.tpm_result = htobe32(res);
+ /* gcc-11 flags this code with a diagnostic. I'm not sure the diagnostic
+ is valid, but regardless, this is reasonable workaround. Essentially
+ we are trying to obfuscate the above cast and store below from the
+ analysis for out of bounds object access diagnostics. */
+ uint32_t __x = htobe32(res);
+ memcpy (&data->u.resp.tpm_result, &__x, sizeof (__x));
out_len = sizeof(data->u.resp.tpm_result);
break;

View File

@ -1,7 +1,7 @@
%bcond_without gnutls
%global gitdate 20201117
%global gitcommit 96f5a04c3d6cc0a8604f311df246b872a93a70e4
%global gitdate 20201226
%global gitcommit e59c0c1a7b4c8d652dbb280fd6126895a7057464
%global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7})
# Macros needed by SELinux
@ -11,12 +11,11 @@
Summary: TPM Emulator
Name: swtpm
Version: 0.5.1
Release: 3.%{gitdate}git%{gitshortcommit}%{?dist}
Version: 0.5.2
Release: 1.%{gitdate}git%{gitshortcommit}%{?dist}
License: BSD
Url: http://github.com/stefanberger/swtpm
Source0: %{url}/archive/%{gitcommit}/%{name}-%{gitshortcommit}.tar.gz
Patch0: %{name}-gcc11.patch
BuildRequires: git-core
BuildRequires: automake
@ -186,10 +185,13 @@ fi
%{_datadir}/swtpm/swtpm-create-tpmca
%changelog
* Sat Dec 26 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.2-1.20201226gite59c0c1a
- Bugfixes for stable release
* Mon Dec 07 2020 Jeff Law <law@redhat.com> - 0.5.1-3.20201117git96f5a04c
- Avoid diagnostic from gcc-11
* Tue Nov 13 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.1-2.20201117git96f5a04c
* Fri Nov 13 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.1-2.20201117git96f5a04c
- Another build of v0.5.1 after more fixes
* Fri Nov 13 2020 Stefan Berger <stefanb@linux.ibm.com> - 0.5.1-1.20201007git390f5bd4