Vulnerability · Published Mar 27, 2025 · Assigned by Linux
CVE-2025-21872efi: Don't map the entire mokvar table to determine its size
Medium 5.5
In plain English
A medium-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 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: efi: Don't map the entire mokvar table to determine its size Currently, when validating the mokvar table, we (re)map the entire table on each iteration of the loop, adding space as we discover new entries. If the table grows over a certain size, this fails due to limitations of early_memmap(), and we get a failure and traceback: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at mm/early_ioremap.c:139 __early_ioremap+0xef/0x220 ... Call Trace: <TASK> ? __early_ioremap+0xef/0x220 ? __warn.cold+0x93/0xfa ? __early_ioremap+0xef/0x220 ? report_bug+0xff/0x140 ? early_fixup_exception+0x5d/0xb0 ? early_idt_handler_common+0x2f/0x3a ? __early_ioremap+0xef/0x220 ? efi_mokvar_table_init+0xce/0x1d0 ? setup_arch+0x864/0xc10 ? start_kernel+0x6b/0xa10 ? x86_64_start_reservations+0x24/0x30 ? x86_64_start_kernel+0xed/0xf0 ? common_startup_64+0x13e/0x141 </TASK> ---[ end trace 0000000000000000 ]--- mokvar: Failed to map EFI MOKvar config table pa=0x7c4c3000, size=265187. Mapping the entire structure isn't actually necessary, as we don't ever need more than one entry header mapped at once. Changes efi_mokvar_table_init() to only map each entry header, not the entire table, when determining the table size. Since we're not mapping any data past the variable name, it also changes the code to enforce that each variable name is NUL terminated, rather than attempting to verify it in place.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | no fix listed | DEBIAN-CVE-2025-21872 |
| Debian:13 | linux | 6.12.19-1 | DEBIAN-CVE-2025-21872 |
| Debian:14 | linux | 6.12.19-1 | DEBIAN-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux | 6.8.0-84.84 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux | 6.8.0-84.84 | USN-7764-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1039.41 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1039.41 | USN-7764-1 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1039.41~22.04.1 | USN-7766-1 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1039.41~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1038.44 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1038.44 | USN-7802-1 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1036.42~22.04.1 | USN-7802-1 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1036.42~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1025.27 | USN-7809-1 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1025.27 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1040.42 | USN-7764-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1040.42 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1040.42~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1040.42~22.04.1 | USN-7766-1 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1036.40 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1036.40 | USN-7764-1 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1023.25 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1023.25 | USN-7764-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-26.26~24.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-85.85~22.04.1 | USN-7801-1 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-84.84~22.04.1 | USN-7764-2 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-85.85~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1037.37 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1037.37 | USN-7779-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1037.37~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1037.37~22.04.1 | USN-7779-1 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-84.84.1 | USN-7764-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-84.84.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1014.15~24.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-84.84.1~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-84.84.1~22.04.1 | USN-7764-1 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1039.42 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1039.42 | USN-7765-1 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1010.10 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1039.42~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1039.42~22.04.1 | USN-7765-1 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1039.42.1 | USN-7765-1 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1039.42.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1010.10 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1022.22 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1037.38 | USN-7801-2 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1037.38 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1037.38~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1037.38~22.04.1 | USN-7801-3 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1039.43 | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1039.43 | USN-7790-1 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-84.84~22.04.1 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-21872 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1018.19 | UBUNTU-CVE-2025-21872 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2025-21872 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 58c909022a5a56cd1d9e89c8c5461fd1f6a27bb5 – before 46c0454ffb78ce9d3355a3cccac86383ea8ddd5558c909022a5a56cd1d9e89c8c5461fd1f6a27bb5 – before f17a72ac7dd6f9469c9e6185bdbb22dbb744dd7458c909022a5a56cd1d9e89c8c5461fd1f6a27bb5 – before ea3f0b362dfe4ef885ef812bfaf4088176422c9158c909022a5a56cd1d9e89c8c5461fd1f6a27bb5 – before 65f4aebb8127708ba668dd938e83b8558abfc5cd58c909022a5a56cd1d9e89c8c5461fd1f6a27bb5 – before 97bd560b6cc4c26386a53b4881bf03e96f9ba03a58c909022a5a56cd1d9e89c8c5461fd1f6a27bb5 – before 2b90e7ace79774a3540ce569e000388f8d22c9e0 |
| Linux | Linux | 5.10 |
References
- https://git.kernel.org/stable/c/46c0454ffb78ce9d3355a3cccac86383ea8ddd55
- https://git.kernel.org/stable/c/f17a72ac7dd6f9469c9e6185bdbb22dbb744dd74
- https://git.kernel.org/stable/c/ea3f0b362dfe4ef885ef812bfaf4088176422c91
- https://git.kernel.org/stable/c/65f4aebb8127708ba668dd938e83b8558abfc5cd
- https://git.kernel.org/stable/c/97bd560b6cc4c26386a53b4881bf03e96f9ba03a
- https://git.kernel.org/stable/c/2b90e7ace79774a3540ce569e000388f8d22c9e0
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html