Vulnerability · Published Jun 18, 2025 · Assigned by Linux
CVE-2025-38060bpf: copy_verifier_state() should copy 'loop_entry' field
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: copy_verifier_state() should copy 'loop_entry' field The bpf_verifier_state.loop_entry state should be copied by copy_verifier_state(). Otherwise, .loop_entry values from unrelated states would poison env->cur_state. Additionally, env->stack should not contain any states with .loop_entry != NULL. The states in env->stack are yet to be verified, while .loop_entry is set for states that reached an equivalent state. This means that env->cur_state->loop_entry should always be NULL after pop_stack(). See the selftest in the next commit for an example of the program that is not safe yet is accepted by verifier w/o this fix. This change has some verification performance impact for selftests: File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ---------------------------------- ---------------------------- --------- --------- -------------- ---------- ---------- ------------- arena_htab.bpf.o arena_htab_llvm 717 426 -291 (-40.59%) 57 37 -20 (-35.09%) arena_htab_asm.bpf.o arena_htab_asm 597 445 -152 (-25.46%) 47 37 -10 (-21.28%) arena_list.bpf.o arena_list_del 309 279 -30 (-9.71%) 23 14 -9 (-39.13%) iters.bpf.o iter_subprog_check_stacksafe 155 141 -14 (-9.03%) 15 14 -1 (-6.67%) iters.bpf.o iter_subprog_iters 1094 1003 -91 (-8.32%) 88 83 -5 (-5.68%) iters.bpf.o loop_state_deps2 479 725 +246 (+51.36%) 46 63 +17 (+36.96%) kmem_cache_iter.bpf.o open_coded_iter 63 59 -4 (-6.35%) 7 6 -1 (-14.29%) verifier_bits_iter.bpf.o max_words 92 84 -8 (-8.70%) 8 7 -1 (-12.50%) verifier_iterating_callbacks.bpf.o cond_break2 113 107 -6 (-5.31%) 12 12 +0 (+0.00%) And significant negative impact for sched_ext: File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ----------------- ---------------------- --------- --------- -------------------- ---------- ---------- ------------------ bpf.bpf.o lavd_init 7039 14723 +7684 (+109.16%) 490 1139 +649 (+132.45%) bpf.bpf.o layered_dispatch 11485 10548 -937 (-8.16%) 848 762 -86 (-10.14%) bpf.bpf.o layered_dump 7422 1000001 +992579 (+13373.47%) 681 31178 +30497 (+4478.27%) bpf.bpf.o layered_enqueue 16854 71127 +54273 (+322.02%) 1611 6450 +4839 (+300.37%) bpf.bpf.o p2dq_dispatch 665 791 +126 (+18.95%) 68 78 +10 (+14.71%) bpf.bpf.o p2dq_init 2343 2980 +637 (+27.19%) 201 237 +36 (+17.91%) bpf.bpf.o refresh_layer_cpumasks 16487 674760 +658273 (+3992.68%) 1770 65370 +63600 (+3593.22%) bpf.bpf.o rusty_select_cpu 1937 40872 +38935 (+2010.07%) 177 3210 +3033 (+1713.56%) scx_central.bpf.o central_dispatch 636 2687 +2051 (+322.48%) 63 227 +164 (+260.32%) scx_nest.bpf.o nest_init 636 815 +179 (+28.14%) 60 73 +13 (+21.67%) scx_qmap.bpf.o qmap_dispatch ---truncated---
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | linux | 6.12.32-1 | DEBIAN-CVE-2025-38060 |
| Debian:14 | linux | 6.12.32-1 | DEBIAN-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux | 6.8.0-100.100 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1046.49 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | 6.14.0-1013.13~24.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | 6.14.0-1013.13~24.04.1 | USN-7769-3 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1046.49~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1046.52 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1051.57~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1046.53 | UBUNTU-CVE-2025-38060 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1046.53~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | 6.14.0-1007.7 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1047.50 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | 6.14.0-1016.17~24.04.1 | USN-7769-1 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | 6.14.0-1016.17~24.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1047.50~22.04.2 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1043.48 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1030.33 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | 6.14.0-32.32~24.04.1 | USN-7769-3 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-100.100~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1044.44 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1044.44~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-100.100.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-100.100.1~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1046.49 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1046.49~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1046.49.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1020.20 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | 6.14.0-1012.12 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | 6.14.0-1012.12 | USN-7771-1 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1043.44 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | 6.14.0-1013.13~24.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | 6.14.0-1013.13~24.04.1 | USN-7789-1 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1043.44~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1047.51 | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | 6.14.0-32.32.1~24.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-100.100~22.04.1 | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-38060 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1023.24 | UBUNTU-CVE-2025-38060 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | c8f6d285825f61d619c4c2509bfd75eb366db900 – before b7867e55cbcbaed8498b6b96855371eb9afebdc72a0992829ea3864939d917a5c7b48be6629c6217 – before 46ba5757a7a4714e7d3f68cfe118208822cb3d782a0992829ea3864939d917a5c7b48be6629c6217 – before 8b4afd89fa75f738a80ca849126fd3cad77bcbf12a0992829ea3864939d917a5c7b48be6629c6217 – before bbbc02b7445ebfda13e4847f4f1413c6480a85a96.6.15 – before 6.6.160 |
| Linux | Linux | 6.7 |