CVE-2026-143211 PUBLISHED

ptp: kvm: x86: Leak clock_pair page if changing its encryption fails

Assigner: Linux
Reserved: 03.12.2026 Published: 03.12.2026 Updated: 04.12.2026

In the Linux kernel, the following vulnerability has been resolved:

ptp: kvm: x86: Leak clock_pair page if changing its encryption fails

In a confidential guest, kvm_arch_ptp_init() shares the clock_pair page with the host using set_memory_decrypted(), and kvm_arch_ptp_exit() makes it private again with set_memory_encrypted() before freeing it.

The untrusted host can make either call fail and leave the page shared. Both paths still free the page: the init error path with __free_page(), and kvm_arch_ptp_exit() after only a WARN_ON(). The page allocator can then hand a page the host can still access to an unrelated user.

Leak the page in both cases instead, as was done for the same situation in commit b9fa16949d18 ("dma-direct: Leak pages on dma_set_decrypted() failure") and commit 03f5a999adba ("Drivers: hv: vmbus: Leak pages if set_memory_encrypted() fails").

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS Score: 9.3

AV:L - The attacker is the KVM host of a confidential guest. ptp_kvm_init() calls kvm_arch_ptp_init(), which shares one clock_pair page via set_memory_decrypted(); the host then forces kvm_arch_ptp_exit() because pvclock_get_pvti_cpu0_va() is NULL or KVM_HC_CLOCK_PAIRING returns -KVM_ENOSYS. No network protocol carries this fault. AC:L - The host sets the KVM CPUID signature but omits KVM_FEATURE_CLOCKSOURCE, so kvmclock_init() never calls pvclock_set_pvti_cpu0_va(), and then returns a failing TDVMCALL status from tdx_map_gpa() so tdx_enc_status_change_prepare() makes set_memory_encrypted() fail while clock_pair is still shared. Both steps are host-controlled and repeatable. PR:N - ptp_kvm_init() is a device_initcall with no credential or capability check (CONFIG_PTP_1588_CLOCK_KVM defaults to y). The host is outside the guest and needs no account inside it; it only answers CPUID, the KVM hypercall, and MapGPA. UI:N - With the driver built in, ptp_kvm_init() runs at boot and takes the kvm_arch_ptp_exit() error path solely because of host CPUID and MapGPA results. No guest user has to load a module, mount media, or open a file. S:C - Pre-fix kvm_arch_ptp_exit() free_page()s the clock_pair page after set_memory_encrypted() fails, returning a still-shared page to the buddy allocator and exposing later memory of every other guest authority across the TDX/SEV hardware boundary, as with an IOMMU bypass. C:H - tdx_enc_status_change_prepare() fails before __change_page_attr_set_clr(), so the direct map stays decrypted. The buddy allocator then places arbitrary later objects (slab, page cache, keys) on that page, which the host reads in plaintext. I:H - The recycled clock_pair page remains host-writable, so the host can modify whatever live kernel object the allocator puts there, including credentials or structures that hold function pointers. A:H - A private PTE for that still-shared PFN hits the TDX case in tdx_early_init() where a private mapping of a shared page shuts the guest down, and a host write into the recycled kernel object can oops the guest.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 143304277ffd538f7f022ecba9a75c75408a3d32 to b9a2d8026946b676a37061b352f2b2493e046267 (excl.)
  • affected from 6365ba64b4dbe8b59ddaeaa724b281f3787715d5 to 2219a9aef37cbdf8fcb853d7d76c8749fb49658e (excl.)
  • affected from 6365ba64b4dbe8b59ddaeaa724b281f3787715d5 to 836710f7981b3c4acb137613973b57f97942962d (excl.)
  • affected from 6365ba64b4dbe8b59ddaeaa724b281f3787715d5 to d6cf2ad9172ced724bfcf12ff965573f60e43ecb (excl.)
  • affected from 6365ba64b4dbe8b59ddaeaa724b281f3787715d5 to 6a01fb125ba6474cb97f14b68fe5435d3cdd08e5 (excl.)
  • Version 5ea817f40dbb78dc8fe0b073b2d069eb721e32aa is affected
  • affected from 5.15.175 to 5.15.227 (excl.)
  • affected from 6.1.121 to 6.2 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.4 is affected
  • unaffected from 0 to 6.4 (excl.)
  • unaffected from 5.15.227 to 5.15.* (incl.)
  • unaffected from 6.12.120 to 6.12.* (incl.)
  • unaffected from 6.18.66 to 6.18.* (incl.)
  • unaffected from 7.3.7 to 7.3.* (incl.)
  • unaffected from 7.4-rc3 to * (incl.)

References