CyberSecBulletin
CVE-2022-48702NVD status: Modified

Linux: Improper Validation of Array Index

CVE-2022-48702 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 637c5310acb48fffcc5657568db3f3e9bc719bfa, 6b0e260ac3cf289e38446552461caa65e6dab275, 88aac6684cf8bc885cca15463cb4407e91f28ff7 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.24% 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 637c5310acb48fffcc5657568db3f3e9bc719bfa or 6b0e260ac3cf289e38446552461caa65e6dab275 or 88aac6684cf8bc885cca15463cb4407e91f28ff7 or 45321a7d02b7cf9b3f97e3987fc1e4d649b82da2, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.9.328 or 4.14.293 or 4.19.258 or 5.4.213, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 637c5310acb48fffcc5657568db3f3e9bc719bfa; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 6b0e260ac3cf289e38446552461caa65e6dab275; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 88aac6684cf8bc885cca15463cb4407e91f28ff7; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 45321a7d02b7cf9b3f97e3987fc1e4d649b82da2; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 39a90720f3abe96625d1224e7a7463410875de4c; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 45814a53514e10a8014906c882e0d0d38df39cc1; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, 4204a01ffce97cae1d59edc5848f02be5b2b9178; 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 up to, but not including, d29f59051d3a07b81281b2df2b8c9dfe4716067f; and 1 more ranges637c5310acb48fffcc5657568db3f3e9bc719bfa, 6b0e260ac3cf289e38446552461caa65e6dab275, 88aac6684cf8bc885cca15463cb4407e91f28ff7, 45321a7d02b7cf9b3f97e3987fc1e4d649b82da2, 39a90720f3abe96625d1224e7a7463410875de4c, 45814a53514e10a8014906c882e0d0d38df39cc1
LinuxLinux Kernelbefore 4.9.328; 4.10 up to, but not including, 4.14.293; 4.15 up to, but not including, 4.19.258; 4.20 up to, but not including, 5.4.213; 5.5 up to, but not including, 5.10.143; 5.11 up to, but not including, 5.15.68; 5.17 up to, but not including, 5.19.9; 6.04.9.328, 4.14.293, 4.19.258, 5.4.213, 5.10.143, 5.15.68

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 systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.17.8HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc() The voice allocator sometimes begins allocating from near the end of the array and then wraps around, however snd_emu10k1_pcm_channel_alloc() accesses the newly allocated voices as if it never wrapped around. This results in out of bounds access if the first voice has a high enough index so that first_voice + requested_voice_count > NUM_G (64). The more voices are requested, the more likely it is for this to occur. This was initially discovered using PipeWire, however it can be reproduced by calling aplay multiple times with 16 channels: aplay -r 48000 -D plughw:CARD=Live,DEV=3 -c 16 /dev/zero UBSAN: array-index-out-of-bounds in sound/pci/emu10k1/emupcm.c:127:40 index 65 is out of range for type 'snd_emu10k1_voice [64]' CPU: 1 PID: 31977 Comm: aplay Tainted: G W IOE 6.0.0-rc2-emu10k1+ #7 Hardware name: ASUSTEK COMPUTER INC P5W DH Deluxe/P5W DH Deluxe, BIOS 3002 07/22/2010 Call Trace: <TASK> dump_stack_lvl+0x49/0x63 dump_stack+0x10/0x16 ubsan_epilogue+0x9/0x3f __ubsan_handle_out_of_bounds.cold+0x44/0x49 snd_emu10k1_playback_hw_params+0x3bc/0x420 [snd_emu10k1] snd_pcm_hw_params+0x29f/0x600 [snd_pcm] snd_pcm_common_ioctl+0x188/0x1410 [snd_pcm] ? exit_to_user_mode_prepare+0x35/0x170 ? do_syscall_64+0x69/0x90 ? syscall_exit_to_user_mode+0x26/0x50 ? do_syscall_64+0x69/0x90 ? exit_to_user_mode_prepare+0x35/0x170 snd_pcm_ioctl+0x27/0x40 [snd_pcm] __x64_sys_ioctl+0x95/0xd0 do_syscall_64+0x5c/0x90 ? do_syscall_64+0x69/0x90 ? do_syscall_64+0x69/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd

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.