CVE-2022-49515
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
26/02/2025
Last modified:
26/02/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t<br />
<br />
The CS35L41_NUM_OTP_ELEM is 100, but only 99 entries are defined in<br />
the array otp_map_1/2[CS35L41_NUM_OTP_ELEM], this will trigger UBSAN<br />
to report a shift-out-of-bounds warning in the cs35l41_otp_unpack()<br />
since the last entry in the array will result in GENMASK(-1, 0).<br />
<br />
UBSAN reports this problem:<br />
UBSAN: shift-out-of-bounds in /home/hwang4/build/jammy/jammy/sound/soc/codecs/cs35l41-lib.c:836:8<br />
shift exponent 64 is too large for 64-bit type &#39;long unsigned int&#39;<br />
CPU: 10 PID: 595 Comm: systemd-udevd Not tainted 5.15.0-23-generic #23<br />
Hardware name: LENOVO \x02MFG_IN_GO/\x02MFG_IN_GO, BIOS N3GET19W (1.00 ) 03/11/2022<br />
Call Trace:<br />
<br />
show_stack+0x52/0x58<br />
dump_stack_lvl+0x4a/0x5f<br />
dump_stack+0x10/0x12<br />
ubsan_epilogue+0x9/0x45<br />
__ubsan_handle_shift_out_of_bounds.cold+0x61/0xef<br />
? regmap_unlock_mutex+0xe/0x10<br />
cs35l41_otp_unpack.cold+0x1c6/0x2b2 [snd_soc_cs35l41_lib]<br />
cs35l41_hda_probe+0x24f/0x33a [snd_hda_scodec_cs35l41]<br />
cs35l41_hda_i2c_probe+0x65/0x90 [snd_hda_scodec_cs35l41_i2c]<br />
? cs35l41_hda_i2c_remove+0x20/0x20 [snd_hda_scodec_cs35l41_i2c]<br />
i2c_device_probe+0x252/0x2b0