Vulnerability · Published Feb 27, 2025 · Assigned by Linux
CVE-2024-57982xfrm: state: fix out-of-bounds read during lookup
High 7.8
In plain English
A high-severity out-of-bounds read 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.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: xfrm: state: fix out-of-bounds read during lookup lookup and resize can run in parallel. The xfrm_state_hash_generation seqlock ensures a retry, but the hash functions can observe a hmask value that is too large for the new hlist array. rehash does: rcu_assign_pointer(net->xfrm.state_bydst, ndst) [..] net->xfrm.state_hmask = nhashmask; While state lookup does: h = xfrm_dst_hash(net, daddr, saddr, tmpl->reqid, encap_family); hlist_for_each_entry_rcu(x, net->xfrm.state_bydst + h, bydst) { This is only safe in case the update to state_bydst is larger than net->xfrm.xfrm_state_hmask (or if the lookup function gets serialized via state spinlock again). Fix this by prefetching state_hmask and the associated pointers. The xfrm_state_hash_generation seqlock retry will ensure that the pointer and the hmask will be consistent. The existing helpers, like xfrm_dst_hash(), are now unsafe for RCU side, add lockdep assertions to document that they are only safe for insert side. xfrm_state_lookup_byaddr() uses the spinlock rather than RCU. AFAICS this is an oversight from back when state lookup was converted to RCU, this lock should be replaced with RCU in a future patch.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | no fix listed | DEBIAN-CVE-2024-57982 |
| Debian:13 | linux | 6.12.13-1 | DEBIAN-CVE-2024-57982 |
| Debian:14 | linux | 6.12.13-1 | DEBIAN-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux | 5.15.0-202.212 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-64.67 | USN-7651-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-64.67 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1119.126 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1119.126 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1032.34 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1032.34 | USN-7651-1 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1032.34~22.04.1 | USN-7651-3 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1032.34~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1125.134 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1125.134 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1034.39 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1034.39 | USN-7737-1 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1015.15~24.04.1 | USN-7521-1 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1034.39~22.04.1 | USN-7737-1 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1034.39~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1124.133 | USN-8962-1 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1124.133 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1022.23 | USN-7737-1 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1022.23 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1120.130 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1120.130 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1033.35 | USN-7651-4 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1033.35 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1015.15~24.04.1 | USN-7521-1 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1033.35~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1033.35~22.04.1 | USN-7651-4 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1115.121 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1115.121 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1028.32 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1028.32 | USN-7651-3 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1102.110 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1102.110 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1015.17 | USN-7651-3 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1015.17 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-26.26~24.04.1 | USN-7521-1 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-26.26~24.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | USN-7653-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1113.117 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1113.117 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1029.29 | USN-7651-2 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1029.29 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1029.29~22.04.1 | USN-7651-2 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1029.29~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1114.120 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1114.120 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1111.116 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1111.116 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-197.207 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-197.207 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-64.67.1 | USN-7651-2 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-64.67.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1014.15~24.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1014.15~24.04.1 | USN-7521-3 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-64.67.1~22.04.1 | USN-7651-2 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-64.67.1~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1114.115 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1114.115 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1031.34 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1031.34 | USN-7651-3 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1010.10 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1031.34~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1031.34~22.04.1 | USN-7651-3 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1031.34.1 | USN-7651-3 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1031.34.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1070.72 | USN-8963-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1070.72 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1059.59 | USN-8963-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1059.59 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1022.22 | USN-7521-1 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1022.22 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1031.31 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1031.31 | USN-7651-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1116.122 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1116.122 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1029.30 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1029.30 | USN-7651-3 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1029.30~22.04.1 | USN-7651-3 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1029.30~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1031.35 | USN-7651-6 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1031.35 | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-64.67~22.04.1 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-57982 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-57982 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2024-57982 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | c2f672fc94642bae96821a393f342edcfa9794a6 – before 80610185e9dd2ef7c0a4818a47390a8655b3dc27c2f672fc94642bae96821a393f342edcfa9794a6 – before b86dc510308d7a8955f3f47a4fea4bef887653e4c2f672fc94642bae96821a393f342edcfa9794a6 – before a16871c7832ea6435abb6e0b58289ae7dcb7e4fcc2f672fc94642bae96821a393f342edcfa9794a6 – before dd4c2a174994238d55ab54da2545543d36f4e0d0c2f672fc94642bae96821a393f342edcfa9794a6 – before e952837f3ddb0ff726d5b582aa1aad9aa38d024d |
| Linux | Linux | 4.9 |
Weakness: CWE-125 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/80610185e9dd2ef7c0a4818a47390a8655b3dc27
- https://git.kernel.org/stable/c/b86dc510308d7a8955f3f47a4fea4bef887653e4
- https://git.kernel.org/stable/c/a16871c7832ea6435abb6e0b58289ae7dcb7e4fc
- https://git.kernel.org/stable/c/dd4c2a174994238d55ab54da2545543d36f4e0d0
- https://git.kernel.org/stable/c/e952837f3ddb0ff726d5b582aa1aad9aa38d024d