CVE-2022-48702

Source
https://cve.org/CVERecord?id=CVE-2022-48702
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48702.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-48702
Downstream
Related
Published
2024-05-03T15:13:10.363Z
Modified
2026-03-14T11:56:17.329539Z
Summary
ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc()
Details

In the Linux kernel, the following vulnerability has been resolved:

ALSA: emu10k1: Fix out of bounds access in sndemu10k1pcmchannelalloc()

The voice allocator sometimes begins allocating from near the end of the array and then wraps around, however sndemu10k1pcmchannelalloc() 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 firstvoice + requestedvoicecount > NUMG (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 'sndemu10k1voice [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> dumpstacklvl+0x49/0x63 dumpstack+0x10/0x16 ubsanepilogue+0x9/0x3f __ubsanhandleoutofbounds.cold+0x44/0x49 sndemu10k1playbackhwparams+0x3bc/0x420 [sndemu10k1] sndpcmhwparams+0x29f/0x600 [sndpcm] sndpcmcommonioctl+0x188/0x1410 [sndpcm] ? exittousermodeprepare+0x35/0x170 ? dosyscall64+0x69/0x90 ? syscallexittousermode+0x26/0x50 ? dosyscall64+0x69/0x90 ? exittousermodeprepare+0x35/0x170 sndpcmioctl+0x27/0x40 [sndpcm] __x64sysioctl+0x95/0xd0 dosyscall64+0x5c/0x90 ? dosyscall64+0x69/0x90 ? dosyscall64+0x69/0x90 entrySYSCALL64afterhwframe+0x63/0xcd

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48702.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
637c5310acb48fffcc5657568db3f3e9bc719bfa
Fixed
6b0e260ac3cf289e38446552461caa65e6dab275
Fixed
88aac6684cf8bc885cca15463cb4407e91f28ff7
Fixed
45321a7d02b7cf9b3f97e3987fc1e4d649b82da2
Fixed
39a90720f3abe96625d1224e7a7463410875de4c
Fixed
45814a53514e10a8014906c882e0d0d38df39cc1
Fixed
4204a01ffce97cae1d59edc5848f02be5b2b9178
Fixed
d29f59051d3a07b81281b2df2b8c9dfe4716067f

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48702.json"