f78fd8
%global gitdate   20211126
f78fd8
%global gitversion 1ff6fe1f43
f78fd8
f78fd8
Name:           libtpms
f78fd8
Version:        0.9.1
5c11a9
Release:        2.%{gitdate}git%{gitversion}%{?dist}
f78fd8
f78fd8
Summary: Library providing Trusted Platform Module (TPM) functionality
f78fd8
License:        BSD
f78fd8
Url:            http://github.com/stefanberger/libtpms
f78fd8
Source0:        libtpms-%{gitdate}.tar.xz
f78fd8
ExcludeArch:    i686
d7d45b
Patch0003:      0001-tpm2-When-writing-state-initialize-s_ContextSlotMask.patch
5c11a9
Patch0004:      0001-tpm2-Check-size-of-buffer-before-accessing-it-CVE-20.patch
f78fd8
f78fd8
BuildRequires:  openssl-devel
f78fd8
BuildRequires:  pkgconfig gawk sed
f78fd8
BuildRequires:  automake autoconf libtool bash coreutils gcc-c++
f78fd8
BuildRequires:  git
f78fd8
BuildRequires:  make
f78fd8
f78fd8
%description
f78fd8
A library providing TPM functionality for VMs. Targeted for integration
f78fd8
into Qemu.
f78fd8
f78fd8
%package        devel
f78fd8
Summary:        Include files for libtpms
f78fd8
Requires:       %{name}%{?_isa} = %{version}-%{release}
f78fd8
f78fd8
%description   devel
f78fd8
Libtpms header files and documentation.
f78fd8
f78fd8
%prep
f78fd8
%autosetup -S git -n %{name}-%{gitdate}
f78fd8
%build
f78fd8
NOCONFIGURE=1 sh autogen.sh
f78fd8
%configure --disable-static --with-tpm2 --without-tpm1 --with-openssl
f78fd8
%make_build
f78fd8
f78fd8
%check
f78fd8
make check
f78fd8
f78fd8
%install
f78fd8
%make_install
f78fd8
find %{buildroot} -type f -name '*.la' | xargs rm -f -- || :
f78fd8
f78fd8
%ldconfig_scriptlets
f78fd8
f78fd8
%files
f78fd8
%license LICENSE
f78fd8
%doc README CHANGES
f78fd8
%{_libdir}/lib*.so.*
f78fd8
f78fd8
%files devel
f78fd8
%dir %{_includedir}/%{name}
f78fd8
%{_includedir}/%{name}/*.h
f78fd8
%{_libdir}/lib*.so
f78fd8
%{_libdir}/pkgconfig/*.pc
f78fd8
%{_mandir}/man3/*
f78fd8
f78fd8
%changelog
5c11a9
* Tue Mar 21 2023 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.9.1-2.20211126git1ff6fe1f43
5c11a9
- Backport "tpm2: Check size of buffer before accessing it" (CVE-2023-1017 & CVE-2023-1018)
5c11a9
  Resolves: rhbz#2173964
5c11a9
  Resolves: rhbz#2173970
5c11a9
d7d45b
* Thu Jul 28 2022 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.9.1-1.20211126git1ff6fe1f43
d7d45b
- Backport s_ContextSlotMask initialization fix
d7d45b
  Resolves: rhbz#2111433
d7d45b
f78fd8
* Thu Dec 09 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.9.1-0.20211126git1ff6fe1f43
f78fd8
- Rebase to 0.9.1 (sync with RHEL9)
f78fd8
  Resolves: rhbz#2029355
f78fd8
f78fd8
* Tue Aug 31 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.4-6.20201106git2452a24dab
f78fd8
- Fix CVE-2021-3746 libtpms: out-of-bounds access via specially crafted TPM 2 command packets
f78fd8
  Resolves: rhbz#1999307
f78fd8
f78fd8
* Mon Jun 28 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.4-5.20201106git2452a24dab
f78fd8
- Fix CVE-2021-3623: out-of-bounds access when trying to resume the state of the vTPM
f78fd8
  Fixes: rhbz#1976816
f78fd8
f78fd8
* Wed Mar 17 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.4-4.20201106git2452a24dab
f78fd8
- tpm2: CryptSym: fix AES output IV
f78fd8
  Fixes: rhbz#1942904
f78fd8
f78fd8
* Fri Feb 19 2021 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.7.4-3.20201106git2452a24dab
f78fd8
- Add git as build dependency
f78fd8
  Related: rhbz#1858821
f78fd8
f78fd8
* Wed Feb 17 2021 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.4-2.20201106git2452a24dab
f78fd8
- tpm2: Return properly sized array for b parameter for NIST P521 (HLK) #180 
f78fd8
  Fixes: rhbz#1858821
f78fd8
f78fd8
* Fri Nov  6 18:46:36 +04 2020 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.4-1.20201106git2452a24dab
f78fd8
- Follow stable-0.7.0 branch to v0.7.4 with security-related fixes.
f78fd8
  Fixes: rhbz#1893444
f78fd8
f78fd8
* Tue Aug 18 2020 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.3-1.20200818git1d392d466a
f78fd8
- Update to v0.7.3 stable, fixes rhbz#1868447
f78fd8
- (includes "tpm2: fix PCRBelongsTCBGroup for PCClient")
f78fd8
f78fd8
* Thu May 28 2020 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.2-1.20200527git7325acb477
f78fd8
- Update to v0.7.2 stable snapshot, fixes rhbz#1809676
f78fd8
- exclude i686 build
f78fd8
- Following stable-0.7.0 branch for TPM 2 related fixes: RSA decryption,
f78fd8
  PSS salt length, symmetric decryption (padding)
f78fd8
- Under certain circumstances an RSA decryption could cause a buffer overflow causing
f78fd8
  termination of the program (swtpm)
f78fd8
- Following stable-0.7.0 branch for TPM 2 related fixes; v0.7.1 + gcc related patch
f78fd8
- elliptic curve fixes
f78fd8
- MANUFACTURER changed from "IBM " to "IBM"
f78fd8
- gcc 10 related fix
f78fd8
- Following stable-0.7.0 branch for TPM 1.2 related bugfix
f78fd8
f78fd8
* Fri Oct 18 2019 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.7.0-1.20191018gitdc116933b7
f78fd8
- RHEL8.1.1 update
f78fd8
- Update to v0.7.0 stable snapshot
f78fd8
f78fd8
* Tue Apr 16 2019 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.6.1-0.20190121git9dc915572b.2
f78fd8
- RHEL8.1 build
f78fd8
f78fd8
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-0.20190121git9dc915572b.1
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f78fd8
f78fd8
* Mon Jan 21 2019 Stefan Berger <stefanb@linux.ibm.com> - 0.6.1-0.20190121git9dc915572b
f78fd8
- Libtpms was updated to rev. 150 of TPM 2.0 code
f78fd8
- following branch stable-0.6.0
f78fd8
f78fd8
* Tue Dec 11 2018 Stefan Berger <stefanb@linux.ibm.com> - 0.6.0-0.20181211gitba56737b93
f78fd8
- Following bugfixes in libtpms
f78fd8
f78fd8
* Wed Oct 31 2018 Stefan Berger <stefanb@linux.ibm.com> - 0.6.0-0.20181031git0466fcf6a4
f78fd8
- Following improvements in libtpms
f78fd8
f78fd8
* Tue Sep 18 2018 Stefan Berger 
f78fd8
- Fixed changelog
f78fd8
f78fd8
* Mon Sep 17 2018 Stefan Berger 
f78fd8
- Build snapshot from git after libtpms fix.
f78fd8
f78fd8
* Fri Sep 14 2018 Marc-André Lureau <marcandre.lureau@redhat.com> - 0.6.0-0.20180914git4111bd1bcf
f78fd8
- Build snapshot from git, simplify spec
f78fd8
f78fd8
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-12
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f78fd8
f78fd8
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-11
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f78fd8
f78fd8
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-10
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f78fd8
f78fd8
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-9
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f78fd8
f78fd8
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-8
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f78fd8
f78fd8
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-7
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f78fd8
f78fd8
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-6
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f78fd8
f78fd8
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-4
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f78fd8
f78fd8
* Sat Aug 16 2014 Stefan Berger - 0.5.2-3
f78fd8
- do not include libtpms.la in rpm
f78fd8
f78fd8
* Mon Jul 14 2014 Stefan Berger - 0.5.2-2
f78fd8
- Added patches
f78fd8
f78fd8
* Mon Jun 30 2014 Stefan Berger - 0.5.2-1
f78fd8
- Updated to version 0.5.2
f78fd8
- coverity fixes
f78fd8
- fixes for ARM64 using __aarch64__
f78fd8
f78fd8
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-20.1
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f78fd8
f78fd8
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-19
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f78fd8
f78fd8
* Mon Mar 25 2013 Stefan Berger - 0.5.1-18
f78fd8
- Ran autoreconf for support of aarch64
f78fd8
- Checking for __arm64__ in code
f78fd8
f78fd8
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-17
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f78fd8
f78fd8
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-16
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f78fd8
f78fd8
* Fri Feb 17 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 0.5.1-15
f78fd8
- Add dist tag as required by package guidelines
f78fd8
f78fd8
* Fri Jan 27 2012 Stefan Berger - 0.5.1-14
f78fd8
- fix gcc-4.7 compilation problem
f78fd8
f78fd8
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-13
f78fd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f78fd8
f78fd8
* Tue Dec 20 2011 Dan Horák <dan[at]danny.cz> - 0.5.1-12
f78fd8
- fix build on secondary arches
f78fd8
f78fd8
* Wed Nov 2 2011 Stefan Berger - 0.5.1-11
f78fd8
- added (lib)gmp as runtime dependency
f78fd8
f78fd8
* Sat Oct 8 2011 Stefan Berger - 0.5.1-10
f78fd8
- internal fixes; callback fixes
f78fd8
f78fd8
* Tue Aug 30 2011 Stefan Berger - 0.5.1-9
f78fd8
- new directory structure and build process
f78fd8
f78fd8
* Tue Jul 12 2011 Stefan Berger - 0.5.1-8
f78fd8
- added pkgconfig as build dependency
f78fd8
- enabling __powerpc__ build following Bz 728220
f78fd8
f78fd8
* Wed May 25 2011 Stefan Berger - 0.5.1-7
f78fd8
- increasing NVRAM area space to have enough room for certificates
f78fd8
f78fd8
* Wed May 25 2011 Stefan Berger - 0.5.1-6
f78fd8
- adding libtpms.pc pkg-config file
f78fd8
f78fd8
* Wed Apr 13 2011 Stefan Berger - 0.5.1-5
f78fd8
- adding BuildRequires for nss-softokn-freebl-static
f78fd8
- several libtpms-internal changes around state serialization and 
f78fd8
  deserialization
f78fd8
- fixes to libtpms makefile (makefile-libtpms)
f78fd8
- adding build_type to generate a debug or production build
f78fd8
- need nss-devel to have nss-config
f78fd8
f78fd8
* Tue Mar 08 2011 Stefan Berger - 0.5.1-4
f78fd8
- small fixes to libtpms makefile
f78fd8
f78fd8
* Fri Feb 25 2011 Stefan Berger - 0.5.1-3
f78fd8
- removing release from tar ball name
f78fd8
- Use {?_smp_mflags} for make rather than hardcoding it
f78fd8
- Fixing post and postun scripts; removing the scripts for devel package
f78fd8
- Fixing usage of defattr
f78fd8
- Adding version information into the changelog headers and spaces between the changelog entries
f78fd8
- Adding LICENSE, README and CHANGELOG file into tar ball and main rpm
f78fd8
- Removing clean section
f78fd8
- removed command to clean the build root
f78fd8
- adding library version to the libries required for building and during
f78fd8
  runtime
f78fd8
- Extended Requires in devel package with {?_isa}
f78fd8
f78fd8
* Fri Feb 18 2011 Stefan Berger - 0.5.1-2
f78fd8
- make rpmlint happy by replacing tabs with spaces
f78fd8
- providing a valid URL for the tgz file
f78fd8
- release is now 2 -> 0.5.1-2
f78fd8
f78fd8
* Mon Jan 17 2011 Stefan Berger - 0.5.1-1
f78fd8
- Update version to 0.5.1
f78fd8
f78fd8
* Fri Jan 14 2011 Stefan Berger - 0.5.0-1
f78fd8
- Changes following Fedora review comments
f78fd8
f78fd8
* Thu Dec 2 2010 Stefan Berger
f78fd8
- Small tweaks after reading the FedoreCore packaging requirements
f78fd8
f78fd8
* Tue Nov 16 2010 Stefan Berger
f78fd8
- Created initial version of rpm spec files
f78fd8
- Version of library is now 0.5.0
f78fd8
- Debuginfo rpm is built but empty -- seems to be a known problem
f78fd8
  Check https://bugzilla.redhat.com/show_bug.cgi?id=209316