CyberSecBulletin
CVE-2024-38587NVD status: Modified

Linux: Improper Validation of Array Index

CVE-2024-38587 is a high-severity improper validation of array index vulnerability in Linux, with a CVSS 3.1 base score of 7.8 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 42f0a3f67158ed6b2908d2b9ffbf7e96d23fd358, cd7f3978c2ec741aedd1d860b2adb227314cf996, 07ef95cc7a579731198c93beed281e3a79a0e586 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.79% chance of exploitation within 30 days, higher than 57% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 42f0a3f67158ed6b2908d2b9ffbf7e96d23fd358 or cd7f3978c2ec741aedd1d860b2adb227314cf996 or 07ef95cc7a579731198c93beed281e3a79a0e586 or 504178fb7d9f6cdb0496d5491efb05f45597e535, whichever matches your release line, or a later version.
  2. Update RUGGEDCOM RST2428P to V3.1 or a later version.
  3. Update SCALANCE XCM-/XRM-/XCH-/XRH-300 family to V3.1 or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux756c5cb7c09e537b87b5d3acafcb101b2ccf394f up to, but not including, 42f0a3f67158ed6b2908d2b9ffbf7e96d23fd358; 8f6b62125befe1675446923e4171eac2c012959c up to, but not including, cd7f3978c2ec741aedd1d860b2adb227314cf996; 6401038acfa24cba9c28cce410b7505efadd0222 up to, but not including, 07ef95cc7a579731198c93beed281e3a79a0e586; 0d130158db29f5e0b3893154908cf618896450a8 up to, but not including, 504178fb7d9f6cdb0496d5491efb05f45597e535; 89af25bd4b4bf6a71295f07e07a8ae7dc03c6595 up to, but not including, 3726f75a1ccc16cd335c0ccfad1d92ee08ecba5e; 8defb1d22ba0395b81feb963b96e252b097ba76f up to, but not including, c6e1650cf5df1bd6638eeee231a683ef30c7d4eb; 0efb15c14c493263cb3a5f65f5ddfd4603d19a76 up to, but not including, eb1ea64328d4cc7d7a912c563f8523d5259716ef; c8d2f34ea96ea3bce6ba2535f867f0d4ee3b22e1 up to, but not including, d52c04474feac8e305814a5228e622afe481b2ef; and 9 more ranges42f0a3f67158ed6b2908d2b9ffbf7e96d23fd358, cd7f3978c2ec741aedd1d860b2adb227314cf996, 07ef95cc7a579731198c93beed281e3a79a0e586, 504178fb7d9f6cdb0496d5491efb05f45597e535, 3726f75a1ccc16cd335c0ccfad1d92ee08ecba5e, c6e1650cf5df1bd6638eeee231a683ef30c7d4eb
SiemensRUGGEDCOM RST2428Pbefore V3.1V3.1
SiemensSCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 familyNot specified in the recordNot stated
SiemensSCALANCE XCM-/XRM-/XCH-/XRH-300 familybefore V3.1V3.1
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystembefore V1.1.1V1.1.1
LinuxLinux Kernel4.19.313 up to, but not including, 4.19.316; 5.4.275 up to, but not including, 5.4.278; 5.10.216 up to, but not including, 5.10.219; 5.15.157 up to, but not including, 5.15.161; 6.1.88 up to, but not including, 6.1.93; 6.6.29 up to, but not including, 6.6.33; 6.8.8 up to, but not including, 6.8.12; 6.9 up to, but not including, 6.9.34.19.316, 5.4.278, 5.10.219, 5.15.161, 6.1.93, 6.6.33

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
HighData or code can be modified at will.
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:H/A:H. Scored by CNA.

Scoring systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.15.3MediumCISA (ADP)

Official description

In the Linux kernel, the following vulnerability has been resolved: speakup: Fix sizeof() vs ARRAY_SIZE() bug The "buf" pointer is an array of u16 values. This code should be using ARRAY_SIZE() (which is 256) instead of sizeof() (which is 512), otherwise it can the still got out of bounds.

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

The underlying weakness: Improper Validation of Array Index

The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.

How developers prevent this class of flaw

  • Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).
  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, Ada allows the programmer to constrain the values of a variable and languages such as Java and Ruby will allow the programmer to handle exceptions when an out-of-bounds index is accessed.
  • Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment. For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND.

More Improper Validation of Array Index vulnerabilities (CWE-129)

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 Improper Validation of Array Index vulnerabilities

Spotted an error? Tell us.