From cab809cc0cb3be1880aa8ae4849d59613d293349 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Sat, 26 Dec 2020 15:30:42 -0500 Subject: [PATCH] Bugfixes for stable release --- .gitignore | 1 + sources | 2 +- swtpm-gcc11.patch | 18 ------------------ swtpm.spec | 14 ++++++++------ 4 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 swtpm-gcc11.patch diff --git a/.gitignore b/.gitignore index f305530..7735291 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /swtpm-b931e10.tar.gz /swtpm-390f5bd.tar.gz /swtpm-96f5a04.tar.gz +/swtpm-e59c0c1.tar.gz diff --git a/sources b/sources index 4db8c3d..1bcd186 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (swtpm-96f5a04.tar.gz) = 7d33756ea8109e0ca61400cac7a80de5d2614ba3b89108df445aa5a23b5b854299dd5daaa4426737065b27da2c144e38355e1ce1e92667134562156977b0e924 +SHA512 (swtpm-e59c0c1.tar.gz) = ba89301c266c6727ff3ca67c1761b67dce052f79d45d9120077812bef42147ad12ad6ac5632bc84404fc21bc53b26b295dd48ce81acaf075ac8a9a094a07483a diff --git a/swtpm-gcc11.patch b/swtpm-gcc11.patch deleted file mode 100644 index eba16fc..0000000 --- a/swtpm-gcc11.patch +++ /dev/null @@ -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; diff --git a/swtpm.spec b/swtpm.spec index 0fc97aa..2ca34f9 100644 --- a/swtpm.spec +++ b/swtpm.spec @@ -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 - 0.5.2-1.20201226gite59c0c1a +- Bugfixes for stable release + * Mon Dec 07 2020 Jeff Law - 0.5.1-3.20201117git96f5a04c - Avoid diagnostic from gcc-11 -* Tue Nov 13 2020 Stefan Berger - 0.5.1-2.20201117git96f5a04c +* Fri Nov 13 2020 Stefan Berger - 0.5.1-2.20201117git96f5a04c - Another build of v0.5.1 after more fixes * Fri Nov 13 2020 Stefan Berger - 0.5.1-1.20201007git390f5bd4