CVE-2022-49292
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
26/02/2025
Last modified:
22/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ALSA: oss: Fix PCM OSS buffer allocation overflow<br />
<br />
We&#39;ve got syzbot reports hitting INT_MAX overflow at vmalloc()<br />
allocation that is called from snd_pcm_plug_alloc(). Although we<br />
apply the restrictions to input parameters, it&#39;s based only on the<br />
hw_params of the underlying PCM device. Since the PCM OSS layer<br />
allocates a temporary buffer for the data conversion, the size may<br />
become unexpectedly large when more channels or higher rates is given;<br />
in the reported case, it went over INT_MAX, hence it hits WARN_ON().<br />
<br />
This patch is an attempt to avoid such an overflow and an allocation<br />
for too large buffers. First off, it adds the limit of 1MB as the<br />
upper bound for period bytes. This must be large enough for all use<br />
cases, and we really don&#39;t want to handle a larger temporary buffer<br />
than this size. The size check is performed at two places, where the<br />
original period bytes is calculated and where the plugin buffer size<br />
is calculated.<br />
<br />
In addition, the driver uses array_size() and array3_size() for<br />
multiplications to catch overflows for the converted period size and<br />
buffer bytes.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.19.237 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.188 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.109 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.32 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 5.16.18 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.17:*:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0c4190b41a69990666b4000999e27f8f1b2a426b
- https://git.kernel.org/stable/c/5ce74ff7059341d8b2f4d01c3383491df63d1898
- https://git.kernel.org/stable/c/7a40cbf3579a8e14849ba7ce46309c1992658d2b
- https://git.kernel.org/stable/c/a63af1baf0a5e11827db60e3127f87e437cab6e5
- https://git.kernel.org/stable/c/e74a069c6a7bb505f3ade141dddf85f4b0b5145a
- https://git.kernel.org/stable/c/efb6402c3c4a7c26d97c92d70186424097b6e366
- https://git.kernel.org/stable/c/fb08bf99195a87c798bc8ae1357337a981faeade



