This is a note to let you know that I've just added the patch titled pwm: Fix out-of-bounds access in of_pwm_single_xlate() to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pwm-fix-out-of-bounds-access-in-of_pwm_single_xlate.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a297d07b9a1e4fb8cda25a4a2363a507d294b7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@xxxxxxxxxxxxxx> Date: Tue, 9 Jan 2024 22:34:31 +0100 Subject: pwm: Fix out-of-bounds access in of_pwm_single_xlate() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/243908750d306e018a3d4bf2eb745d53ab50f663.1704835845.git.u.kleine-koenig@xxxxxxxxxxxxxx Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/pwm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -176,7 +176,7 @@ of_pwm_single_xlate(struct pwm_chip *chi pwm->args.period = args->args[0]; pwm->args.polarity = PWM_POLARITY_NORMAL; - if (args->args_count == 2 && args->args[2] & PWM_POLARITY_INVERTED) + if (args->args_count == 2 && args->args[1] & PWM_POLARITY_INVERTED) pwm->args.polarity = PWM_POLARITY_INVERSED; return pwm; Patches currently in stable-queue which might be from u.kleine-koenig@xxxxxxxxxxxxxx are queue-6.6/pwm-jz4740-don-t-use-dev_err_probe-in-.request.patch queue-6.6/serial-core-imx-do-not-set-rs485-enabled-if-it-is-not-supported.patch queue-6.6/pwm-stm32-use-hweight32-in-stm32_pwm_detect_channels.patch queue-6.6/drm-bridge-tpd12s015-drop-buggy-__exit-annotation-fo.patch queue-6.6/drm-imx-lcdc-fix-double-free-of-driver-data.patch queue-6.6/pwm-fix-out-of-bounds-access-in-of_pwm_single_xlate.patch queue-6.6/pwm-stm32-fix-enable-count-for-clk-in-.probe.patch