CyberSecBulletin
CVE-2024-57982NVD status: Modified

Linux: Out-of-bounds Read

CVE-2024-57982 is a high-severity out-of-bounds read vulnerability in Linux, with a CVSS 3.1 base score of 7.1 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 80610185e9dd2ef7c0a4818a47390a8655b3dc27, b86dc510308d7a8955f3f47a4fea4bef887653e4, a16871c7832ea6435abb6e0b58289ae7dcb7e4fc as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.26% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 80610185e9dd2ef7c0a4818a47390a8655b3dc27 or b86dc510308d7a8955f3f47a4fea4bef887653e4 or a16871c7832ea6435abb6e0b58289ae7dcb7e4fc or dd4c2a174994238d55ab54da2545543d36f4e0d0, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 6.12.13 or 6.13.2, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxc2f672fc94642bae96821a393f342edcfa9794a6 up to, but not including, 80610185e9dd2ef7c0a4818a47390a8655b3dc27; c2f672fc94642bae96821a393f342edcfa9794a6 up to, but not including, b86dc510308d7a8955f3f47a4fea4bef887653e4; c2f672fc94642bae96821a393f342edcfa9794a6 up to, but not including, a16871c7832ea6435abb6e0b58289ae7dcb7e4fc; c2f672fc94642bae96821a393f342edcfa9794a6 up to, but not including, dd4c2a174994238d55ab54da2545543d36f4e0d0; c2f672fc94642bae96821a393f342edcfa9794a6 up to, but not including, e952837f3ddb0ff726d5b582aa1aad9aa38d024d; 4.980610185e9dd2ef7c0a4818a47390a8655b3dc27, b86dc510308d7a8955f3f47a4fea4bef887653e4, a16871c7832ea6435abb6e0b58289ae7dcb7e4fc, dd4c2a174994238d55ab54da2545543d36f4e0d0, e952837f3ddb0ff726d5b582aa1aad9aa38d024d
LinuxLinux Kernel4.9 up to, but not including, 6.12.13; 6.13 up to, but not including, 6.13.26.12.13, 6.13.2

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
NoneNothing can be modified.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.17.1HighNVD
CVSS 3.17.1HighCISA (ADP)

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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Out-of-bounds Read

The product reads data past the end, or before the beginning, of the intended buffer.

How developers prevent this class of flaw

  • Use a language that provides appropriate memory abstractions.

More Out-of-bounds Read vulnerabilities (CWE-125)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Out-of-bounds Read vulnerabilities

Spotted an error? Tell us.