Loading
pinctrl: stm32: check devm_kasprintf() returned value
stable inclusion from stable-v6.6.58 commit 3b36bb1fca2b87f6292ca2a8593f297c5e9fab41 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB0ENB CVE: CVE-2024-50070 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3b36bb1fca2b -------------------------------- commit b0f0e3f0552a566def55c844b0d44250c58e4df6 upstream. devm_kasprintf() can return a NULL pointer on failure but this returned value is not checked. Fix this lack and check the returned value. Found by code review. Cc: stable@vger.kernel.org Fixes: 32c170ff ("pinctrl: stm32: set default gpio line names using pin names") Signed-off-by:Ma Ke <make24@iscas.ac.cn> Link: https://lore.kernel.org/20240906100326.624445-1-make24@iscas.ac.cn Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Pu Lehui <pulehui@huawei.com>