linux/arch
George Wilson f72ecff768 powerpc/pseries: lparcfg - fix kbuf[] underflow
commit fb442a6673 upstream.

In lparcfg_write(), a count of 0 results in kbuf[] being indexed at -1.
Check for count == 0 in the existing check for count > sizeof(kbuf) and
return -EINVAL if true.

Fixes: 74422e2b19 ("powerpc/pseries: Remove VLA from lparcfg_write()")
Acked-by: Nayna Jain <nayna@linux.ibm.com>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Cc: stable@vger.kernel.org # 4.20
Signed-off-by: George Wilson <gcwilson@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-08-23 14:17:15 +02:00
..
alpha alpha/PCI: Fix __pci_mmap_fits() overflow for zero-length BARs 2026-07-24 15:51:41 +02:00
arc arc: Fix __fls() const-foldability via __builtin_clzl() 2025-12-07 06:09:16 +09:00
arm ARM: npcm: Fix OF node refcount leaks in SMP setup 2026-08-19 17:14:13 +02:00
arm64 Revert "arm64: syscall: Ensure saved x0 is kept in-sync with tracer updates" 2026-08-19 17:14:03 +02:00
csky csky: fix csky_cmpxchg_fixup not working 2026-01-19 13:10:15 +01:00
h8300 sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
hexagon sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
ia64 sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
m68k m68k: nommu: fix memmove() with differently aligned src and dest for 68000 2026-03-04 07:20:15 -05:00
microblaze sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
mips mips: sched: Fix CPUMASK_OFFSTACK memory corruption 2026-07-24 15:51:49 +02:00
nds32 sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
nios2 nios2: ensure that memblock.current_limit is set when setting pfn limits 2025-10-29 14:03:10 +01:00
openrisc openrisc: define arch-specific version of nop() 2026-03-04 07:20:09 -05:00
parisc parisc: _llseek syscall is only available for 32-bit userspace 2026-06-01 17:35:15 +02:00
powerpc powerpc/pseries: lparcfg - fix kbuf[] underflow 2026-08-23 14:17:15 +02:00
riscv riscv: Prevent NULL pointer dereference in machine_kexec_prepare() 2026-07-24 15:51:54 +02:00
s390 s390/process: Fix kernel thread function pointer type 2026-07-24 15:51:34 +02:00
sh sh: platform_early: remove pdev->driver_override check 2026-04-18 10:33:22 +02:00
sparc sparc: led: avoid trimming a newline from empty writes 2026-07-24 15:51:39 +02:00
um um: vector: fix use-after-free in vector_mmsg_rx() 2026-08-19 17:14:10 +02:00
x86 x86/boot/compressed: Disable jump tables 2026-08-19 17:14:02 +02:00
xtensa sched: Add wrapper for get_wchan() to keep task blocked 2025-08-28 16:24:03 +02:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:24:48 +02:00