Loading
pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
mainline inclusion from mainline-v6.9-rc7 commit a0cedbcc8852d6c77b00634b81e41f17f29d9404 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9U3W9 CVE: CVE-2024-36959 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0cedbcc8852d6c77b00634b81e41f17f29d9404 ---------------------------------------------------- If we fail to allocate propname buffer, we need to drop the reference count we just took. Because the pinctrl_dt_free_maps() includes the droping operation, here we call it directly. Fixes: 91d5c506 ("pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map") Suggested-by:Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by:
Zeng Heng <zengheng4@huawei.com> Reviewed-by:
Dan Carpenter <dan.carpenter@linaro.org> Message-ID: <20240415105328.3651441-1-zengheng4@huawei.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>