Centos-kernel-stream-9/drivers/devfreq
Mark Salter 009f3aca85 PM / devfreq: Fix buffer overflow in trans_stat_show
JIRA: https://issues.redhat.com/browse/RHEL-29457
CVE: CVE-2023-52614

commit 08e23d05fa6dc4fc13da0ccf09defdd4bbc92ff4
Author: Christian Marangi <ansuelsmth@gmail.com>
Date: Tue, 24 Oct 2023 20:30:15 +0200

    Fix buffer overflow in trans_stat_show().

    Convert simple snprintf to the more secure scnprintf with size of
    PAGE_SIZE.

    Add condition checking if we are exceeding PAGE_SIZE and exit early from
    loop. Also add at the end a warning that we exceeded PAGE_SIZE and that
    stats is disabled.

    Return -EFBIG in the case where we don't have enough space to write the
    full transition table.

    Also document in the ABI that this function can return -EFBIG error.

    Link: https://lore.kernel.org/all/20231024183016.14648-2-ansuelsmth@gmail.com/
    Cc: stable@vger.kernel.org
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218041
    Fixes: e552bbaf5b ("PM / devfreq: Add sysfs node for representing frequency transition information.")
    Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
    Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

Signed-off-by: Mark Salter <msalter@redhat.com>
2024-06-12 09:18:08 -04:00
..
event
Kconfig PM / devfreq: Remove "select SRCU" 2023-12-05 17:57:47 -07:00
Makefile
devfreq-event.c driver core: class: remove module * from class_create() 2023-11-01 11:12:29 -05:00
devfreq.c PM / devfreq: Fix buffer overflow in trans_stat_show 2024-06-12 09:18:08 -04:00
exynos-bus.c PM / devfreq: exynos-bus: Fix NULL pointer dereference 2023-11-22 12:21:43 +01:00
governor.h PM / devfreq: passive: Keep cpufreq_policy for possible cpus 2022-10-25 14:14:16 -04:00
governor_passive.c PM / devfreq: Rework freq_table to be local to devfreq struct 2023-11-22 12:21:43 +01:00
governor_performance.c
governor_powersave.c
governor_simpleondemand.c
governor_userspace.c PM/devfreq: governor: Add a private governor_data for governor 2023-06-07 04:21:24 -04:00
imx-bus.c PM / devfreq: imx: Register i.MX8MP interconnect device 2023-04-03 18:58:18 -04:00
imx8m-ddrc.c
rk3399_dmc.c
tegra30-devfreq.c