{"id":"CVE-2022-49515","state":"PUBLISHED","title":"ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t\n\nThe CS35L41_NUM_OTP_ELEM is 100, but only 99 entries are defined in\nthe array otp_map_1/2[CS35L41_NUM_OTP_ELEM], this will trigger UBSAN\nto report a shift-out-of-bounds warning in the cs35l41_otp_unpack()\nsince the last entry in the array will result in GENMASK(-1, 0).\n\nUBSAN reports this problem:\n UBSAN: shift-out-of-bounds in /home/hwang4/build/jammy/jammy/sound/soc/codecs/cs35l41-lib.c:836:8\n shift exponent 64 is too large for 64-bit type 'long unsigned int'\n CPU: 10 PID: 595 Comm: systemd-udevd Not tainted 5.15.0-23-generic #23\n Hardware name: LENOVO \\x02MFG_IN_GO/\\x02MFG_IN_GO, BIOS N3GET19W (1.00 ) 03/11/2022\n Call Trace:\n  <TASK>\n  show_stack+0x52/0x58\n  dump_stack_lvl+0x4a/0x5f\n  dump_stack+0x10/0x12\n  ubsan_epilogue+0x9/0x45\n  __ubsan_handle_shift_out_of_bounds.cold+0x61/0xef\n  ? regmap_unlock_mutex+0xe/0x10\n  cs35l41_otp_unpack.cold+0x1c6/0x2b2 [snd_soc_cs35l41_lib]\n  cs35l41_hda_probe+0x24f/0x33a [snd_hda_scodec_cs35l41]\n  cs35l41_hda_i2c_probe+0x65/0x90 [snd_hda_scodec_cs35l41_i2c]\n  ? cs35l41_hda_i2c_remove+0x20/0x20 [snd_hda_scodec_cs35l41_i2c]\n  i2c_device_probe+0x252/0x2b0","publishedAt":"2025-02-26T02:13:43.888Z","updatedAt":"2026-05-11T19:01:25.299Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6450ef55905688602175fae4ed1bfbfef6a14dde","status":"affected","lessThan":"dbc35268e14d5d89c7a9db72009ad4dcd9ede646","versionType":"git"},{"version":"6450ef55905688602175fae4ed1bfbfef6a14dde","status":"affected","lessThan":"a59b9958416096dd21dc4f62b0c5be525d459ca8","versionType":"git"},{"version":"6450ef55905688602175fae4ed1bfbfef6a14dde","status":"affected","lessThan":"9f342904216f378e88008bb0ce1ae200a4b99fe8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/sound/cs35l41.h","sound/soc/codecs/cs35l41-lib.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"5.17.14","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.3","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/sound/cs35l41.h","sound/soc/codecs/cs35l41-lib.c"]}],"references":["https://git.kernel.org/stable/c/dbc35268e14d5d89c7a9db72009ad4dcd9ede646","https://git.kernel.org/stable/c/a59b9958416096dd21dc4f62b0c5be525d459ca8","https://git.kernel.org/stable/c/9f342904216f378e88008bb0ce1ae200a4b99fe8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49515.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49515","state":"PUBLISHED","datePublished":"2025-02-26T02:13:43.888Z","dateUpdated":"2026-05-11T19:01:25.299Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T02:08:31.587Z"},"containers":{"cna":{"title":"ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t\n\nThe CS35L41_NUM_OTP_ELEM is 100, but only 99 entries are defined in\nthe array otp_map_1/2[CS35L41_NUM_OTP_ELEM], this will trigger UBSAN\nto report a shift-out-of-bounds warning in the cs35l41_otp_unpack()\nsince the last entry in the array will result in GENMASK(-1, 0).\n\nUBSAN reports this problem:\n UBSAN: shift-out-of-bounds in /home/hwang4/build/jammy/jammy/sound/soc/codecs/cs35l41-lib.c:836:8\n shift exponent 64 is too large for 64-bit type 'long unsigned int'\n CPU: 10 PID: 595 Comm: systemd-udevd Not tainted 5.15.0-23-generic #23\n Hardware name: LENOVO \\x02MFG_IN_GO/\\x02MFG_IN_GO, BIOS N3GET19W (1.00 ) 03/11/2022\n Call Trace:\n  <TASK>\n  show_stack+0x52/0x58\n  dump_stack_lvl+0x4a/0x5f\n  dump_stack+0x10/0x12\n  ubsan_epilogue+0x9/0x45\n  __ubsan_handle_shift_out_of_bounds.cold+0x61/0xef\n  ? regmap_unlock_mutex+0xe/0x10\n  cs35l41_otp_unpack.cold+0x1c6/0x2b2 [snd_soc_cs35l41_lib]\n  cs35l41_hda_probe+0x24f/0x33a [snd_hda_scodec_cs35l41]\n  cs35l41_hda_i2c_probe+0x65/0x90 [snd_hda_scodec_cs35l41_i2c]\n  ? cs35l41_hda_i2c_remove+0x20/0x20 [snd_hda_scodec_cs35l41_i2c]\n  i2c_device_probe+0x252/0x2b0"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6450ef55905688602175fae4ed1bfbfef6a14dde","status":"affected","lessThan":"dbc35268e14d5d89c7a9db72009ad4dcd9ede646","versionType":"git"},{"version":"6450ef55905688602175fae4ed1bfbfef6a14dde","status":"affected","lessThan":"a59b9958416096dd21dc4f62b0c5be525d459ca8","versionType":"git"},{"version":"6450ef55905688602175fae4ed1bfbfef6a14dde","status":"affected","lessThan":"9f342904216f378e88008bb0ce1ae200a4b99fe8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/sound/cs35l41.h","sound/soc/codecs/cs35l41-lib.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"5.17.14","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.3","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/sound/cs35l41.h","sound/soc/codecs/cs35l41-lib.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/dbc35268e14d5d89c7a9db72009ad4dcd9ede646"},{"url":"https://git.kernel.org/stable/c/a59b9958416096dd21dc4f62b0c5be525d459ca8"},{"url":"https://git.kernel.org/stable/c/9f342904216f378e88008bb0ce1ae200a4b99fe8"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:01:25.299Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.17.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.18.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"5.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}