🛡️ CVE-2024-57982 — kernel

🟠 CVSS 7.8 — High ✅ No Known Exploit NVD
7.8
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

xfrm: state: fix out-of-bounds read during lookup

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.

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.

Affected software

CVE-2024-57982 is recorded against 2 packages.

  • kernel (from 6.13.0 up to 6.13.2)
  • linux-kernel (from 6.13 up to 6.13.2)

Timeline and source

Published on 27 February 2025 and last revised on 6 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
github.com (Advisory)
nvd.nist.gov (Advisory)
git.kernel.org (Package)

CVE-2024-57982 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity High
CVSS Score 7.8
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2025-02-27
Updated 2026-08-12
Modified 2026-08-06

Affected Packages

Software From version Fixed in
kernel 6.13.0 6.13.2
linux-kernel 6.13 6.13.2

Similar Threats

Site Security Check

Is kernel part of your stack?

CVE-2024-57982 is rated CVSS 7.8 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.