CVE-2022-49292

ALSA: oss: Fix PCM OSS buffer allocation overflow

HIGH
7.8
CVSS Score
Published: February 26, 2025 at 01:56 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%

Description

In the Linux kernel, the following vulnerability has been resolved: ALSA: oss: Fix PCM OSS buffer allocation overflow We've got syzbot reports hitting INT_MAX overflow at vmalloc() allocation that is called from snd_pcm_plug_alloc(). Although we apply the restrictions to input parameters, it's based only on the hw_params of the underlying PCM device. Since the PCM OSS layer allocates a temporary buffer for the data conversion, the size may become unexpectedly large when more channels or higher rates is given; in the reported case, it went over INT_MAX, hence it hits WARN_ON(). This patch is an attempt to avoid such an overflow and an allocation for too large buffers. First off, it adds the limit of 1MB as the upper bound for period bytes. This must be large enough for all use cases, and we really don't want to handle a larger temporary buffer than this size. The size check is performed at two places, where the original period bytes is calculated and where the plugin buffer size is calculated. In addition, the driver uses array_size() and array3_size() for multiplications to catch overflows for the converted period size and buffer bytes.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.19.2372.6.12 ≤ v < 4.19.2372.6.12 ≤ v < 5.10.1092.6.12 ≤ v < 5.15.322.6.12 ≤ v < 5.16.182.6.12 ≤ v < 5.17.12.6.12 ≤ v < 5.182.6.12 ≤ v < 5.4.1884.20 ≤ v < 5.4.1885.11 ≤ v < 5.15.325.16 ≤ v < 5.16.185.5 ≤ v < 5.10.1091da177e4c3f41524e886b7f1b8a0c1fc7321cac25.17
Vendor states this is fixed in 0c4190b41a69990666b4000999e27f8f1b2a426b (fixed)
Vendor states this is fixed in 5ce74ff7059341d8b2f4d01c3383491df63d1898 (fixed)
Vendor states this is fixed in 7a40cbf3579a8e14849ba7ce46309c1992658d2b (fixed)
Vendor states this is fixed in a63af1baf0a5e11827db60e3127f87e437cab6e5 (fixed)
Vendor states this is fixed in e74a069c6a7bb505f3ade141dddf85f4b0b5145a (fixed)
Vendor states this is fixed in efb6402c3c4a7c26d97c92d70186424097b6e366 (fixed)
Vendor states this is fixed in fb08bf99195a87c798bc8ae1357337a981faeade (fixed)
Vendor states this is fixed in 2.6.12 (unaffected)
Vendor states this is fixed in 4.19.237 (unaffected)
Vendor states this is fixed in 5.10.109 (unaffected)
Vendor states this is fixed in 5.15.32 (unaffected)
Vendor states this is fixed in 5.16.18 (unaffected)
Vendor states this is fixed in 5.17.1 (unaffected)
Vendor states this is fixed in 5.18 (unaffected)
Vendor states this is fixed in 5.4.188 (unaffected)

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0c4190b41a69990666b4000999e27f8f1b2a426b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5ce74ff7059341d8b2f4d01c3383491df63d1898
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7a40cbf3579a8e14849ba7ce46309c1992658d2b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a63af1baf0a5e11827db60e3127f87e437cab6e5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e74a069c6a7bb505f3ade141dddf85f4b0b5145a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/efb6402c3c4a7c26d97c92d70186424097b6e366
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/fb08bf99195a87c798bc8ae1357337a981faeade

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card