]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pwm: Fix out-of-bounds access in of_pwm_single_xlate()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 9 Jan 2024 21:34:31 +0000 (22:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:27:42 +0000 (15:27 -0800)
commit7b85554c7c2aee91171e038e4d5442ffa130b282
treefcd005b09a83e7b030e02448b54f2573a7ac570c
parent00e29df1b44dfbeb06d2df9b7d8927ed1d00720c
pwm: Fix out-of-bounds access in of_pwm_single_xlate()

commit a297d07b9a1e4fb8cda25a4a2363a507d294b7c9 upstream.

With args->args_count == 2 args->args[2] is not defined. Actually the
flags are contained in args->args[1].

Fixes: 3ab7b6ac5d82 ("pwm: Introduce single-PWM of_xlate function")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/243908750d306e018a3d4bf2eb745d53ab50f663.1704835845.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pwm/core.c