Skip to content

Conversation

pvts-mat
Copy link
Contributor

@pvts-mat pvts-mat commented Oct 5, 2025

[LTS 9.2]
CVE-2024-25742 VULN-756
CVE-2024-25743 VULN-764
CVE-2024-25744 VULN-772

Background

Cves CVE-2024-25742, CVE-2024-25743, CVE-2024-25744 are all associated with the same work of ETH Zurich researchers. The attack target is a Linux virtual machine and the attacker is its own hypervisor. Of course, in the classical setting the hypervisor has full control over all its guests and there is no need for any "attack". The scenario applies to VMs which have their memory encrypted and not available to the hypervisor to read or (unnoticably) modify. Such VMs are called isolated or confidential (CVM) and the hypervisor untrusted. It's an important use case in the modern cloud computing environment, where the virtual machines are often run on a third party physical machines.

Confidentiality of VM's memory from the hypervisor can only be achieved with hardware support, as the guest needs to keep the (necessarily) unencrypted key to its encrypted memory outside of hypervisor-controlled memory itself. This is called Trusted Execution Environment (TEE). The technologies relevant to the CVEs are AMD SEV-SNP (Secure Encrypted Virtualization - Secure Nested Paging) and Intel TDX (Trusted Domain Extensions). They serve roughly the same function of encrypting entire VM's memory.

Although the hypervisor cannot read VM's memory it still needs to have some means of controlling it, among others - raising interrupts. The attack leverages hypervisor's ability to arbitrarily issue interrupts on its guest to obtain unauthorized access. Different CVE numbers are related to different interrupt families. Refer to the following table for the summary:

  CVE-2024-25742 CVE-2024-25743 CVE-2024-25744
Interrupts int29 (#VC)1 int0, int142 int803
Exploit WeSee4 Heckler5 Heckler5
Fix for Intel TDX Unaffected6 Unaffected7 f4116bf8
Fix for AMD SEV-SNP e3ef4619 No fix10 b82a8db11, 55617fb12

Misconceptions

  1. RH conflates CVE-2024-25742 with CVE-2024-25743. It can be seen by the same messages on RH pages and the same bugzilla page https://bugzilla.redhat.com/show_bug.cgi?id=2270836, also in the commit 6b3b233. This is a mistake, as laid out in Background. If one insisted on grouping CVE-2024-25743 with some other CVE it should rather be CVE-2024-25744.
  2. RH assigns CVSS = 7.1 to CVE-2024-25743 and CVSS = 5.5 to CVE-2024-25744, while the latter is arguably more serious, with int80 attack being more versatile with all else being equal. This is reflected by NIST scores CVSS = 7.1 for CVE-2024-25743 and CVSS = 8.8 for CVE-2024-25744.
  3. There is no upstream fix for CVE-2024-25743, despite RH claimming to have it fixed for 9.2 EUS. Again, this is probably the result of equating it with CVE-2024-25742.
  4. The fix for CVE-2024-25744 is only a fix for Intel TDX. For AMD SEV-SNP it seems to be merely a mitigation (disabling the ia32 emulation which allows for int80 attacks).
  5. For AMD SEV-SNP, disabling IA32 emulation, as done by the often cited commit b82a8db, works as a mitigation for CVE-2024-25744, but not for CVE-2024-25743. See https://ahoi-attacks.github.io/heckler/heckler_usenix24.pdf:

    Disabling Interrupt Handlers. Another approach is to disable vulnerable interrupts by not registering handlers for them in the guest OS. This works for int 0x80 if the kernel is recompiled without the configuration flag CONFIG_IA32_EMULATION, which disables IA32 emulation. However, again, this does not generalize beyond int 0x80.

Applicability

LTS 9.2 supports both Intel TDX and AMD SEV-SNP, so the problem applies to full extent:

CONFIG_INTEL_TDX_GUEST=y

The IA32 emulation is enabled, which exposes LTS 9.2 to CVE-2024-25744:

CONFIG_IA32_EMULATION=y

Solution

The solution is provided for CVE-2024-25744 and CVE-2024-25742.

  • CVE-2024-25744
    • First a patch set is backported which introduces the ability to disable the ia32 emulation at runtime, with the ia32_enabled kernel command line parameter, in contrast to having only the compile time option CONFIG_IA32_EMULATION. This allows for CVE-2024-25744 mitigation in b82a8db.
      • Commits 1da5c9b, f71e1d2, 370dcd5, 6138228, a11e097 comprise the patch set proper. Commit 5ae2702 from the patch set was omitted, because it was causing kABI breakage. This effectively makes loading of 32 bit processes ignore the ia32_enabled parameter being introduced. From the perspective of patching CVE-2024-25744 this is fine, because the vulnerability is not related to running 32 bit processes.
      • 6bf8a55 is picked as prerequisite to avoid silly naming conflicts.
      • d55f31e is picked as a bugfix for a11e097.
    • Next a series of commits from the branch incorporated in the f35e466 merge tag are backported
      • b82a8db is a mitigation of CVE-2024-25744 vulnerability for both Intel TDX and AMD SEV-SNP which disables ia32 emulation on both platforms by default.
      • Commits be5341e, 55617fb implement the refusal of externally raised interrupts 80 on Intel TDX, effectively fixing the CVE-2024-25744 on this platform.
      • Commit f4116bf re-enables ia32 emulation for Intel TDX by default once it's safe again.
      • The 32f5f73 commit was considered as a bugfix for 55617fb, but it doesn't apply - the FRED (Fast Realtime Event Dispatcher) is not implemented in ciqlts9_2.
  • CVE-2024-25742

The commits grouping summary:

Group Upstream PR Description
CVE-2024-25744 preparation 6bf8a55 286db90 x86: Fix misspelled Kconfig symbols
CVE-2024-25744 preparation 1da5c9b b96a127 x86: Introduce ia32_enabled()
CVE-2024-25744 preparation f71e1d2 9c48d66 x86/entry: Rename ignore_sysret()
CVE-2024-25744 preparation 370dcd5 afb4eac x86/entry: Compile entry_SYSCALL32_ignore() unconditionally
CVE-2024-25744 preparation 6138228 efb829a x86/entry: Make IA32 syscalls' availability depend on ia32_enabled()
CVE-2024-25744 preparation a11e097 a9b2a12 x86: Make IA32_EMULATION boot time configurable
CVE-2024-25744 preparation d55f31e dfa91c6 x86/entry: Add __init to ia32_emulation_override_cmdline()
CVE-2024-25744 fix b82a8db 1988eb4 x86/coco: Disable 32-bit emulation by default on TDX and SEV
CVE-2024-25744 fix be5341e 00bb287 x86/entry: Convert INT 0x80 emulation to IDTENTRY
CVE-2024-25744 fix 55617fb 325b5d8 x86/entry: Do not allow external 0x80 interrupts
CVE-2024-25744 fix f4116bf 31adcfc x86/tdx: Allow 32-bit emulation by default
CVE-2024-25742 fix e3ef461 30b7655 x86/sev: Harden #VC instruction emulation somewhat
CVE-2024-25742 fix e70316d 30d8f21 x86/sev: Check for MWAITX and MONITORX opcodes in the #VC handler

kABI check: passed

$ DESCR_TARGET=1 DEBUG=1 RELAXED_DEPS=1 CVE=CVE-batch-7 ./ninja.sh -d explain _kabi_checked__x86_64--test--ciqlts9_2-CVE-batch-7

…
[1/2] 	Check ABI of kernel [ciqlts9_2-CVE-batch-7]	_kabi_checked__x86_64--test--ciqlts9_2-CVE-batch-7
++ uname -m
+ python3 /data/src/ctrliq-github/kernel-dist-git-el-9.2/SOURCES/check-kabi -k /data/src/ctrliq-github/kernel-dist-git-el-9.2/SOURCES/Module.kabi_x86_64 -s vms/x86_64--build--ciqlts9_2/build_files/kernel-src-tree-ciqlts9_2-CVE-batch-7/Module.symvers
kABI check passed
+ touch state/kernels/ciqlts9_2-CVE-batch-7/x86_64/kabi_checked

Boot test: passed

boot-test.log

Kselftests: passed relative

Reference

kselftests–ciqlts9_2–run1.log
kselftests–ciqlts9_2–run2.log

Patch

kselftests–ciqlts9_2-CVE-batch-7–run1.log
kselftests–ciqlts9_2-CVE-batch-7–run2.log

Comparison

The tests results for the reference and the patch are the same.

$ ktests.xsh diff  kselftests*.log

Column    File
--------  -------------------------------------------
Status0   kselftests--ciqlts9_2--run1.log
Status1   kselftests--ciqlts9_2--run2.log
Status2   kselftests--ciqlts9_2-CVE-batch-7--run1.log
Status3   kselftests--ciqlts9_2-CVE-batch-7--run2.log

TestCase                                               Status0  Status1  Status2  Status3  Summary
bpf:get_cgroup_id_user                                 pass     pass     pass     pass     same
bpf:test_bpftool.sh                                    pass     pass     pass     pass     same
bpf:test_bpftool_build.sh                              pass     pass     pass     pass     same
bpf:test_bpftool_metadata.sh                           pass     pass     pass     pass     same
bpf:test_cgroup_storage                                pass     pass     pass     pass     same
bpf:test_dev_cgroup                                    pass     pass     pass     pass     same
bpf:test_doc_build.sh                                  pass     pass     pass     pass     same
bpf:test_flow_dissector.sh                             pass     pass     pass     pass     same
bpf:test_lirc_mode2.sh                                 pass     pass     pass     pass     same
bpf:test_lpm_map                                       pass     pass     pass     pass     same
bpf:test_lru_map                                       pass     pass     pass     pass     same
bpf:test_lwt_ip_encap.sh                               pass     pass     pass     pass     same
bpf:test_lwt_seg6local.sh                              pass     pass     pass     pass     same
bpf:test_offload.py                                    pass     pass     pass     pass     same
bpf:test_skb_cgroup_id.sh                              pass     pass     pass     pass     same
bpf:test_sock                                          pass     pass     pass     pass     same
bpf:test_sock_addr.sh                                  pass     pass     pass     pass     same
bpf:test_sysctl                                        pass     pass     pass     pass     same
bpf:test_tag                                           pass     pass     pass     pass     same
bpf:test_tc_edt.sh                                     pass     pass     pass     pass     same
bpf:test_tc_tunnel.sh                                  pass     pass     pass     pass     same
bpf:test_tcp_check_syncookie.sh                        pass     pass     pass     pass     same
bpf:test_tcpnotify_user                                pass     pass     pass     pass     same
bpf:test_tunnel.sh                                     pass     pass     pass     pass     same
bpf:test_verifier                                      pass     pass     pass     pass     same
bpf:test_verifier_log                                  pass     pass     pass     pass     same
bpf:test_xdp_meta.sh                                   pass     pass     pass     pass     same
bpf:test_xdp_redirect.sh                               pass     pass     pass     pass     same
bpf:test_xdp_redirect_multi.sh                         pass     pass     pass     pass     same
bpf:test_xdp_veth.sh                                   pass     pass     pass     pass     same
bpf:test_xdp_vlan_mode_generic.sh                      pass     pass     pass     pass     same
bpf:test_xdp_vlan_mode_native.sh                       pass     pass     pass     pass     same
bpf:test_xdping.sh                                     pass     pass     pass     pass     same
bpf:urandom_read                                       pass     pass     pass     pass     same
breakpoints:breakpoint_test                            pass     pass     pass     pass     same
capabilities:test_execve                               pass     pass     pass     pass     same
cgroup:test_core                                       fail     fail     fail     fail     same
cgroup:test_cpuset_prs.sh                              pass     pass     pass     pass     same
cgroup:test_kill                                       pass     pass     pass     pass     same
cgroup:test_kmem                                       pass     pass     pass     pass     same
cgroup:test_stress.sh                                  fail     fail     fail     fail     same
clone3:clone3                                          pass     pass     pass     pass     same
clone3:clone3_cap_checkpoint_restore                   pass     pass     pass     pass     same
clone3:clone3_clear_sighand                            pass     pass     pass     pass     same
clone3:clone3_set_tid                                  pass     pass     pass     pass     same
core:close_range_test                                  pass     pass     pass     pass     same
cpu-hotplug:cpu-on-off-test.sh                         pass     pass     pass     pass     same
cpufreq:main.sh                                        fail     fail     fail     fail     same
drivers/dma-buf:udmabuf                                pass     pass     pass     pass     same
drivers/net/bonding:bond-arp-interval-causes-panic.sh  pass     pass     pass     pass     same
drivers/net/bonding:bond-break-lacpdu-tx.sh            pass     pass     pass     pass     same
drivers/net/bonding:bond-lladdr-target.sh              pass     pass     pass     pass     same
drivers/net/bonding:dev_addr_lists.sh                  pass     pass     pass     pass     same
drivers/net/bonding:mode-1-recovery-updelay.sh         pass     pass     pass     pass     same
drivers/net/bonding:mode-2-recovery-updelay.sh         pass     pass     pass     pass     same
drivers/net/team:dev_addr_lists.sh                     pass     pass     pass     pass     same
filesystems/binderfs:binderfs_test                     fail     fail     fail     fail     same
firmware:fw_run_tests.sh                               skip     skip     skip     skip     same
fpu:run_test_fpu.sh                                    skip     skip     skip     skip     same
fpu:test_fpu                                           pass     pass     pass     pass     same
ftrace:ftracetest                                      fail     fail     fail     fail     same
futex:run.sh                                           pass     pass     pass     pass     same
gpio:gpio-mockup.sh                                    fail     fail     fail     fail     same
intel_pstate:run.sh                                    pass     pass     pass     pass     same
ipc:msgque                                             pass     pass     pass     pass     same
ir:ir_loopback.sh                                      skip     skip     skip     skip     same
kcmp:kcmp_test                                         pass     pass     pass     pass     same
kexec:test_kexec_file_load.sh                          skip     skip     skip     skip     same
kexec:test_kexec_load.sh                               skip     skip     skip     skip     same
kvm:access_tracking_perf_test                          pass     pass     pass     pass     same
kvm:amx_test                                           fail     fail     fail     fail     same
kvm:cpuid_test                                         fail     fail     fail     fail     same
kvm:cr4_cpuid_sync_test                                fail     fail     fail     fail     same
kvm:debug_regs                                         fail     fail     fail     fail     same
kvm:demand_paging_test                                 pass     pass     pass     pass     same
kvm:dirty_log_perf_test                                pass     pass     pass     pass     same
kvm:dirty_log_test                                     fail     fail     fail     fail     same
kvm:emulator_error_test                                fail     fail     fail     fail     same
kvm:evmcs_test                                         fail     fail     fail     fail     same
kvm:fix_hypercall_test                                 fail     fail     fail     fail     same
kvm:get_msr_index_features                             fail     fail     fail     fail     same
kvm:hardware_disable_test                              pass     pass     pass     pass     same
kvm:hyperv_clock                                       fail     fail     fail     fail     same
kvm:hyperv_cpuid                                       fail     fail     fail     fail     same
kvm:hyperv_features                                    fail     fail     fail     fail     same
kvm:hyperv_svm_test                                    fail     fail     fail     fail     same
kvm:kvm_binary_stats_test                              pass     pass     pass     pass     same
kvm:kvm_clock_test                                     fail     fail     fail     fail     same
kvm:kvm_create_max_vcpus                               pass     pass     pass     pass     same
kvm:kvm_page_table_test                                pass     pass     pass     pass     same
kvm:kvm_pv_test                                        fail     fail     fail     fail     same
kvm:max_guest_memory_test                              pass     pass     pass     pass     same
kvm:max_vcpuid_cap_test                                fail     fail     fail     fail     same
kvm:memslot_modification_stress_test                   pass     pass     pass     pass     same
kvm:memslot_perf_test                                  pass     pass     pass     pass     same
kvm:mmio_warning_test                                  fail     fail     fail     fail     same
kvm:monitor_mwait_test                                 fail     fail     fail     fail     same
kvm:nx_huge_pages_test.sh                              fail     fail     fail     fail     same
kvm:platform_info_test                                 fail     fail     fail     fail     same
kvm:pmu_event_filter_test                              fail     fail     fail     fail     same
kvm:rseq_test                                          fail     fail     fail     fail     same
kvm:set_boot_cpu_id                                    fail     fail     fail     fail     same
kvm:set_memory_region_test                             pass     pass     pass     pass     same
kvm:set_sregs_test                                     fail     fail     fail     fail     same
kvm:sev_migrate_tests                                  fail     fail     fail     fail     same
kvm:smm_test                                           fail     fail     fail     fail     same
kvm:state_test                                         fail     fail     fail     fail     same
kvm:steal_time                                         pass     pass     pass     pass     same
kvm:svm_int_ctl_test                                   fail     fail     fail     fail     same
kvm:svm_nested_soft_inject_test                        fail     fail     fail     fail     same
kvm:svm_vmcall_test                                    fail     fail     fail     fail     same
kvm:sync_regs_test                                     fail     fail     fail     fail     same
kvm:system_counter_offset_test                         pass     pass     pass     pass     same
kvm:triple_fault_event_test                            fail     fail     fail     fail     same
kvm:tsc_msrs_test                                      fail     fail     fail     fail     same
kvm:tsc_scaling_sync                                   fail     fail     fail     fail     same
kvm:ucna_injection_test                                fail     fail     fail     fail     same
kvm:userspace_io_test                                  fail     fail     fail     fail     same
kvm:userspace_msr_exit_test                            fail     fail     fail     fail     same
kvm:vmx_apic_access_test                               fail     fail     fail     fail     same
kvm:vmx_close_while_nested_test                        fail     fail     fail     fail     same
kvm:vmx_dirty_log_test                                 fail     fail     fail     fail     same
kvm:vmx_exception_with_invalid_guest_state             fail     fail     fail     fail     same
kvm:vmx_invalid_nested_guest_state                     fail     fail     fail     fail     same
kvm:vmx_msrs_test                                      fail     fail     fail     fail     same
kvm:vmx_nested_tsc_scaling_test                        fail     fail     fail     fail     same
kvm:vmx_pmu_caps_test                                  fail     fail     fail     fail     same
kvm:vmx_preemption_timer_test                          fail     fail     fail     fail     same
kvm:vmx_set_nested_state_test                          fail     fail     fail     fail     same
kvm:vmx_tsc_adjust_test                                fail     fail     fail     fail     same
kvm:xapic_ipi_test                                     fail     fail     fail     fail     same
kvm:xapic_state_test                                   fail     fail     fail     fail     same
kvm:xen_shinfo_test                                    fail     fail     fail     fail     same
kvm:xen_vmcall_test                                    fail     fail     fail     fail     same
kvm:xss_msr_test                                       fail     fail     fail     fail     same
landlock:base_test                                     fail     fail     fail     fail     same
landlock:fs_test                                       fail     fail     fail     fail     same
landlock:ptrace_test                                   fail     fail     fail     fail     same
lib:bitmap.sh                                          skip     skip     skip     skip     same
lib:prime_numbers.sh                                   skip     skip     skip     skip     same
lib:printf.sh                                          skip     skip     skip     skip     same
lib:scanf.sh                                           skip     skip     skip     skip     same
lib:strscpy.sh                                         skip     skip     skip     skip     same
livepatch:test-callbacks.sh                            skip     skip     skip     skip     same
livepatch:test-ftrace.sh                               skip     skip     skip     skip     same
livepatch:test-livepatch.sh                            skip     skip     skip     skip     same
livepatch:test-shadow-vars.sh                          skip     skip     skip     skip     same
livepatch:test-state.sh                                skip     skip     skip     skip     same
membarrier:membarrier_test_multi_thread                pass     pass     pass     pass     same
membarrier:membarrier_test_single_thread               pass     pass     pass     pass     same
memfd:memfd_test                                       pass     pass     pass     pass     same
memfd:run_fuse_test.sh                                 pass     pass     pass     pass     same
memfd:run_hugetlbfs_test.sh                            pass     pass     pass     pass     same
memory-hotplug:mem-on-off-test.sh                      pass     pass     pass     pass     same
mincore:mincore_selftest                               fail     fail     fail     fail     same
mount:run_nosymfollow.sh                               pass     pass     pass     pass     same
mount:run_unprivileged_remount.sh                      pass     pass     pass     pass     same
mqueue:mq_open_tests                                   pass     pass     pass     pass     same
mqueue:mq_perf_tests                                   pass     pass     pass     pass     same
nci:nci_dev                                            fail     fail     fail     fail     same
net/forwarding:bridge_locked_port.sh                   pass     pass     pass     pass     same
net/forwarding:bridge_mld.sh                           fail     fail     fail     fail     same
net/forwarding:bridge_port_isolation.sh                pass     pass     pass     pass     same
net/forwarding:bridge_sticky_fdb.sh                    pass     pass     pass     pass     same
net/forwarding:bridge_vlan_aware.sh                    fail     fail     fail     fail     same
net/forwarding:bridge_vlan_mcast.sh                    fail     fail     fail     fail     same
net/forwarding:bridge_vlan_unaware.sh                  pass     pass     pass     pass     same
net/forwarding:custom_multipath_hash.sh                fail     fail     fail     fail     same
net/forwarding:ethtool.sh                              fail     fail     fail     fail     same
net/forwarding:ethtool_extended_state.sh               fail     fail     fail     fail     same
net/forwarding:gre_custom_multipath_hash.sh            fail     fail     fail     fail     same
net/forwarding:gre_inner_v4_multipath.sh               fail     fail     fail     fail     same
net/forwarding:gre_multipath.sh                        fail     fail     fail     fail     same
net/forwarding:gre_multipath_nh.sh                     fail     fail     fail     fail     same
net/forwarding:gre_multipath_nh_res.sh                 fail     fail     fail     fail     same
net/forwarding:hw_stats_l3.sh                          fail     fail     fail     fail     same
net/forwarding:hw_stats_l3_gre.sh                      fail     fail     fail     fail     same
net/forwarding:ip6_forward_instats_vrf.sh              fail     fail     fail     fail     same
net/forwarding:ip6gre_custom_multipath_hash.sh         fail     fail     fail     fail     same
net/forwarding:ip6gre_flat.sh                          pass     pass     pass     pass     same
net/forwarding:ip6gre_flat_key.sh                      pass     pass     pass     pass     same
net/forwarding:ip6gre_flat_keys.sh                     pass     pass     pass     pass     same
net/forwarding:ip6gre_hier.sh                          pass     pass     pass     pass     same
net/forwarding:ip6gre_hier_key.sh                      pass     pass     pass     pass     same
net/forwarding:ip6gre_hier_keys.sh                     pass     pass     pass     pass     same
net/forwarding:ip6gre_inner_v4_multipath.sh            fail     fail     fail     fail     same
net/forwarding:ip6gre_inner_v6_multipath.sh            fail     fail     fail     fail     same
net/forwarding:ipip_flat_gre.sh                        pass     pass     pass     pass     same
net/forwarding:ipip_flat_gre_key.sh                    pass     pass     pass     pass     same
net/forwarding:ipip_flat_gre_keys.sh                   pass     pass     pass     pass     same
net/forwarding:ipip_hier_gre.sh                        pass     pass     pass     pass     same
net/forwarding:ipip_hier_gre_key.sh                    pass     pass     pass     pass     same
net/forwarding:loopback.sh                             skip     skip     skip     skip     same
net/forwarding:mirror_gre.sh                           fail     fail     fail     fail     same
net/forwarding:mirror_gre_bound.sh                     pass     pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1d.sh                 pass     pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1q.sh                 pass     pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1q_lag.sh             pass     pass     pass     pass     same
net/forwarding:mirror_gre_changes.sh                   fail     fail     fail     fail     same
net/forwarding:mirror_gre_flower.sh                    fail     fail     fail     fail     same
net/forwarding:mirror_gre_lag_lacp.sh                  pass     pass     pass     pass     same
net/forwarding:mirror_gre_neigh.sh                     pass     pass     pass     pass     same
net/forwarding:mirror_gre_nh.sh                        pass     pass     pass     pass     same
net/forwarding:mirror_gre_vlan.sh                      pass     pass     pass     pass     same
net/forwarding:mirror_vlan.sh                          pass     pass     pass     pass     same
net/forwarding:pedit_dsfield.sh                        pass     pass     pass     pass     same
net/forwarding:pedit_ip.sh                             pass     pass     pass     pass     same
net/forwarding:pedit_l4port.sh                         pass     pass     pass     pass     same
net/forwarding:q_in_vni_ipv6.sh                        pass     pass     pass     pass     same
net/forwarding:router.sh                               skip     skip     skip     skip     same
net/forwarding:router_bridge.sh                        pass     pass     pass     pass     same
net/forwarding:router_bridge_vlan.sh                   pass     pass     pass     pass     same
net/forwarding:router_broadcast.sh                     pass     pass     pass     pass     same
net/forwarding:router_mpath_nh.sh                      fail     fail     fail     fail     same
net/forwarding:router_mpath_nh_res.sh                  fail     fail     fail     fail     same
net/forwarding:router_multicast.sh                     skip     skip     skip     skip     same
net/forwarding:router_multipath.sh                     fail     fail     fail     fail     same
net/forwarding:router_nh.sh                            pass     pass     pass     pass     same
net/forwarding:router_vid_1.sh                         pass     pass     pass     pass     same
net/forwarding:skbedit_priority.sh                     pass     pass     pass     pass     same
net/forwarding:tc_chains.sh                            pass     pass     pass     pass     same
net/forwarding:tc_flower.sh                            pass     pass     pass     pass     same
net/forwarding:tc_flower_router.sh                     pass     pass     pass     pass     same
net/forwarding:tc_mpls_l2vpn.sh                        pass     pass     pass     pass     same
net/forwarding:tc_shblocks.sh                          pass     pass     pass     pass     same
net/forwarding:tc_vlan_modify.sh                       pass     pass     pass     pass     same
net/forwarding:vxlan_asymmetric.sh                     pass     pass     pass     pass     same
net/forwarding:vxlan_asymmetric_ipv6.sh                pass     pass     pass     pass     same
net/forwarding:vxlan_bridge_1d.sh                      fail     fail     fail     fail     same
net/forwarding:vxlan_bridge_1d_port_8472.sh            pass     pass     pass     pass     same
net/forwarding:vxlan_bridge_1d_port_8472_ipv6.sh       fail     fail     fail     fail     same
net/forwarding:vxlan_bridge_1q.sh                      fail     fail     fail     fail     same
net/forwarding:vxlan_bridge_1q_ipv6.sh                 fail     fail     fail     fail     same
net/forwarding:vxlan_bridge_1q_port_8472.sh            pass     pass     pass     pass     same
net/forwarding:vxlan_bridge_1q_port_8472_ipv6.sh       fail     fail     fail     fail     same
net/forwarding:vxlan_symmetric.sh                      pass     pass     pass     pass     same
net/forwarding:vxlan_symmetric_ipv6.sh                 pass     pass     pass     pass     same
net/mptcp:diag.sh                                      pass     pass     pass     pass     same
net/mptcp:mptcp_connect.sh                             pass     pass     pass     pass     same
net/mptcp:mptcp_sockopt.sh                             pass     pass     pass     pass     same
net/mptcp:pm_netlink.sh                                pass     pass     pass     pass     same
net:altnames.sh                                        pass     pass     pass     pass     same
net:bareudp.sh                                         pass     pass     pass     pass     same
net:cmsg_so_mark.sh                                    pass     pass     pass     pass     same
net:devlink_port_split.py                              pass     pass     pass     pass     same
net:drop_monitor_tests.sh                              skip     skip     skip     skip     same
net:fcnal-test.sh                                      skip     skip     skip     skip     same
net:fib-onlink-tests.sh                                pass     pass     pass     pass     same
net:fib_nexthop_multiprefix.sh                         pass     pass     pass     pass     same
net:fib_rule_tests.sh                                  pass     pass     pass     pass     same
net:fib_tests.sh                                       fail     fail     fail     fail     same
net:fin_ack_lat.sh                                     pass     pass     pass     pass     same
net:gre_gso.sh                                         skip     skip     skip     skip     same
net:icmp.sh                                            fail     fail     fail     fail     same
net:icmp_redirect.sh                                   pass     pass     pass     pass     same
net:ip6_gre_headroom.sh                                pass     pass     pass     pass     same
net:ipv6_flowlabel.sh                                  pass     pass     pass     pass     same
net:l2tp.sh                                            pass     pass     pass     pass     same
net:msg_zerocopy.sh                                    pass     pass     pass     pass     same
net:netdevice.sh                                       pass     pass     pass     pass     same
net:pmtu.sh                                            pass     pass     pass     pass     same
net:psock_snd.sh                                       pass     pass     pass     pass     same
net:reuseaddr_conflict                                 pass     pass     pass     pass     same
net:reuseaddr_ports_exhausted.sh                       pass     pass     pass     pass     same
net:reuseport_bpf                                      pass     pass     pass     pass     same
net:reuseport_bpf_cpu                                  pass     pass     pass     pass     same
net:reuseport_bpf_numa                                 pass     pass     pass     pass     same
net:reuseport_dualstack                                pass     pass     pass     pass     same
net:route_localnet.sh                                  pass     pass     pass     pass     same
net:rps_default_mask.sh                                fail     fail     fail     fail     same
net:rtnetlink.sh                                       skip     skip     skip     skip     same
net:run_afpackettests                                  pass     pass     pass     pass     same
net:run_netsocktests                                   pass     pass     pass     pass     same
net:rxtimestamp.sh                                     pass     pass     pass     pass     same
net:so_txtime.sh                                       pass     pass     pass     pass     same
net:stress_reuseport_listen.sh                         pass     pass     pass     pass     same
net:tcp_fastopen_backup_key.sh                         pass     pass     pass     pass     same
net:test_blackhole_dev.sh                              fail     fail     fail     fail     same
net:test_bpf.sh                                        pass     pass     pass     pass     same
net:test_vxlan_fdb_changelink.sh                       pass     pass     pass     pass     same
net:test_vxlan_under_vrf.sh                            pass     pass     pass     pass     same
net:tls                                                pass     pass     pass     pass     same
net:traceroute.sh                                      pass     pass     pass     pass     same
net:udpgro.sh                                          fail     fail     fail     fail     same
net:udpgro_bench.sh                                    fail     fail     fail     fail     same
net:udpgso.sh                                          pass     pass     pass     pass     same
net:unicast_extensions.sh                              pass     pass     pass     pass     same
net:veth.sh                                            fail     fail     fail     fail     same
net:vrf-xfrm-tests.sh                                  pass     pass     pass     pass     same
net:vrf_route_leaking.sh                               fail     fail     fail     fail     same
net:vrf_strict_mode_test.sh                            pass     pass     pass     pass     same
netfilter:bridge_brouter.sh                            skip     skip     skip     skip     same
netfilter:conntrack_icmp_related.sh                    fail     fail     fail     fail     same
netfilter:conntrack_tcp_unreplied.sh                   fail     fail     fail     fail     same
netfilter:conntrack_vrf.sh                             skip     skip     skip     skip     same
netfilter:ipip-conntrack-mtu.sh                        skip     skip     skip     skip     same
netfilter:ipvs.sh                                      skip     skip     skip     skip     same
netfilter:nf_nat_edemux.sh                             skip     skip     skip     skip     same
netfilter:nft_concat_range.sh                          fail     fail     fail     fail     same
netfilter:nft_conntrack_helper.sh                      skip     skip     skip     skip     same
netfilter:nft_fib.sh                                   skip     skip     skip     skip     same
netfilter:nft_flowtable.sh                             fail     fail     fail     fail     same
netfilter:nft_meta.sh                                  pass     pass     pass     pass     same
netfilter:nft_nat.sh                                   skip     skip     skip     skip     same
netfilter:nft_queue.sh                                 skip     skip     skip     skip     same
netfilter:rpath.sh                                     pass     pass     pass     pass     same
nsfs:owner                                             pass     pass     pass     pass     same
nsfs:pidns                                             pass     pass     pass     pass     same
openat2:openat2_test                                   fail     fail     fail     fail     same
openat2:rename_attack_test                             pass     pass     pass     pass     same
openat2:resolve_test                                   fail     fail     fail     fail     same
pid_namespace:regression_enomem                        pass     pass     pass     pass     same
pidfd:pidfd_fdinfo_test                                pass     pass     pass     pass     same
pidfd:pidfd_getfd_test                                 pass     pass     pass     pass     same
pidfd:pidfd_open_test                                  pass     pass     pass     pass     same
pidfd:pidfd_poll_test                                  pass     pass     pass     pass     same
pidfd:pidfd_setns_test                                 pass     pass     pass     pass     same
pidfd:pidfd_test                                       pass     pass     pass     pass     same
pidfd:pidfd_wait                                       pass     pass     pass     pass     same
proc:fd-001-lookup                                     pass     pass     pass     pass     same
proc:fd-002-posix-eq                                   pass     pass     pass     pass     same
proc:fd-003-kthread                                    pass     pass     pass     pass     same
proc:proc-fsconfig-hidepid                             pass     pass     pass     pass     same
proc:proc-loadavg-001                                  pass     pass     pass     pass     same
proc:proc-multiple-procfs                              pass     pass     pass     pass     same
proc:proc-self-map-files-001                           pass     pass     pass     pass     same
proc:proc-self-map-files-002                           pass     pass     pass     pass     same
proc:proc-self-syscall                                 pass     pass     pass     pass     same
proc:proc-self-wchan                                   pass     pass     pass     pass     same
proc:proc-subset-pid                                   pass     pass     pass     pass     same
proc:proc-uptime-002                                   pass     pass     pass     pass     same
proc:read                                              pass     pass     pass     pass     same
proc:self                                              pass     pass     pass     pass     same
proc:setns-dcache                                      pass     pass     pass     pass     same
proc:setns-sysvipc                                     pass     pass     pass     pass     same
proc:thread-self                                       pass     pass     pass     pass     same
pstore:pstore_post_reboot_tests                        skip     skip     skip     skip     same
pstore:pstore_tests                                    fail     fail     fail     fail     same
ptrace:get_syscall_info                                pass     pass     pass     pass     same
ptrace:peeksiginfo                                     pass     pass     pass     pass     same
ptrace:vmaccess                                        fail     fail     fail     fail     same
rlimits:rlimits-per-userns                             pass     pass     pass     pass     same
rseq:basic_percpu_ops_test                             pass     pass     pass     pass     same
rseq:basic_test                                        pass     pass     pass     pass     same
rseq:param_test                                        pass     pass     pass     pass     same
rseq:param_test_benchmark                              pass     pass     pass     pass     same
rseq:param_test_compare_twice                          pass     pass     pass     pass     same
rseq:run_param_test.sh                                 pass     pass     pass     pass     same
seccomp:seccomp_benchmark                              pass     pass     pass     pass     same
seccomp:seccomp_bpf                                    pass     pass     pass     pass     same
sgx:test_sgx                                           fail     fail     fail     fail     same
sigaltstack:sas                                        pass     pass     pass     pass     same
size:get_size                                          pass     pass     pass     pass     same
splice:default_file_splice_read.sh                     pass     pass     pass     pass     same
splice:short_splice_read.sh                            fail     fail     fail     fail     same
static_keys:test_static_keys.sh                        skip     skip     skip     skip     same
syscall_user_dispatch:sud_benchmark                    pass     pass     pass     pass     same
syscall_user_dispatch:sud_test                         pass     pass     pass     pass     same
tc-testing:tdc.sh                                      fail     fail     fail     fail     same
tdx:tdx_guest_test                                     fail     fail     fail     fail     same
timens:clock_nanosleep                                 pass     pass     pass     pass     same
timens:exec                                            pass     pass     pass     pass     same
timens:futex                                           pass     pass     pass     pass     same
timens:procfs                                          pass     pass     pass     pass     same
timens:timens                                          pass     pass     pass     pass     same
timens:timer                                           pass     pass     pass     pass     same
timens:timerfd                                         pass     pass     pass     pass     same
timens:vfork_exec                                      pass     pass     pass     pass     same
timers:inconsistency-check                             pass     pass     pass     pass     same
timers:mqueue-lat                                      pass     pass     pass     pass     same
timers:nanosleep                                       pass     pass     pass     pass     same
timers:nsleep-lat                                      pass     pass     pass     pass     same
timers:posix_timers                                    pass     pass     pass     pass     same
timers:rtcpie                                          pass     pass     pass     pass     same
timers:set-timer-lat                                   pass     pass     pass     pass     same
timers:threadtest                                      pass     pass     pass     pass     same
tmpfs:bug-link-o-tmpfile                               pass     pass     pass     pass     same
tpm2:test_smoke.sh                                     skip     skip     skip     skip     same
tpm2:test_space.sh                                     skip     skip     skip     skip     same
vDSO:vdso_standalone_test_x86                          pass     pass     pass     pass     same
vDSO:vdso_test_abi                                     pass     pass     pass     pass     same
vDSO:vdso_test_clock_getres                            pass     pass     pass     pass     same
vDSO:vdso_test_correctness                             pass     pass     pass     pass     same
vDSO:vdso_test_getcpu                                  pass     pass     pass     pass     same
vDSO:vdso_test_gettimeofday                            pass     pass     pass     pass     same
vm:run_vmtests.sh                                      skip     skip     skip     skip     same
x86:amx_64                                             fail     fail     fail     fail     same
x86:check_initial_reg_state_64                         pass     pass     pass     pass     same
x86:corrupt_xstate_header_64                           pass     pass     pass     pass     same
x86:fsgsbase_64                                        pass     pass     pass     pass     same
x86:fsgsbase_restore_64                                pass     pass     pass     pass     same
x86:ioperm_64                                          pass     pass     pass     pass     same
x86:iopl_64                                            pass     pass     pass     pass     same
x86:mov_ss_trap_64                                     pass     pass     pass     pass     same
x86:sigaltstack_64                                     pass     pass     pass     pass     same
x86:sigreturn_64                                       pass     pass     pass     pass     same
x86:single_step_syscall_64                             pass     pass     pass     pass     same
x86:syscall_arg_fault_64                               pass     pass     pass     pass     same
x86:syscall_nt_64                                      pass     pass     pass     pass     same
x86:syscall_numbering_64                               pass     pass     pass     pass     same
x86:sysret_rip_64                                      pass     pass     pass     pass     same
x86:sysret_ss_attrs_64                                 pass     pass     pass     pass     same
x86:test_mremap_vdso_64                                pass     pass     pass     pass     same
x86:test_vsyscall_64                                   pass     pass     pass     pass     same
zram:zram.sh                                           pass     pass     pass     pass     same

Specific tests: passed

The cloud image was modified with the help of qemu-nbd to check whether kernel recognized the new boot argument ia32_emulation:

boot-test-ia32_emulation=0.log

The key boot log fragment:

…
[    0.040229] Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-ciqlts9_2-CVE-batch-7 root=UUID=22de856b-8099-4e62-aca2-16fedf13a779 ro console=ttyS0,115200n8 no_timer_check net.ifnames=0 ia32_emulation=0 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M
[    0.040315] Unknown kernel command line parameters "BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-ciqlts9_2-CVE-batch-7", will be passed to user space.
…

Compare with the clearly unsupported boot argument ia32_emulationxx:

boot-test-ia32_emulationxx=0.log

…
[    0.039585] Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-ciqlts9_2-CVE-batch-7 root=UUID=22de856b-8099-4e62-aca2-16fedf13a779 ro console=ttyS0,115200n8 no_timer_check net.ifnames=0 ia32_emulationxx=0 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M
[    0.039674] Unknown kernel command line parameters "BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-ciqlts9_2-CVE-batch-7 ia32_emulationxx=0", will be passed to user space.
…

This proves that the patched kernel properly recognizes the new parameter ia32_emulation.

The functional tests were not carried out due to the lack appropriate testing infrastructure (this would need to be tested on a bare Intel or AMD machine with the appropriate TEE support).

Footnotes

1 https://nvd.nist.gov/vuln/detail/CVE-2024-25742

an untrusted hypervisor can inject virtual interrupt 29 (#VC) at any point in time and can trigger its handler

2 https://nvd.nist.gov/vuln/detail/CVE-2024-25743

an untrusted hypervisor can inject virtual interrupts 0 and 14 at any point in time

3 https://nvd.nist.gov/vuln/detail/CVE-2024-25744

an untrusted VMM can trigger int80 syscall handling at any given point

4 https://ahoi-attacks.github.io/wesee/

WeSee is tracked under one CVE: CVE-2024-25742

5 https://ahoi-attacks.github.io/heckler/

Heckler is tracked under 2 CVEs: CVE-2024-25744 and CVE-2024-25743

6 https://arxiv.org/html/2404.03526v1

Interrupt number 20 corresponds to the Virtualization Exception (#VE) on TDX. The handler is similar to AMD’s #VC implementation. In theory, #VE is also vulnerable to WeSee attack—Linux handler does not decode to check if the VM indeed raised a #VE. However, we were unable to exploit the interface for two reasons. Intel TDX prohibits the injection of interrupt number 20 into the guest. Thus we cannot trigger the handler. Secondly, the hypercall used to obtain the register state is served by the trusted TD-module and the untrusted host has no direct way of controlling the arguments. On ARM CCA we were not able to identify a handler with a similar functionality. Thus we conclude that WeSee does not apply to Intel TDX and ARM CCA.

7 https://ahoi-attacks.github.io/heckler/

TDX is not vulnerable to the attack from signals as the hardware blocks external injection of interrupts between 0-30.

8 https://ahoi-attacks.github.io/heckler/

For Intel TDX, there are patches to the Linux kernel that check if int 0x80 is externally injected

9 https://ahoi-attacks.github.io/wesee/

All SEV-SNP processors are vulnerable to WeSee. There is a hotfix in the Linux kernel that mitigates our case study attacks.

10 https://ahoi-attacks.github.io/heckler/

Currently, there is no fix to protect against Heckler’s signal attacks.

11 https://ahoi-attacks.github.io/heckler/

For AMD SEV-SNP, turn off x86 emulation in the Linux kernel which will prevent Heckler from using the effects of the int 0x80 handler

12 https://www.intel.com/content/www/us/en/security-center/announcement/intel-security-announcement-2024-04-08-001.html

Intel is aware of the Ahoi attacks that include “WeSee” and “Heckler”. Intel® Trust Domain Extensions (Intel® TDX) is not affected by WeSee and Heckler has already been addressed through an available Linux Kernel update.

pvts-mat and others added 13 commits October 3, 2025 21:45
jira VULN-772
cve-pre CVE-2024-25744
commit-author Lukas Bulwahn <[email protected]>
commit 6bf8a55

Fix misspelled Kconfig symbols as detected by
scripts/checkkconfigsymbols.py.

 [ bp: Combine into a single patch. ]

	Signed-off-by: Lukas Bulwahn <[email protected]>
	Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
(cherry picked from commit 6bf8a55)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve-pre CVE-2024-25744
commit-author Nikolay Borisov <[email protected]>
commit 1da5c9b

IA32 support on 64bit kernels depends on whether CONFIG_IA32_EMULATION
is selected or not. As it is a compile time option it doesn't
provide the flexibility to have distributions set their own policy for
IA32 support and give the user the flexibility to override it.

As a first step introduce ia32_enabled() which abstracts whether IA32
compat is turned on or off. Upcoming patches will implement
the ability to set IA32 compat state at boot time.

	Signed-off-by: Nikolay Borisov <[email protected]>
	Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

(cherry picked from commit 1da5c9b)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve-pre CVE-2024-25744
commit-author Nikolay Borisov <[email protected]>
commit f71e1d2

The SYSCALL instruction cannot really be disabled in compatibility mode.
The best that can be done is to configure the CSTAR msr to point to a
minimal handler. Currently this handler has a rather misleading name -
ignore_sysret() as it's not really doing anything with sysret.

Give it a more descriptive name.

	Signed-off-by: Nikolay Borisov <[email protected]>
	Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

(cherry picked from commit f71e1d2)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve-pre CVE-2024-25744
commit-author Nikolay Borisov <[email protected]>
commit 370dcd5

To limit the IA32 exposure on 64bit kernels while keeping the
flexibility for the user to enable it when required, the compile time
enable/disable via CONFIG_IA32_EMULATION is not good enough and will
be complemented with a kernel command line option.

Right now entry_SYSCALL32_ignore() is only compiled when
CONFIG_IA32_EMULATION=n, but boot-time enable- / disablement obviously
requires it to be unconditionally available.

Remove the #ifndef CONFIG_IA32_EMULATION guard.

	Signed-off-by: Nikolay Borisov <[email protected]>
	Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

(cherry picked from commit 370dcd5)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve-pre CVE-2024-25744
commit-author Nikolay Borisov <[email protected]>
commit 6138228
upstream-diff Upstream code between the #ifdef / #else / #endif in
  `arch/x86/kernel/cpu/common.c' differs slightly from `ciqlts9_2'
  (`wrmsrl_cstar' function used instead of `wrmsrl'). Applied the same
  logic of #ifdef / #else -> if / else conversion to the existing
  codebase.

Another major aspect of supporting running of 32bit processes is the
ability to access 32bit syscalls. Such syscalls can be invoked by
using the legacy int 0x80 handler and  sysenter/syscall instructions.

If IA32 emulation is disabled ensure that each of those 3 distinct
mechanisms are also disabled. For int 0x80 a #GP exception would be
generated since the respective descriptor is not going to be loaded at
all. Invoking sysenter will also result in a #GP since IA32_SYSENTER_CS
contains an invalid segment. Finally, syscall instruction cannot really
be disabled so it's configured to execute a minimal handler.

	Signed-off-by: Nikolay Borisov <[email protected]>
	Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

(cherry picked from commit 6138228)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve-pre CVE-2024-25744
commit-author Nikolay Borisov <[email protected]>
commit a11e097

Distributions would like to reduce their attack surface as much as
possible but at the same time they'd want to retain flexibility to cater
to a variety of legacy software. This stems from the conjecture that
compat layer is likely rarely tested and could have latent security
bugs. Ideally distributions will set their default policy and also
give users the ability to override it as appropriate.

To enable this use case, introduce CONFIG_IA32_EMULATION_DEFAULT_DISABLED
compile time option, which controls whether 32bit processes/syscalls
should be allowed or not. This option is aimed mainly at distributions
to set their preferred default behavior in their kernels.

To allow users to override the distro's policy, introduce the 'ia32_emulation'
parameter which allows overriding CONFIG_IA32_EMULATION_DEFAULT_DISABLED
state at boot time.

	Signed-off-by: Nikolay Borisov <[email protected]>
	Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

(cherry picked from commit a11e097)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve-pre CVE-2024-25744
commit-author Vitaly Kuznetsov <[email protected]>
commit d55f31e

ia32_emulation_override_cmdline() is an early_param() arg and these
are only needed at boot time. In fact, all other early_param() functions
in arch/x86 seem to have '__init' annotation and
ia32_emulation_override_cmdline() is the only exception.

Fixes: a11e097 ("x86: Make IA32_EMULATION boot time configurable")
	Signed-off-by: Vitaly Kuznetsov <[email protected]>
	Signed-off-by: Dave Hansen <[email protected]>
	Signed-off-by: Ingo Molnar <[email protected]>
	Reviewed-by: Nikolay Borisov <[email protected]>
Link: https://lore.kernel.org/all/20241210151650.1746022-1-vkuznets%40redhat.com
(cherry picked from commit d55f31e)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve CVE-2024-25744
commit-author Kirill A. Shutemov <[email protected]>
commit b82a8db

The INT 0x80 instruction is used for 32-bit x86 Linux syscalls. The
kernel expects to receive a software interrupt as a result of the INT
0x80 instruction. However, an external interrupt on the same vector
triggers the same handler.

The kernel interprets an external interrupt on vector 0x80 as a 32-bit
system call that came from userspace.

A VMM can inject external interrupts on any arbitrary vector at any
time.  This remains true even for TDX and SEV guests where the VMM is
untrusted.

Put together, this allows an untrusted VMM to trigger int80 syscall
handling at any given point. The content of the guest register file at
that moment defines what syscall is triggered and its arguments. It
opens the guest OS to manipulation from the VMM side.

Disable 32-bit emulation by default for TDX and SEV. User can override
it with the ia32_emulation=y command line option.

[ dhansen: reword the changelog ]

Reported-by: Supraja Sridhara <[email protected]>
Reported-by: Benedict Schlüter <[email protected]>
Reported-by: Mark Kuhne <[email protected]>
Reported-by: Andrin Bertschi <[email protected]>
Reported-by: Shweta Shinde <[email protected]>
Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Reviewed-by: Borislav Petkov (AMD) <[email protected]>
Cc: <[email protected]> # v6.0+: 1da5c9b x86: Introduce ia32_enabled()
Cc: <[email protected]> # v6.0+
jira VULN-772
cve CVE-2024-25744
commit-author Thomas Gleixner <[email protected]>
commit be5341e

There is no real reason to have a separate ASM entry point implementation
for the legacy INT 0x80 syscall emulation on 64-bit.

IDTENTRY provides all the functionality needed with the only difference
that it does not:

  - save the syscall number (AX) into pt_regs::orig_ax
  - set pt_regs::ax to -ENOSYS

Both can be done safely in the C code of an IDTENTRY before invoking any of
the syscall related functions which depend on this convention.

Aside of ASM code reduction this prepares for detecting and handling a
local APIC injected vector 0x80.

[ kirill.shutemov: More verbose comments ]
	Suggested-by: Linus Torvalds <[email protected]>
	Signed-off-by: Thomas Gleixner <[email protected]>
	Signed-off-by: Kirill A. Shutemov <[email protected]>
	Signed-off-by: Dave Hansen <[email protected]>
	Reviewed-by: Borislav Petkov (AMD) <[email protected]>
	Cc: <[email protected]> # v6.0+
(cherry picked from commit be5341e)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve CVE-2024-25744
commit-author Thomas Gleixner <[email protected]>
commit 55617fb

The INT 0x80 instruction is used for 32-bit x86 Linux syscalls. The
kernel expects to receive a software interrupt as a result of the INT
0x80 instruction. However, an external interrupt on the same vector
also triggers the same codepath.

An external interrupt on vector 0x80 will currently be interpreted as a
32-bit system call, and assuming that it was a user context.

Panic on external interrupts on the vector.

To distinguish software interrupts from external ones, the kernel checks
the APIC ISR bit relevant to the 0x80 vector. For software interrupts,
this bit will be 0.

	Signed-off-by: Thomas Gleixner <[email protected]>
	Signed-off-by: Kirill A. Shutemov <[email protected]>
	Signed-off-by: Dave Hansen <[email protected]>
	Reviewed-by: Borislav Petkov (AMD) <[email protected]>
	Cc: <[email protected]> # v6.0+
(cherry picked from commit 55617fb)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-772
cve CVE-2024-25744
commit-author Kirill A. Shutemov <[email protected]>
commit f4116bf

32-bit emulation was disabled on TDX to prevent a possible attack by
a VMM injecting an interrupt on vector 0x80.

Now that int80_emulation() has a check for external interrupts the
limitation can be lifted.

To distinguish software interrupts from external ones, int80_emulation()
checks the APIC ISR bit relevant to the 0x80 vector. For
software interrupts, this bit will be 0.

On TDX, the VAPIC state (including ISR) is protected and cannot be
manipulated by the VMM. The ISR bit is set by the microcode flow during
the handling of posted interrupts.

[ dhansen: more changelog tweaks ]

	Signed-off-by: Kirill A. Shutemov <[email protected]>
	Signed-off-by: Dave Hansen <[email protected]>
	Reviewed-by: Thomas Gleixner <[email protected]>
	Reviewed-by: Borislav Petkov (AMD) <[email protected]>
	Cc: <[email protected]> # v6.0+
(cherry picked from commit f4116bf)
	Signed-off-by: Marcin Wcisło <[email protected]>
jira VULN-756
cve CVE-2024-25742
commit-author Borislav Petkov (AMD) <[email protected]>
commit e3ef461
upstream-diff Added `#else' case for the `#ifndef __BOOT_COMPRESSED'
  which was modified in upstream but not present in `ciqlts9_2'.

Compare the opcode bytes at rIP for each #VC exit reason to verify the
instruction which raised the #VC exception is actually the right one.

Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Acked-by: Tom Lendacky <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
jira VULN-756
cve-bf CVE-2024-25742
commit-author Tom Lendacky <[email protected]>
commit e70316d

The MWAITX and MONITORX instructions generate the same #VC error code as
the MWAIT and MONITOR instructions, respectively. Update the #VC handler
opcode checking to also support the MWAITX and MONITORX opcodes.

Fixes: e3ef461 ("x86/sev: Harden #VC instruction emulation somewhat")
	Signed-off-by: Tom Lendacky <[email protected]>
	Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/453d5a7cfb4b9fe818b6fb67f93ae25468bc9e23.1713793161.git.thomas.lendacky@amd.com
(cherry picked from commit e70316d)
	Signed-off-by: Marcin Wcisło <[email protected]>
@bmastbergen bmastbergen requested a review from a team October 10, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants