WSL2-Linux-Kernel/drivers/pinctrl
Zeng Heng 97e5b508e9 pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map
[ Upstream commit 91d5c5060e ]

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: 57291ce295 ("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-26 09:24:36 +01:00
..
actions
aspeed pinctrl: aspeed: Fix potential NULL dereference in aspeed_pinmux_set_mux() 2022-07-21 21:24:36 +02:00
bcm pinctrl: bcm2835: implement hook for missing gpio-ranges 2022-06-09 10:23:07 +02:00
berlin
cirrus
freescale
intel pinctrl: intel: Check against matching data instead of ACPI companion 2022-08-25 11:40:36 +02:00
mediatek pinctrl: mediatek: mt8195: enable driver on mtk platforms 2022-06-09 10:23:07 +02:00
meson
mvebu pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context 2022-07-29 17:25:20 +02:00
nomadik pinctrl: nomadik: Fix refcount leak in nmk_pinctrl_dt_subnode_to_map 2022-08-25 11:40:07 +02:00
nuvoton pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE() 2022-04-08 14:24:11 +02:00
pxa
qcom pinctrl: qcom: sc8180x: Fix wrong pin numbers 2022-09-23 14:15:47 +02:00
ralink pinctrl: ralink: Check for null return of devm_kcalloc 2022-07-29 17:25:10 +02:00
renesas pinctrl: renesas: core: Fix possible null-ptr-deref in sh_pfc_map_resources() 2022-06-09 10:23:09 +02:00
samsung pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config 2022-05-09 09:14:30 +02:00
spear
sprd
stm32 pinctrl: stm32: fix optional IRQ support to gpios 2022-07-29 17:25:05 +02:00
sunxi pinctrl: sunxi: Fix name for A100 R_PIO 2022-09-23 14:15:47 +02:00
tegra
ti
uniphier
visconti
vt8500
Kconfig
Makefile
core.c pinctrl: core: fix possible memory leak in pinctrl_enable() 2021-11-18 19:16:06 +01:00
core.h
devicetree.c pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map 2022-11-26 09:24:36 +01:00
devicetree.h
pinconf-generic.c pinctrl: pinconf-generic: Print arguments for bias-pull-* 2022-04-08 14:24:11 +02:00
pinconf.c
pinconf.h
pinctrl-amd.c pinctrl: amd: Don't save/restore interrupt status and wake status bits 2022-08-25 11:40:08 +02:00
pinctrl-amd.h pinctrl: amd: Add irq field data 2021-09-17 00:48:45 +02:00
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c
pinctrl-at91.c
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-da850-pupd.c
pinctrl-da9062.c
pinctrl-digicolor.c
pinctrl-equilibrium.c pinctrl: equilibrium: Fix function addition in multiple groups 2021-11-18 19:16:55 +01:00
pinctrl-equilibrium.h
pinctrl-falcon.c
pinctrl-gemini.c
pinctrl-ingenic.c pinctrl: Ingenic: JZ4755 bug fixes 2022-11-03 23:59:13 +09:00
pinctrl-k210.c pinctrl: k210: Fix bias-pull-up 2022-03-02 11:48:09 +01:00
pinctrl-keembay.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-mcp23s08.c
pinctrl-mcp23s08.h
pinctrl-mcp23s08_i2c.c
pinctrl-mcp23s08_spi.c
pinctrl-microchip-sgpio.c pinctrl: microchip-sgpio: lock RMW access 2022-04-08 14:23:49 +02:00
pinctrl-ocelot.c
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: pistachio: fix use of irq_of_parse_and_map() 2022-05-09 09:14:36 +02:00
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: list all pins in a possible mux route for PX30 2022-11-26 09:24:35 +01:00
pinctrl-rockchip.h pinctrl/rockchip: support deferring other gpio params 2022-06-09 10:23:07 +02:00
pinctrl-single.c This is the bulk of pin control changes for the v5.15 kernel cycle, 2021-09-02 14:22:56 -07:00
pinctrl-st.c
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c
pinctrl-zynqmp.c
pinmux.c
pinmux.h