Menu

Star on GitHub · 3.2k

CVE-2024-57982

7.8 · HIGH

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.

Published Feb 27, 2025CWE-125EPSS 0.26%

Overview

CVE-2024-57982 is a high-severity vulnerability. It was published on February 27, 2025 and has a CVSS 3.1 base score of 7.8 (HIGH).

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical 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 as

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2024-57982?

CVE-2024-57982 is a high-severity vulnerability. It was published on February 27, 2025 and has a CVSS 3.1 base score of 7.8 (HIGH).

How severe is CVE-2024-57982?

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2024-57982?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2024-57982?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2024-57982 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related HIGH CVEs from 2024

View all