Ubuntu-focal-kernel/Documentation
Christian Marangi 6527af7a7f PM / devfreq: Fix buffer overflow in trans_stat_show
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>

CVE-2023-52614
(backported from commit 08e23d05fa6dc4fc13da0ccf09defdd4bbc92ff4)
[koichiroden: crafted a custom diff that suits our tree.
 The key missing commits missing from our tree are as follows:
 commit b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq struct")
 commit a03dacb0316f ("PM / devfreq: Add cpu based scaling support to passive governor")
 commit 483d557ee9 ("PM / devfreq: Clean up the devfreq instance name in sysfs attr")
 commit 1ebd0bc0e8 ("PM / devfreq: Move statistics to separate struct devfreq_stats")
 commit 14a3439681 ("PM / devfreq: Add clearing transitions stats")
 commit b76b3479da ("PM / devfreq: Change time stats to 64-bit")
 commit 5c0f6c7959 ("PM / devfreq: Add new interrupt_driven flag for governors")]
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Acked-by: Thibault Ferrante <thibault.ferrante@canonical.com>
Acked-by: Mehmet Basaran <mehmet.basaran@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2024-09-27 10:50:28 +02:00
..
ABI PM / devfreq: Fix buffer overflow in trans_stat_show 2024-09-27 10:50:28 +02:00
EDID
PCI
RCU
accounting psi: Fix uaf issue when psi trigger is destroyed while being polled 2022-03-29 09:13:53 +02:00
admin-guide x86/cpu: Enable STIBP on AMD if Automatic IBRS is enabled 2024-06-07 15:01:38 +02:00
arm ARM: 9012/1: move device tree mapping out of linear region 2021-06-18 15:02:21 +02:00
arm64 arm64: cpufeature: Fix the visibility of compat hwcaps 2024-09-27 10:50:21 +02:00
block
bpf
cdrom
cgroups UBUNTU: SAUCE: (noup) cgroup: Add documentation for cgroup namespaces 2019-11-25 14:56:24 +01:00
core-api XArray: add xas_split 2021-07-15 19:27:10 +02:00
cpu-freq
crypto
dev-tools docs/scripts/gdb: add necessary make scripts_gdb step 2023-05-12 17:15:07 +02:00
devicetree ASoC: dt-bindings: rt5645: add cbj sleeve gpio property 2024-07-05 10:51:55 +02:00
doc-guide
driver-api spi: Update reference to struct spi_controller 2023-02-01 15:22:23 +01:00
fault-injection debugfs: fix error when writing negative value to atomic_t debugfs file 2023-02-01 15:22:16 +01:00
fb fbdev: fix numbering of fbcon options 2020-02-24 16:19:49 +01:00
features s390: support KPROBES_ON_FTRACE 2020-03-06 15:10:50 -06:00
filesystems rename(): fix the locking of subdirectories 2024-03-28 15:18:31 +01:00
firmware-guide Documentation: ACPI: EINJ: Fix obsolete example 2022-10-17 15:01:38 +02:00
firmware_class
fpga
gpu
hid
hwmon hwmon: (lm90) Add basic support for TI TMP461 2022-03-07 16:34:27 +01:00
i2c
ia64
ide
iio
infiniband
input Input: iforce - add support for Boeder Force Feedback Wheel 2022-11-24 10:28:20 +01:00
ioctl Remove DECnet support from kernel 2023-09-01 14:48:44 +02:00
isdn
kbuild kbuild: support LLVM=1 to switch the default tools to Clang/LLVM 2020-09-16 05:13:26 -04:00
kernel-hacking
kmsg UBUNTU: SAUCE: s390: kernel message catalog 2019-11-25 14:56:29 +01:00
leds leds: core: Add support for composing LED class device names 2019-07-25 20:07:52 +02:00
livepatch
locking
m68k
maintainer
media media: rename VFL_TYPE_GRABBER to _VIDEO 2024-06-07 15:01:29 +02:00
mic
mips
misc-devices
netlabel
networking xsk: Honor SO_BINDTODEVICE on bind 2023-10-02 12:12:08 +02:00
nios2
openrisc
parisc
pcmcia
power PM: runtime: Add pm_runtime_get_if_active() 2023-10-30 11:41:56 +01:00
powerpc
process overflow: Implement size_t saturating arithmetic helpers 2024-09-27 10:50:22 +02:00
riscv
s390 s390/pci: Documentation for zPCI 2020-06-22 17:21:13 -03:00
scheduler
scsi scsi: smartpqi: Update attribute name to `driver_version` 2020-01-30 16:24:30 +01:00
security
sh
sound ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument 2024-03-28 15:18:36 +01:00
sparc
sphinx docs: kernel_include.py: Cope with docutils 0.21 2024-07-05 10:51:55 +02:00
sphinx-static
spi
target tweewide: Fix most Shebang lines 2021-06-18 15:02:27 +02:00
timers
trace tracing/histogram: Update document for KEYS_MAX size 2023-01-06 08:44:44 -08:00
translations media: rename VFL_TYPE_GRABBER to _VIDEO 2024-06-07 15:01:29 +02:00
usb
userspace-api Documentation: seccomp: Fix user notification documentation 2021-06-18 15:02:42 +02:00
virt KVM: s390: disable migration mode when dirty tracking is disabled 2023-05-12 17:15:09 +02:00
virtual
vm arm: remove CONFIG_ARCH_HAS_HOLES_MEMORYMODEL 2022-07-11 16:39:53 +02:00
w1
watchdog
x86 x86/CPU/AMD: Save AMD NodeId as cpu_die_id 2021-01-20 14:26:39 +01:00
xtensa xtensa: fix TLBTEMP area placement 2021-01-20 14:24:28 +01:00
.gitignore
COPYING-logo
Changes
CodingStyle
DMA-API-HOWTO.txt
DMA-API.txt
DMA-ISA-LPC.txt
DMA-attributes.txt Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE"" 2022-08-26 11:06:53 +02:00
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
Kconfig
Makefile
SubmittingPatches
asm-annotations.rst linkage: Introduce new macros for assembler symbols 2020-12-10 12:05:43 +01:00
atomic_bitops.txt locking/atomic: Make test_and_*_bit() ordered on failure 2022-10-17 15:01:52 +02:00
atomic_t.txt
bus-virt-phys-mapping.txt
conf.py docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0 2022-08-26 11:08:41 +02:00
crc32.txt
debugging-modules.txt
debugging-via-ohci1394.txt
digsig.txt
docutils.conf
dontdiff
futex-requeue-pi.txt
hwspinlock.txt
index.rst linkage: Introduce new macros for assembler symbols 2020-12-10 12:05:43 +01:00
io-mapping.txt
io_ordering.txt
irqflags-tracing.txt
kobject.txt
kprobes.txt
kref.txt
logo.gif
lzo.txt lib/lzo: fix ambiguous encoding bug in lzo-rle 2020-08-08 01:53:12 -04:00
mailbox.txt
memory-barriers.txt
nommu-mmap.txt
padata.txt
percpu-rw-semaphore.txt
pi-futex.txt
preempt-locking.txt
rbtree.txt
remoteproc.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
speculation.txt
static-keys.txt
tee.txt
this_cpu_ops.txt
unaligned-memory-access.txt
xz.txt