Yang Yingliang
7920e0fbce
regulator: rt5759: fix OOB in validate_desc()
...
I got the following OOB report:
BUG: KASAN: slab-out-of-bounds in validate_desc+0xba/0x109
Read of size 8 at addr ffff888107db8ff0 by task python3/253
Call Trace:
<TASK>
dump_stack_lvl+0x67/0x83
print_report+0x178/0x4b0
kasan_report+0x90/0x190
validate_desc+0xba/0x109
gpiod_set_value_cansleep+0x40/0x5a
regulator_ena_gpio_ctrl+0x93/0xfc
_regulator_do_enable.cold.61+0x89/0x163
set_machine_constraints+0x140a/0x159c
regulator_register.cold.73+0x762/0x10cd
devm_regulator_register+0x57/0xb0
rt5759_probe+0x3a0/0x4ac [rt5759_regulator]
The desc used in validate_desc() is passed from 'reg_cfg.ena_gpiod',
which is not initialized. Fix this by initializing 'reg_cfg' to 0.
Fixes: 7b36ddb208bd ("regulator: rt5759: Add support for Richtek RT5759 DCDC converter")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221116092943.1668326-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-16 10:50:17 +00:00
..
2020-08-21 17:28:09 +01:00
2020-05-08 18:18:13 +01:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2021-01-13 11:36:19 +00:00
2021-01-13 11:36:19 +00:00
2020-05-08 18:18:13 +01:00
2020-05-08 18:18:13 +01:00
2019-05-30 11:25:18 -07:00
2020-06-18 13:47:31 +01:00
2020-05-08 18:18:13 +01:00
2020-05-08 18:18:13 +01:00
2020-05-08 18:18:13 +01:00
2020-11-23 18:46:31 +00:00
2022-04-04 08:59:43 +01:00
2021-01-20 18:48:20 +00:00
2020-05-08 18:18:13 +01:00
2021-11-18 13:57:49 +00:00
2021-03-15 15:42:12 +00:00
2022-09-05 13:09:48 +01:00
2022-09-05 13:09:47 +01:00
2021-04-14 10:19:59 +01:00
2022-11-16 10:50:16 +00:00
2022-06-10 14:51:35 +02:00
2022-06-08 08:14:53 +00:00
2020-06-25 15:29:21 +01:00
2021-06-23 12:34:40 +01:00
2020-09-07 18:35:25 +01:00
2020-09-07 18:35:25 +01:00
2021-07-15 17:24:50 +01:00
2022-04-21 14:18:04 +01:00
2021-11-30 13:08:18 +00:00
2020-09-07 18:35:25 +01:00
2019-05-03 15:07:39 +09:00
2020-09-07 18:35:25 +01:00
2019-05-03 15:07:39 +09:00
2020-05-06 15:16:59 +01:00
2021-07-11 23:50:43 +01:00
2019-05-30 11:29:22 -07:00
2022-08-18 12:51:48 +01:00
2021-09-27 13:01:20 +01:00
2019-05-30 11:26:32 -07:00
2021-06-04 15:27:10 +01:00
2021-06-23 16:56:31 +01:00
2018-09-17 14:32:22 -07:00
2022-04-04 08:48:30 +01:00
2022-09-29 15:20:14 +01:00
2021-05-19 14:31:43 +01:00
2021-06-21 13:02:05 +01:00
2021-07-11 23:44:37 +01:00
2020-07-22 14:43:48 +01:00
2021-10-05 08:56:08 +01:00
2021-06-21 13:08:39 +01:00
2021-11-24 12:57:30 +00:00
2022-06-10 14:51:35 +02:00
2020-01-13 15:03:06 +00:00
2022-09-13 17:43:23 +01:00
2019-07-22 13:18:13 +01:00
2020-09-07 18:49:13 +01:00
2021-10-21 14:17:49 +01:00
2022-06-10 14:51:36 +02:00
2020-01-13 15:03:06 +00:00
2019-06-19 17:09:55 +02:00
2021-06-01 14:05:23 +01:00
2020-05-08 18:18:13 +01:00
2019-09-09 10:53:48 +01:00
2021-05-19 13:34:00 +01:00
2021-06-08 13:37:45 +01:00
2020-09-07 18:35:25 +01:00
2022-09-13 17:43:23 +01:00
2022-08-24 12:21:30 +01:00
2020-08-21 17:28:14 +01:00
2019-06-19 17:09:55 +02:00
2019-08-15 15:09:21 +01:00
2021-06-21 13:07:44 +01:00
2020-06-18 13:47:34 +01:00
2019-06-19 17:09:55 +02:00
2019-06-18 19:12:47 +01:00
2022-06-10 14:51:36 +02:00
2020-06-18 13:47:35 +01:00
2020-06-26 15:34:18 +01:00
2021-09-17 13:16:38 +01:00
2022-01-19 16:47:39 +00:00
2021-05-24 09:50:20 +01:00
2020-05-08 18:18:13 +01:00
2021-06-07 16:24:07 +01:00
2018-08-08 10:52:50 +01:00
2021-06-03 14:04:51 +01:00
2020-08-21 17:28:15 +01:00
2019-03-04 00:01:08 +00:00
2019-05-30 11:26:32 -07:00
2019-03-04 00:01:08 +00:00
2020-12-11 13:23:07 +00:00
2021-06-01 14:05:26 +01:00
2021-05-25 16:45:09 +01:00
2022-06-07 17:21:36 +01:00
2020-05-08 18:18:13 +01:00
2020-01-14 15:25:00 +00:00
2020-01-17 15:34:31 +00:00
2020-01-13 15:03:06 +00:00
2019-04-26 10:38:23 +01:00
2021-06-23 16:56:31 +01:00
2020-05-08 18:18:13 +01:00
2022-09-13 15:04:56 +01:00
2022-09-13 15:04:58 +01:00
2022-04-04 15:16:10 +01:00
2021-07-11 23:50:36 +01:00
2021-03-24 19:50:21 +00:00
2022-06-29 16:31:42 +01:00
2022-07-27 13:14:46 +01:00
2021-07-11 23:50:37 +01:00
2021-07-07 12:01:32 +01:00
2022-09-19 15:44:16 +01:00
2020-05-08 18:18:13 +01:00
2020-07-22 14:43:48 +01:00
2022-05-03 13:47:44 +01:00
2019-10-01 12:46:37 +01:00
2019-05-30 11:26:32 -07:00
2021-03-10 12:47:46 +00:00
2022-05-25 14:38:29 +02:00
2020-09-07 18:35:25 +01:00
2019-05-03 15:05:52 +09:00
2020-09-07 18:35:25 +01:00
2019-05-03 15:05:52 +09:00
2020-09-07 18:35:25 +01:00
2019-05-03 15:05:52 +09:00
2021-09-27 13:01:19 +01:00
2022-09-09 22:27:12 +01:00
2022-08-23 18:07:59 +01:00
2022-08-23 18:07:56 +01:00
2021-05-10 13:06:50 +01:00
2021-12-24 14:07:02 +00:00
2022-09-23 14:25:13 +01:00
2019-05-30 11:29:52 -07:00
2021-05-26 19:22:09 +01:00
2019-12-17 13:08:41 -08:00
2021-11-18 13:57:47 +00:00
2022-06-13 13:28:27 +01:00
2022-04-25 14:00:47 +01:00
2022-03-25 16:09:31 +00:00
2021-07-11 23:50:39 +01:00
2022-06-23 13:07:50 +01:00
2022-06-06 12:39:10 +01:00
2022-11-16 10:50:17 +00:00
2021-06-16 15:41:16 +01:00
2021-07-15 17:24:49 +01:00
2021-07-11 23:45:15 +01:00
2022-04-04 08:38:57 +01:00
2021-09-15 13:12:39 +01:00
2021-04-21 15:51:42 +01:00
2021-04-21 15:51:43 +01:00
2021-10-08 17:24:30 +01:00
2022-03-07 13:15:01 +00:00
2022-06-30 13:25:37 +01:00
2020-05-08 18:18:13 +01:00
2020-09-17 18:25:39 +01:00
2019-05-13 11:07:43 +01:00
2022-04-26 15:13:48 +01:00
2020-08-21 17:28:20 +01:00
2020-08-21 17:28:17 +01:00
2022-04-19 12:04:10 +01:00
2021-06-21 13:08:41 +01:00
2020-09-14 14:24:38 +01:00
2022-02-08 09:27:28 +00:00
2020-08-21 17:28:19 +01:00
2021-08-03 18:27:18 +01:00
2021-08-03 18:27:19 +01:00
2022-09-19 15:44:17 +01:00
2020-09-01 15:48:52 +01:00
2022-02-08 13:38:10 +00:00
2022-06-10 14:51:35 +02:00
2019-04-15 09:44:41 +01:00
2020-09-01 15:48:56 +01:00
2022-06-10 14:51:36 +02:00
2022-06-10 14:51:36 +02:00
2022-06-10 14:51:35 +02:00
2022-06-10 14:51:36 +02:00
2020-09-01 15:48:55 +01:00
2020-01-13 15:03:06 +00:00
2022-06-10 14:51:35 +02:00
2022-06-10 14:51:36 +02:00
2022-09-26 16:10:33 +01:00
2021-07-11 23:50:38 +01:00
2022-06-10 14:51:36 +02:00
2021-12-15 22:16:53 +00:00
2020-08-23 17:36:59 -05:00
2021-12-13 19:35:43 +00:00
2021-10-21 16:08:07 +01:00
2021-06-02 12:03:37 +01:00
2022-03-15 12:03:51 +00:00
2019-11-18 12:58:24 +00:00
2022-03-02 13:45:31 +00:00
2021-09-13 01:59:24 +01:00
2020-09-07 18:35:25 +01:00
2020-09-07 18:35:25 +01:00
2020-09-07 18:35:25 +01:00
2022-03-07 13:15:01 +00:00
2020-06-26 15:34:24 +01:00
2022-04-04 08:38:56 +01:00