Executive Summary

Informations
Name CVE-2024-57982 First vendor Publication 2025-02-27
Vendor Cve Last vendor Modification 2025-03-07

Security-Database Scoring CVSS v3

Cvss vector : CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Overall CVSS Score 7.1
Base Score 7.1 Environmental Score 7.1
impact SubScore 5.2 Temporal Score 7.1
Exploitabality Sub Score 1.8
 
Attack Vector Local Attack Complexity Low
Privileges Required Low User Interaction None
Scope Unchanged Confidentiality Impact High
Integrity Impact None Availability Impact High
Calculate full CVSS 3.0 Vectors scores

Security-Database Scoring CVSS v2

Cvss vector :
Cvss Base Score N/A Attack Range N/A
Cvss Impact Score N/A Attack Complexity N/A
Cvss Expoit Score N/A Authentication N/A
Calculate full CVSS 2.0 Vectors scores

Detail

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.

Original Source

Url : http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-57982

CWE : Common Weakness Enumeration

% Id Name
100 % CWE-125 Out-of-bounds Read

CPE : Common Platform Enumeration

TypeDescriptionCount
Application 8
Os 3701

Sources (Detail)

https://git.kernel.org/stable/c/a16871c7832ea6435abb6e0b58289ae7dcb7e4fc
https://git.kernel.org/stable/c/dd4c2a174994238d55ab54da2545543d36f4e0d0
https://git.kernel.org/stable/c/e952837f3ddb0ff726d5b582aa1aad9aa38d024d
Source Url

Alert History

If you want to see full details history, please login or register.
0
1
2
3
4
5
6
7
8
9
Date Informations
2025-03-29 03:44:55
  • Multiple Updates
2025-03-28 13:48:08
  • Multiple Updates
2025-03-28 03:22:44
  • Multiple Updates
2025-03-25 03:28:40
  • Multiple Updates
2025-03-19 03:17:29
  • Multiple Updates
2025-03-18 03:30:28
  • Multiple Updates
2025-03-14 00:21:09
  • Multiple Updates
2025-03-13 21:21:04
  • Multiple Updates
2025-03-07 21:20:54
  • Multiple Updates
2025-02-27 09:20:32
  • First insertion