]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: pinconf-generic: Fully validate 'pinmux' property
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 17 Mar 2026 10:36:11 +0000 (11:36 +0100)
committerLinus Walleij <linusw@kernel.org>
Thu, 19 Mar 2026 18:21:27 +0000 (19:21 +0100)
commitc98324ea7849b6e5baa1774f71709b375a2c2f9e
tree6d9590d18b2ad23ac854fe50ce9f84fe3a3623ed
parentd453086996957f1b87610315810235db7b03b3a6
pinctrl: pinconf-generic: Fully validate 'pinmux' property

The pinconf_generic_parse_dt_pinmux() assumes that the 'pinmux' property
is not empty when present. This might be not true. With that, the allocator
will give a special value in return and not NULL which lead to the crash
when trying to access that (invalid) memory. Fix that by fully validating
'pinmux' value, including its length.

Fixes: 7112c05fff83 ("pinctrl: pinconf-generic: Add API for pinmux propertity in DTS file")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/pinconf-generic.c