Description
swtpm is a libtpms-based TPM emulator with socket, character device, and Linux CUSE interface. Versions prior to 0.5.3, 0.6.2, and 0.7.1 are vulnerable to out-of-bounds read. A specially crafted header of swtpm's state, where the blobheader's hdrsize indicator has an invalid value, may cause an out-of-bounds access when the byte array representing the state of the TPM is accessed. This will likely crash swtpm or prevent it from starting since the state cannot be understood. Users should upgrade to swtpm v0.5.3, v0.6.2, or v0.7.1 to receive a patch. There are currently no known workarounds.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| stefanberger | swtpm | < 0.5.3, >= 0.6.0, < 0.6.2, = 0.7.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | swtpm | 0.7.1-1 | — |
| Debian 13 | swtpm | 0.7.1-1 | — |
| Debian 12 | swtpm | 0.7.1-1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | swtpm +2 | 0.7.0-3.20211109gitb79fd91.el9 | RHSA-2022:8100 |
| RHEL 8 | SLOF | 20210217-1.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | hivex +6 | 1.3.18-23.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | libguestfs-winsupport | 8.6-1.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | libiscsi +2 | 1.18.0-8.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | libnbd +6 | 1.6.0-5.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | libtpms +1 | 0.9.1-1.20211126git1ff6fe1f43.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | libvirt +27 | 8.0.0-10.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | libvirt-dbus | 1.3.0-2.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | libvirt-python +1 | 8.0.0-2.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | nbdkit +18 | 1.24.0-4.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | netcf +2 | 0.2.8-12.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | perl-Sys-Virt | 8.0.0-1.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | qemu-img +14 | 15:6.2.0-20.module+el8.7.0+16689+53d59bc2.1 | RHSA-2022:7472 |
| RHEL 8 | seabios +2 | 1.16.0-3.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | sgabios +1 | 1:0.20170427git-3.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | supermin +1 | 5.2.1-2.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | swtpm +4 | 0.7.0-4.20211109gitb79fd91.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | virt-dib +24 | 1:1.44.0-9.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
| RHEL 8 | virt-v2v +3 | 1:1.42.0-21.module+el8.7.0+16689+53d59bc2 | RHSA-2022:7472 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | swtpm +2 | 0.7.0-3.20211109gitb79fd91.el9 | ALSA-2022:8100 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | hivex | 1.3.18-23.module+el8.6.0+847+b490afdd | RLSA-2022:7472 |
| Rocky Linux 8 | libguestfs | 1:1.44.0-9.module+el8.7.0+1084+97b81f61.rocky | RLSA-2022:7472 |
| Rocky Linux 8 | libguestfs-winsupport | 8.6-1.module+el8.6.0+847+b490afdd | RLSA-2022:7472 |
| Rocky Linux 8 | libiscsi | 1.18.0-8.module+el8.4.0+534+4680a14e | RLSA-2022:7472 |
| Rocky Linux 8 | libnbd | 1.6.0-5.module+el8.6.0+847+b490afdd | RLSA-2022:7472 |
| Rocky Linux 8 | libtpms | 0.9.1-1.20211126git1ff6fe1f43.module+el8.7.0+1084+97b81f61 | RLSA-2022:7472 |
| Rocky Linux 8 | libvirt | 8.0.0-10.module+el8.7.0+1084+97b81f61 | RLSA-2022:7472 |
| Rocky Linux 8 | libvirt-dbus | 1.3.0-2.module+el8.4.0+534+4680a14e | RLSA-2022:7472 |
| Rocky Linux 8 | libvirt-python | 8.0.0-2.module+el8.7.0+1084+97b81f61 | RLSA-2022:7472 |
| Rocky Linux 8 | nbdkit | 1.24.0-4.module+el8.6.0+847+b490afdd | RLSA-2022:7472 |
| Rocky Linux 8 | netcf | 0.2.8-12.module+el8.4.0+534+4680a14e | RLSA-2022:7472 |
| Rocky Linux 8 | perl-Sys-Virt | 8.0.0-1.module+el8.6.0+847+b490afdd | RLSA-2022:7472 |
| Rocky Linux 8 | qemu-kvm | 5:6.2.0-20.module+el8.7.0+1084+97b81f61.2 | RLSA-2022:7472 |
| Rocky Linux 8 | seabios | 1.16.0-3.module+el8.7.0+1084+97b81f61 | RLSA-2022:7472 |
| Rocky Linux 8 | sgabios | 1:0.20170427git-3.module+el8.4.0+534+4680a14e | RLSA-2022:7472 |
| Rocky Linux 8 | supermin | 5.2.1-2.module+el8.7.0+1084+97b81f61 | RLSA-2022:7472 |
| Rocky Linux 8 | swtpm | 0.7.0-4.20211109gitb79fd91.module+el8.7.0+1084+97b81f61 | RLSA-2022:7472 |
| Rocky Linux 8 | virt-v2v | 1:1.42.0-21.module+el8.7.0+1084+97b81f61 | RLSA-2022:7472 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | swtpm | 0.5.3-150300.3.3.1 | SUSE-SU-2022:1297-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLE Micro 5.1 | swtpm | 0.5.3-150300.3.3.1 | SUSE-SU-2022:1297-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | swtpm | 0.7.1-1.1 | openSUSE-SU-2024:11870-1 |
| openSUSE Leap 15.3 | swtpm | 0.5.3-150300.3.3.1 | SUSE-SU-2022:1297-1 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | swtpm +2 | 0.7.0-3.20211109gitb79fd91.el9 | ELSA-2022-8100 |
| Oracle Linux 8 | hivex +6 | 1.3.18-23.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | libguestfs-winsupport | 8.6-1.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | libiscsi +2 | 1.18.0-8.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | libnbd +6 | 1.6.0-5.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | libtpms +1 | 0.9.1-1.20211126git1ff6fe1f43.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | libvirt +27 | 8.0.0-10.0.1.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | libvirt-dbus | 1.3.0-2.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | nbdkit +18 | 1.24.0-4.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | netcf +2 | 0.2.8-12.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | perl-Sys-Virt | 8.0.0-1.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | python3-libvirt | 8.0.0-2.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | qemu-img +14 | 15:6.2.0-20.module+el8.7.0+20875+5dd40464.1 | ELSA-2022-7472 |
| Oracle Linux 8 | seabios +2 | 1.16.0-3.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | sgabios +1 | 1:0.20170427git-3.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | supermin +1 | 5.2.1-2.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | swtpm +4 | 0.7.0-4.20211109gitb79fd91.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | virt-dib +24 | 1:1.44.0-9.0.1.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 8 | virt-v2v +3 | 1:1.42.0-21.module+el8.7.0+20875+5dd40464 | ELSA-2022-7472 |
| Oracle Linux 7 | libtpms +1 | 0.8.8-1.el7 | ELSA-2022-9240 |
| Oracle Linux 7 | swtpm +3 | 0.3.4-5.el7 | ELSA-2022-9240 |
Advisories 10
- ALSA-2022:8100 Low: swtpm security and bug fix update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2022:8100 Red Hat Security Advisory: swtpm security and bug fix update Red Hat Security Advisories (RHSA) · Jun 28, 2026
- RHSA-2022:7472 Red Hat Security Advisory: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Jun 28, 2026
- RLSA-2022:7472 Low: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update Rocky Linux Security Advisories · Feb 5, 2026
- SUSE-SU-2022:1297-1 Security update for swtpm SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11870-1 swtpm-0.7.1-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2022-2052 Mehrere Red Hat Enterprise Linux Pakete: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 29, 2025
- ELSA-2022-8100 Low: swtpm security and bug fix update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Nov 22, 2022
- ELSA-2022-7472 Low: virt:ol and virt-devel:ol security, bug fix, and enhancement update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Nov 15, 2022
- ELSA-2022-9240 Important: libtpms security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Mar 22, 2022
References
- https://github.com/stefanberger/swtpm/security/advisories/GHSA-2qgm-8xf4-3hqw
- https://github.com/stefanberger/swtpm/commit/9f740868fc36761de27df3935513bdebf8852d19
- https://github.com/stefanberger/swtpm/releases/tag/v0.5.3
- https://github.com/stefanberger/swtpm/releases/tag/v0.6.2
- https://github.com/stefanberger/swtpm/releases/tag/v0.7.1
- FEDORA-2022-12443a525c vendor-advisory