CVE-2022-49515

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49515
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49515.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49515
Downstream
Related
Published
2025-02-26T02:13:43Z
Modified
2025-10-15T22:17:05.651553Z
Summary
ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t
Details

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

ASoC: cs35l41: Fix an out-of-bounds access in otppackedelement_t

The CS35L41NUMOTPELEM is 100, but only 99 entries are defined in the array otpmap1/2[CS35L41NUMOTPELEM], this will trigger UBSAN to report a shift-out-of-bounds warning in the cs35l41otpunpack() since the last entry in the array will result in GENMASK(-1, 0).

UBSAN reports this problem: UBSAN: shift-out-of-bounds in /home/hwang4/build/jammy/jammy/sound/soc/codecs/cs35l41-lib.c:836:8 shift exponent 64 is too large for 64-bit type 'long unsigned int' CPU: 10 PID: 595 Comm: systemd-udevd Not tainted 5.15.0-23-generic #23 Hardware name: LENOVO \x02MFGINGO/\x02MFGINGO, BIOS N3GET19W (1.00 ) 03/11/2022 Call Trace: <TASK> showstack+0x52/0x58 dumpstacklvl+0x4a/0x5f dumpstack+0x10/0x12 ubsanepilogue+0x9/0x45 _ubsanhandleshiftoutofbounds.cold+0x61/0xef ? regmapunlockmutex+0xe/0x10 cs35l41otpunpack.cold+0x1c6/0x2b2 [sndsoccs35l41lib] cs35l41hdaprobe+0x24f/0x33a [sndhdascodeccs35l41] cs35l41hdai2cprobe+0x65/0x90 [sndhdascodeccs35l41i2c] ? cs35l41hdai2cremove+0x20/0x20 [sndhdascodeccs35l41i2c] i2cdevice_probe+0x252/0x2b0

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
6450ef55905688602175fae4ed1bfbfef6a14dde
Fixed
dbc35268e14d5d89c7a9db72009ad4dcd9ede646
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6450ef55905688602175fae4ed1bfbfef6a14dde
Fixed
a59b9958416096dd21dc4f62b0c5be525d459ca8
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6450ef55905688602175fae4ed1bfbfef6a14dde
Fixed
9f342904216f378e88008bb0ce1ae200a4b99fe8

Affected versions

v5.*

v5.15
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.17.1
v5.17.10
v5.17.11
v5.17.12
v5.17.13
v5.17.2
v5.17.3
v5.17.4
v5.17.5
v5.17.6
v5.17.7
v5.17.8
v5.17.9
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.18.1
v5.18.2

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.17.14
Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
5.18.3