Linux: Improper Validation of Array Index
CVE-2024-53214 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 4464e5aa3aa4574063640f1082f7d7e323af8eb4, 7d121f66b67921fb3b95e0ea9856bfba53733e91, 0918f5643fc6c3f7801f4a22397d2cc09ba99207 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.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to 4464e5aa3aa4574063640f1082f7d7e323af8eb4 or 7d121f66b67921fb3b95e0ea9856bfba53733e91 or 0918f5643fc6c3f7801f4a22397d2cc09ba99207 or 9567bd34aa3b986736c290c5bcba47e0182ac47a, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.19.325 or 5.4.287 or 5.10.231 or 5.15.174, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 4464e5aa3aa4574063640f1082f7d7e323af8eb4; 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 7d121f66b67921fb3b95e0ea9856bfba53733e91; 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 0918f5643fc6c3f7801f4a22397d2cc09ba99207; 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 9567bd34aa3b986736c290c5bcba47e0182ac47a; 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 6c6502d944168cbd7e03a4a08ad6488f78d73485; 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 06f2fcf49854ad05a09d09e0dbee6544fff04695; 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 949bee8065a85a5c6607c624dc05b5bc17119699; 89e1f7d4c66d85f42c3d52ea3866eb10cadf6153 up to, but not including, 1ef195178fb552478eb2587df4ad3be14ef76507; and 2 more ranges | 4464e5aa3aa4574063640f1082f7d7e323af8eb4, 7d121f66b67921fb3b95e0ea9856bfba53733e91, 0918f5643fc6c3f7801f4a22397d2cc09ba99207, 9567bd34aa3b986736c290c5bcba47e0182ac47a, 6c6502d944168cbd7e03a4a08ad6488f78d73485, 06f2fcf49854ad05a09d09e0dbee6544fff04695 |
| Linux | Linux Kernel | 3.6 up to, but not including, 4.19.325; 4.20 up to, but not including, 5.4.287; 5.5 up to, but not including, 5.10.231; 5.11 up to, but not including, 5.15.174; 5.16 up to, but not including, 6.1.120; 6.2 up to, but not including, 6.6.64; 6.7 up to, but not including, 6.11.11; 6.12 up to, but not including, 6.12.2 | 4.19.325, 5.4.287, 5.10.231, 5.15.174, 6.1.120, 6.6.64 |
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 NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
Official description
In the Linux kernel, the following vulnerability has been resolved: vfio/pci: Properly hide first-in-list PCIe extended capability There are cases where a PCIe extended capability should be hidden from the user. For example, an unknown capability (i.e., capability with ID greater than PCI_EXT_CAP_ID_MAX) or a capability that is intentionally chosen to be hidden from the user. Hiding a capability is done by virtualizing and modifying the 'Next Capability Offset' field of the previous capability so it points to the capability after the one that should be hidden. The special case where the first capability in the list should be hidden is handled differently because there is no previous capability that can be modified. In this case, the capability ID and version are zeroed while leaving the next pointer intact. This hides the capability and leaves an anchor for the rest of the capability list. However, today, hiding the first capability in the list is not done properly if the capability is unknown, as struct vfio_pci_core_device->pci_config_map is set to the capability ID during initialization but the capability ID is not properly checked later when used in vfio_config_do_rw(). This leads to the following warning [1] and to an out-of-bounds access to ecap_perms array. Fix it by checking cap_id in vfio_config_do_rw(), and if it is greater than PCI_EXT_CAP_ID_MAX, use an alternative struct perm_bits for direct read only access instead of the ecap_perms array. Note that this is safe since the above is the only case where cap_id can exceed PCI_EXT_CAP_ID_MAX (except for the special capabilities, which are already checked before). [1] WARNING: CPU: 118 PID: 5329 at drivers/vfio/pci/vfio_pci_config.c:1900 vfio_pci_config_rw+0x395/0x430 [vfio_pci_core] CPU: 118 UID: 0 PID: 5329 Comm: simx-qemu-syste Not tainted 6.12.0+ #1 (snip) Call Trace: <TASK> ? show_regs+0x69/0x80 ? __warn+0x8d/0x140 ? vfio_pci_config_rw+0x395/0x430 [vfio_pci_core] ? report_bug+0x18f/0x1a0 ? handle_bug+0x63/0xa0 ? exc_invalid_op+0x19/0x70 ? asm_exc_invalid_op+0x1b/0x20 ? vfio_pci_config_rw+0x395/0x430 [vfio_pci_core] ? vfio_pci_config_rw+0x244/0x430 [vfio_pci_core] vfio_pci_rw+0x101/0x1b0 [vfio_pci_core] vfio_pci_core_read+0x1d/0x30 [vfio_pci_core] vfio_device_fops_read+0x27/0x40 [vfio] vfs_read+0xbd/0x340 ? vfio_device_fops_unl_ioctl+0xbb/0x740 [vfio] ? __rseq_handle_notify_resume+0xa4/0x4b0 __x64_sys_pread64+0x96/0xc0 x64_sys_call+0x1c3d/0x20d0 do_syscall_64+0x4d/0x120 entry_SYSCALL_64_after_hwframe+0x76/0x7e
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
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/06f2fcf49854ad05a09d09e0dbee6544fff04695
- git.kernel.org/stable/c/0918f5643fc6c3f7801f4a22397d2cc09ba99207
- git.kernel.org/stable/c/1ef195178fb552478eb2587df4ad3be14ef76507
- git.kernel.org/stable/c/4464e5aa3aa4574063640f1082f7d7e323af8eb4
- git.kernel.org/stable/c/6c6502d944168cbd7e03a4a08ad6488f78d73485
- git.kernel.org/stable/c/7d121f66b67921fb3b95e0ea9856bfba53733e91
- git.kernel.org/stable/c/949bee8065a85a5c6607c624dc05b5bc17119699
- git.kernel.org/stable/c/9567bd34aa3b986736c290c5bcba47e0182ac47a
- git.kernel.org/stable/c/fe4bf8d0b6716a423b16495d55b35d3fe515905d
Other references
Recent Improper Validation of Array Index vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.