Zeng Heng
777430aa4d
pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map
...
[ Upstream commit 91d5c5060ee24fe8da88cd585bb43b843d2f0dce ]
Here is the BUG report by KASAN about null pointer dereference:
BUG: KASAN: null-ptr-deref in strcmp+0x2e/0x50
Read of size 1 at addr 0000000000000000 by task python3/2640
Call Trace:
strcmp
__of_find_property
of_find_property
pinctrl_dt_to_map
kasprintf() would return NULL pointer when kmalloc() fail to allocate.
So directly return ENOMEM, if kasprintf() return NULL pointer.
Fixes: 57291ce295c0 ("pinctrl: core device tree mapping table parsing support")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Link: https://lore.kernel.org/r/20221110082056.2014898-1-zengheng4@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-25 17:45:44 +01:00
..
2021-09-18 13:40:11 +02:00
2022-07-21 21:20:15 +02:00
2022-06-09 10:21:15 +02:00
2021-09-18 13:40:11 +02:00
2022-08-25 11:38:15 +02:00
2022-05-09 09:05:02 +02:00
2022-06-09 10:21:16 +02:00
2022-08-25 11:37:57 +02:00
2022-04-08 14:40:41 +02:00
2022-08-25 11:37:58 +02:00
2022-06-09 10:21:16 +02:00
2022-05-09 09:04:59 +02:00
2022-07-29 17:19:06 +02:00
2022-09-23 14:16:57 +02:00
2021-11-18 14:03:51 +01:00
2022-11-25 17:45:44 +01:00
2022-04-08 14:40:41 +02:00
2022-08-31 17:15:14 +02:00
2021-09-18 13:40:11 +02:00
2021-11-18 14:04:20 +01:00
2021-09-18 13:40:07 +02:00
2021-07-19 09:45:02 +02:00
2022-05-09 09:05:03 +02:00
2022-05-09 09:05:03 +02:00
2021-09-18 13:40:14 +02:00
2021-09-18 13:40:11 +02:00
2021-09-18 13:40:07 +02:00
2021-09-18 13:40:11 +02:00