CVE-2022-49515
JSON

7.1high

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

Severity
7.1high CVSS:3.1 by NVD
Exploit likelihood
0.27% (higher than 19% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t The CS35L41_NUM_OTP_ELEM is 100, but only 99 entries are defined in the array otp_map_1/2[CS35L41_NUM_OTP_ELEM], this will trigger UBSAN to report a shift-out-of-bounds warning in the cs35l41_otp_unpack() 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 \x02MFG_IN_GO/\x02MFG_IN_GO, BIOS N3GET19W (1.00 ) 03/11/2022 Call Trace: <TASK> show_stack+0x52/0x58 dump_stack_lvl+0x4a/0x5f dump_stack+0x10/0x12 ubsan_epilogue+0x9/0x45 __ubsan_handle_shift_out_of_bounds.cold+0x61/0xef ? regmap_unlock_mutex+0xe/0x10 cs35l41_otp_unpack.cold+0x1c6/0x2b2 [snd_soc_cs35l41_lib] cs35l41_hda_probe+0x24f/0x33a [snd_hda_scodec_cs35l41] cs35l41_hda_i2c_probe+0x65/0x90 [snd_hda_scodec_cs35l41_i2c] ? cs35l41_hda_i2c_remove+0x20/0x20 [snd_hda_scodec_cs35l41_i2c] i2c_device_probe+0x252/0x2b0

Affected

Product or packageVersionsReported by
Linux Linuxfrom 6450ef55905688602175fae4ed1bfbfef6a14dde before dbc35268e14d5d89c7a9db72009ad4dcd9ede646, from 6450ef55905688602175fae4ed1bfbfef6a14dde before a59b9958416096dd21dc4f62b0c5be525d459ca8, from 6450ef55905688602175fae4ed1bfbfef6a14dde before 9f342904216f378e88008bb0ce1ae200a4b99fe8, 5.16
Not affected: before 5.16, from 5.17.14 up to 5.17.*, from 5.18.3 up to 5.18.*, from 5.19 up to *
CVE List
linux linux_kernelfrom 5.16 before 5.17.14, from 5.18 before 5.18.3NVD

Classification

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t The CS35L41_NUM_OTP_ELEM is 100, but only 99 entries are defined in the array otp_map_1/2[CS35L41_NUM_OTP_ELEM], this will trigger UBSAN to report a shift-out-of-bounds warning in the cs35l41_otp_unpack() 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 \x02MFG_IN_GO/\x02MFG_IN_GO, BIOS N3GET19W (1.00 ) 03/11/2022 Call Trace: <TASK> show_stack+0x52/0x58 dump_stack_lvl+0x4a/0x5f dump_stack+0x10/0x12 ubsan_epilogue+0x9/0x45 __ubsan_handle_shift_out_of_bounds.cold+0x61/0xef ? regmap_unlock_mutex+0xe/0x10 cs35l41_otp_unpack.cold+0x1c6/0x2b2 [snd_soc_cs35l41_lib] cs35l41_hda_probe+0x24f/0x33a [snd_hda_scodec_cs35l41] cs35l41_hda_i2c_probe+0x65/0x90 [snd_hda_scodec_cs35l41_i2c] ? cs35l41_hda_i2c_remove+0x20/0x20 [snd_hda_scodec_cs35l41_i2c] i2c_device_probe+0x252/0x2b0

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ASoC: cs35l41: Se corrige un acceso fuera de los límites en otp_packed_element_t. CS35L41_NUM_OTP_ELEM es 100, pero solo se definen 99 entradas en la matriz otp_map_1/2[CS35L41_NUM_OTP_ELEM], esto hará que UBSAN informe una advertencia de cambio fuera de los límites en cs35l41_otp_unpack() ya que la última entrada en la matriz dará como resultado GENMASK(-1, 0). UBSAN informa este problema: UBSAN: cambio fuera de los límites en /home/hwang4/build/jammy/jammy/sound/soc/codecs/cs35l41-lib.c:836:8 El exponente de cambio 64 es demasiado grande para el tipo de 64 bits 'long unsigned int' CPU: 10 PID: 595 Comm: systemd-udevd No contaminado 5.15.0-23-generic #23 Nombre del hardware: LENOVO \x02MFG_IN_GO/\x02MFG_IN_GO, BIOS N3GET19W (1.00) 03/11/2022 Seguimiento de llamadas: show_stack+0x52/0x58 dump_stack_lvl+0x4a/0x5f dump_stack+0x10/0x12 cs35l41_hda_i2c_probe+0x65/0x90 [snd_hda_scodec_cs35l41_i2c] ? cs35l41_hda_i2c_remove+0x20/0x20 [snd_hda_scodec_cs35l41_i2c] sonda de dispositivo i2c+0x252/0x2b0

References

Sources

SourceRecordLicence
CVE ListCVE-2022-49515 changed 2026-05-11CVE Terms of Use
NVDCVE-2022-49515 changed 2026-06-17Public domain