# CVE-2022-49507: regulator: da9121: Fix uninit-value in da9121_assign_chip_model()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 19% of CVEs (2026-12-01)
- Published: 2025-02-26T02:13:38.821Z
- Modified: 2026-06-17T05:18:16.493Z
- Weaknesses: CWE-908
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

regulator: da9121: Fix uninit-value in da9121_assign_chip_model()

KASAN report slab-out-of-bounds in __regmap_init as follows:

BUG: KASAN: slab-out-of-bounds in __regmap_init drivers/base/regmap/regmap.c:841
Read of size 1 at addr ffff88803678cdf1 by task xrun/9137

CPU: 0 PID: 9137 Comm: xrun Tainted: G        W         5.18.0-rc2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x15a lib/dump_stack.c:88
 print_report.cold+0xcd/0x69b mm/kasan/report.c:313
 kasan_report+0x8e/0xc0 mm/kasan/report.c:491
 __regmap_init+0x4540/0x4ba0 drivers/base/regmap/regmap.c:841
 __devm_regmap_init+0x7a/0x100 drivers/base/regmap/regmap.c:1266
 __devm_regmap_init_i2c+0x65/0x80 drivers/base/regmap/regmap-i2c.c:394
 da9121_i2c_probe+0x386/0x6d1 drivers/regulator/da9121-regulator.c:1039
 i2c_device_probe+0x959/0xac0 drivers/i2c/i2c-core-base.c:563

This happend when da9121 device is probe by da9121_i2c_id, but with
invalid dts. Thus, chip->subvariant_id is set to -EINVAL, and later
da9121_assign_chip_model() will access 'regmap' without init it.

Fix it by return -EINVAL from da9121_assign_chip_model() if
'chip->subvariant_id' is invalid.

(As written by CVE List.)

## Affected

- Linux Linux: from f3fbd5566f6a8cdb7c48ab29bd1096205b7fbcaf before be96baa0c79588084e0d7a4fa21c574cec9a57f4; from f3fbd5566f6a8cdb7c48ab29bd1096205b7fbcaf before 7da64c7c82c9b29b628a62c88a8c2fb06990563d; from f3fbd5566f6a8cdb7c48ab29bd1096205b7fbcaf before 60f21eda69f1b5727a97d2077da766eb27fcc21f; from f3fbd5566f6a8cdb7c48ab29bd1096205b7fbcaf before bab76514aca36bc513224525d5598da676938218; 5.11 (not affected: before 5.11; from 5.15.46 up to 5.15.*; from 5.17.14 up to 5.17.*; from 5.18.3 up to 5.18.*; from 5.19 up to *)
- linux linux_kernel: from 5.11 before 5.15.46; from 5.16 before 5.17.14; from 5.18 before 5.18.3

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/be96baa0c79588084e0d7a4fa21c574cec9a57f4> (patch)
- <https://git.kernel.org/stable/c/7da64c7c82c9b29b628a62c88a8c2fb06990563d> (patch)
- <https://git.kernel.org/stable/c/60f21eda69f1b5727a97d2077da766eb27fcc21f> (patch)
- <https://git.kernel.org/stable/c/bab76514aca36bc513224525d5598da676938218> (patch)

## Sources

- CVE List: [CVE-2022-49507](https://www.cve.org/CVERecord?id=CVE-2022-49507), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49507](https://nvd.nist.gov/vuln/detail/CVE-2022-49507), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49507 · Whole record: https://cve.day/CVE-2022-49507.json · Rebuilt by cve.day 2026-11-25T22:58:20.698Z
