tpm: fix reference counting for struct tpm_chip
In the Linux kernel, the following vulnerability has been resolved: tpm: fix reference counting for struct tpm_chip The following sequence of operations results in a refcount warning: 1. Open device /dev/tpmrm. 2. Remove module tpm_tis_spi. 3. Write a TPM command to the file descriptor opened at step 1. ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25 kobject_get+0xa0/0xa4 refcount_t: addition on 0; use-after-free. Modules linked in: tpm_tis_spi tpm_tis_core tpm mdio_bcm_unimac brcmfmac sha256_generic libsha256 sha256_arm hci_uart btbcm bluetooth cfg80211 vc4 brcmutil ecdh_generic ecc snd_soc_core crc32_arm_ce libaes raspberrypi_hwmon ac97_bus snd_pcm_dmaengine bcm2711_thermal snd_pcm snd_timer genet snd phy_generic soundcore [last unloaded: spi_bcm2835] CPU: 3 PID: 1161 Comm: hold_open Not tainted 5.10.0ls-main-dirty #2 Hardware name: BCM2711 [<c0410c3c>] (unwind_backtrace) from [<c040b580>] (show_stack+0x10/0x14) [<c040b580>] (show_stack) from [<c1092174>] (dump_stack+0xc4/0xd8) [<c1092174>] (dump_stack) from [<c0445a30>] (__warn+0x104/0x108) [<c0445a30>] (__warn) from [<c0445aa8>] (warn_slowpath_fmt+0x74/0xb8) [<c0445aa8>] (warn_slowpath_fmt) from [<c08435d0>] (kobject_get+0xa0/0xa4) [<c08435d0>] (kobject_get) from [<bf0a715c>] (tpm_try_get_ops+0x14/0x54 [tpm]) [<bf0a715c>] (tpm_try_get_ops [tpm]) from [<bf0a7d6c>] (tpm_common_write+0x38/0x60 [tpm]) [<bf0a7d6c>] (tpm_common_write [tpm]) from [<c05a7ac0>] (vfs_write+0xc4/0x3c0) [<c05a7ac0>] (vfs_write) from [<c05a7ee4>] (ksys_write+0x58/0xcc) [<c05a7ee4>] (ksys_write) from [<c04001a0>] (ret_fast_syscall+0x0/0x4c) Exception stack(0xc226bfa8 to 0xc226bff0) bfa0: 00000000 000105b4 00000003 beafe664 00000014 00000000 bfc0: 00000000 000105b4 000103f8 00000004 00000000 00000000 b6f9c000 beafe684 bfe0: 0000006c beafe648 0001056c b6eb6944 ---[ end trace d4b8409def9b8b1f ]--- The reason for this warning is the attempt to get the chip->dev reference in tpm_common_write() although the reference counter is already zero. Since commit 8979b02aaf1d ("tpm: Fix reference count to main device") the extra reference used to prevent a premature zero counter is never taken, because the required TPM_CHIP_FLAG_TPM2 flag is never set. Fix this by moving the TPM 2 character device handling from tpm_chip_alloc() to tpm_add_char_device() which is called at a later point in time when the flag has been set in case of TPM2. Commit fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm<n>") already introduced function tpm_devs_release() to release the extra reference but did not implement the required put on chip->devs that results in the call of this function. Fix this by putting chip->devs in tpm_chip_unregister(). Finally move the new implementation for the TPM 2 handling into a new function to avoid multiple checks for the TPM_CHIP_FLAG_TPM2 flag in the good case and error cases.
- Yayın
- 26 Şub 2025
- Güncelleme
- 5 Ağu 2026
- EPSS
- %0,3 · 18. yüzdelik
- CWE
- CWE-416
Takip etmek için giriş yap · Takip ettiğin kayıt KEV’e girer, istismarı çıkar ya da güncellenirse bildirim alırsın.
Rapor araçları
Aksiyon skoru
28
İzleyin
Şimdilik düşük öncelik.
- CVSS
- 28 / 40 · 7.0 / 10
- CISA KEV
- 0 / 30 · Listede değil
- EPSS
- 0 / 30 · %0,3
CISA SSVC kararı
- Sömürü
- yok
- Otomatikleştirilebilir
- hayır
- Teknik etki
- tam
Vulnrichment: CISA'nın karar ağacı girdileri.
CNA ile NVD puanı
- NVD
- —
- CNA · Linux
- 7,0
- NVD henüz kendi puanını vermedi; gösterilen puan CNA’nın.
Kaydı açan otoritenin puanı ile NVD’nin bağımsız puanı. İki puan arasındaki fark ciddiyetin tartışmalı olduğunu gösterir.
Etkilenen sistemler
| Üretici | Ürün | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Etkilenen sürümler
NVD sürüm aralıkları (katalogdaki ürünler için). Stack’ine sürümle eklersen eşleşme bunlarla yapılır.
- linux linux kernel4.12 ve sonrası · 4.14.276 öncesi
- linux linux kernel4.15 ve sonrası · 4.19.238 öncesi
- linux linux kernel4.20 ve sonrası · 5.4.189 öncesi
- linux linux kernel5.5 ve sonrası · 5.10.110 öncesi
- linux linux kernel5.11 ve sonrası · 5.15.33 öncesi
- linux linux kernel5.16 ve sonrası · 5.16.19 öncesi
- linux linux kernel5.17 ve sonrası · 5.17.1 öncesi
Üreticinin bildirdiği sürümler
Kaydı açan otorite (Linux) tarafından bildirilen etkilenen sürüm aralıkları. NVD'nin CPE analizinden bağımsızdır ve genellikle ondan önce gelir.
Linux Linux
- 4.12etkilenir
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · 473a66f99cb8173c14138c5a5c69bfad04e8f9ac öncesietkilenir · git
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · cb64bd038beacb4331fe464a36c8b5481e8f51e2 öncesietkilenir · git
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · a27ed2f3695baf15f9b34d2d7a1f9fc105539a81 öncesietkilenir · git
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · 290e05f346d1829e849662c97e42d5ad984f5258 öncesietkilenir · git
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · 662893b4f6bd466ff9e1cd454c44c26d32d554fe öncesietkilenir · git
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · 2f928c0d5c02dbab49e8c19d98725c822f6fc409 öncesietkilenir · git
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · 6e7baf84149fb43950631415de231b3a41915aa3 öncesietkilenir · git
- fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 ve sonrası · 7e0438f83dc769465ee663bb5dcf8cc154940712 öncesietkilenir · git
- 4.12 öncesietkilenmez · semver
Paket düzeyi etkilenme
OSV ve GitHub Advisory verisi: ekosistem, paket ve aralık. SBOM eşleşmesi bu tabloyu kullanır.
| Ekosistem | Paket | Etkilenen aralık | Düzeltme |
|---|---|---|---|
| Debian:12 | linux | 5.17.3-1 öncesi | 5.17.3-1 |
| Red Hat:enterprise_linux:9::appstream | bpftool-debuginfo | 0:7.2.0-362.8.1.el9_3 öncesi | 0:7.2.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-64k-debug-debuginfo | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-64k-debug-devel | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-64k-debug-devel-matched | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-64k-debuginfo | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-64k-devel | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-64k-devel-matched | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debug-debuginfo | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debug-devel | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debug-devel-matched | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debuginfo | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debuginfo-common-aarch64 | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debuginfo-common-ppc64le | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debuginfo-common-s390x | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-debuginfo-common-x86_64 | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-devel | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-devel-matched | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-doc | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-tools-debuginfo | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-zfcpdump-debuginfo | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-zfcpdump-devel | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | kernel-zfcpdump-devel-matched | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
| Red Hat:enterprise_linux:9::appstream | libperf-debuginfo | 0:5.14.0-362.8.1.el9_3 öncesi | 0:5.14.0-362.8.1.el9_3 |
+55
Aynı üründe
linux: tüm kayıtlarAynı birincil ürünün en yüksek skorlu diğer kayıtları.
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Hemen
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Hemen
- CVE-2016-5195Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by leveraging incorrect haKEV83Hemen
- CVE-2019-13272In the Linux kernel before 5.1.17, ptrace_link in kernel/ptrace.c mishandles the recording of the credentials of a process that wants to creKEV77Bu hafta
- CVE-2013-6282The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the v6k and v7 ARM platforms do not validate certain addKEV77Bu hafta
- CVE-2013-2094The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9 uses an incorrect integer data type, which allows loKEV77Bu hafta
Düzeltme
Hangi sürüme geçmeli
Üretici, paket deposu ve Microsoft kayıtlarından derlenen düzeltme sürümleri. Yükseltmeden önce üreticinin notunu doğrulayın.
| Ürün / paket | Düzeltilmiş sürüm | Kaynak |
|---|---|---|
| Linux Linux | 290e05f346d1829e849662c97e42d5ad984f5258 | Üretici (CNA) |
| Linux Linux | 2f928c0d5c02dbab49e8c19d98725c822f6fc409 | Üretici (CNA) |
| Linux Linux | 473a66f99cb8173c14138c5a5c69bfad04e8f9ac | Üretici (CNA) |
| Linux Linux | 662893b4f6bd466ff9e1cd454c44c26d32d554fe | Üretici (CNA) |
| Linux Linux | 6e7baf84149fb43950631415de231b3a41915aa3 | Üretici (CNA) |
| Linux Linux | 7e0438f83dc769465ee663bb5dcf8cc154940712 | Üretici (CNA) |
| Linux Linux | a27ed2f3695baf15f9b34d2d7a1f9fc105539a81 | Üretici (CNA) |
| Linux Linux | cb64bd038beacb4331fe464a36c8b5481e8f51e2 | Üretici (CNA) |
| debian:linux | 5.17.3-1 · Debian:12 | Paket deposu (OSV) |
| red hat:bpftool-debuginfo | 0:7.2.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-64k-debug-debuginfo | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-64k-debug-devel | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-64k-debug-devel-matched | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-64k-debuginfo | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-64k-devel | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-64k-devel-matched | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-debug-debuginfo | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-debug-devel | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-debug-devel-matched | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-debuginfo | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
| red hat:kernel-debuginfo-common-aarch64 | 0:5.14.0-362.8.1.el9_3 · Red Hat:enterprise_linux:9::appstream | Paket deposu (OSV) |
İstismar durumu
Bilinen kamuya açık istismar yok
Şu an kamuya açık bir istismar görülmedi. Bu, güvende olduğunuz anlamına gelmez; yalnızca eşiğin biraz daha yüksek olduğunu gösterir.
Araştırma bağlamı
Pentester ve araştırmacı için: saldırı profili, puan anlaşmazlığı, zaman çizelgesi, yama commit’leri, kredi, varyant ve zincir adayları, bug bounty kapsamı. Hepsi mevcut veriden türetilir; istismar kodu içermez.
Zaman çizelgesi
Yayından bugüne: kavram kanıtı, Metasploit modülü, CISA KEV ve düzeltme kaydı. Tarihler kaynakların bildirdiği tarihlerdir.
Yayın dışında tarihli olay yok.
FIRST EPSS günlük puanı; yalnızca 0,01 ve üstü değişimler kaydedilir (adım grafiği).
Yama ve commit bağlantıları
Referanslardaki commit, PR ve diff adresleri. Patch-diff ve varyant avı için başlangıç noktası; istismar değil, düzeltmedir.
Referanslarda commit ya da PR bağlantısı yok.
Kredi
Tüm araştırmacılarCNA kaydında adı geçen bulan, bildiren ve analistler. Ada tıkla, aynı araştırmacının diğer kayıtlarını gör.
CNA kaydında kredi yok.
Varyant adayları
Aynı üründe aynı zafiyet sınıfı, 18 ay içinde. Yama kök nedeni kapatmadıysa kardeş hata burada olur.
Gece hesaplanan ilişki yok.
Zincir adayları
Aynı üründe kimlik doğrulama atlatma ile yetki isteyen bir açık kısa aralıkla yayımlanmış: birlikte kimlik doğrulamasız bir yola dönüşebilir.
—
Bug bounty kapsamı
Bilinen herkese açık program yok.
Kaynak: bounty-targets-data (HackerOne, Bugcrowd, Intigriti, YesWeHack herkese açık listeleri).
Teknik detay
Saldırı koşulları
- Sisteme yerel erişimi olan biri tetikleyebilir.
- Düşük yetkili bir hesap yeterli.
- Kullanıcının bir şey yapması gerekmez.
- Zamanlama ya da yapılandırma gibi özel koşullar gerekir.
Başarılı olursa
- Gizlilik
- yüksek · veriler okunabilir
- Bütünlük
- yüksek · veri ya da yapılandırma değiştirilebilir
- Erişilebilirlik
- yüksek · hizmet durdurulabilir
- Saldırı vektörü
- Yerel
- Karmaşıklık
- Yüksek
- Gereken yetki
- Düşük
- Kullanıcı etkileşimi
- Gerekmez
- Kapsam
- Değişmez
- Gizlilik etkisi
- Yüksek
- Bütünlük etkisi
- Yüksek
- Erişilebilirlik etkisi
- Yüksek
Zayıflık sınıfı (CWE)
CWE-416 · Use After FreeCVSS vektörü
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-secondary
Kök neden
Bir bellek alanı serbest bırakıldıktan sonra ona işaret eden başka bir referans kullanılmaya devam ediyor. Aynı alan o sırada başka bir veri için ayrılmış olabilir.
Hatanın kod karşılığı
CWE-416 sınıfının tamamıBu zafiyet sınıfının temsili örneği. Üreticinin kaynak kodu değildir; hatalı kalıbı ve düzeltmesini gösterir.
Hatalı
free(dev->buf);/* ... başka bir iş parçacığı hâlâ çalışıyor ... */process(dev->buf);Düzeltilmiş
lock(&dev->lock);free(dev->buf);dev->buf = NULL;unlock(&dev->lock);Saldırı bağlamı
Bu zafiyet sınıfının (CWE) MITRE CAPEC saldırı desenleri ve ATT&CK teknikleri. Tespit kuralı ve tehdit avı için başlangıç noktası.
Bu CWE için MITRE'de CAPEC/ATT&CK eşlemesi yok.
Noroxi analizi
Bu kayıt için henüz Noroxi analizi yok
385 binden fazla zafiyetin tamamına elle analiz yazmıyoruz; bu dürüst olmazdı. Öne çıkan ve sahada etkisi olan zafiyetler için mekanizma, tespit ve kapatma adımlarını ekibimiz yazıyor.
Bu ürünü kullanıyoruz, yardım isteyinDeğişiklik günlüğü
- Düzeltme✗ → ✓
Takip ettiğiniz kayıtlarda bu değişiklikler bildirim olarak da gelir. →
Referanslar
- git.kernel.org/stable/c/290e05f346d1829e849662c97e42d5ad984f5258
- git.kernel.org/stable/c/2f928c0d5c02dbab49e8c19d98725c822f6fc409
- git.kernel.org/stable/c/473a66f99cb8173c14138c5a5c69bfad04e8f9ac
- git.kernel.org/stable/c/662893b4f6bd466ff9e1cd454c44c26d32d554fe
- git.kernel.org/stable/c/6e7baf84149fb43950631415de231b3a41915aa3
- git.kernel.org/stable/c/7e0438f83dc769465ee663bb5dcf8cc154940712
- git.kernel.org/stable/c/a27ed2f3695baf15f9b34d2d7a1f9fc105539a81
- git.kernel.org/stable/c/cb64bd038beacb4331fe464a36c8b5481e8f51e2
Üretici bildirimleri ve resmî kayıtlar. İstismar/PoC bağlantıları bilinçli olarak dışarıda bırakıldı.