linux/arch
Junrui Luo d479a7711f powerpc/spufs: fix out-of-bounds access in spufs_mem_mmap_access()
commit 47b87f469a upstream.

spufs_mem_mmap_access() computes the local store offset as
address - vma->vm_start, but bounds-checks it against vma->vm_end
instead of the local store size. On 64-bit, offset is always well
below vma->vm_end, so the clamp never fires and len stays unbounded
against the LS_SIZE buffer returned by ctx->ops->get_ls().

Reject offsets at or beyond LS_SIZE and clamp len to the remaining
space, mirroring the guard already used by spufs_mem_mmap_fault() and
spufs_ps_fault().

Fixes: a352894d07 ("spufs: use new vm_ops->access to allow local state access from gdb")
Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/SYBPR01MB7881EE775E8B51C09F5A29E7AF152@SYBPR01MB7881.ausprd01.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-07-24 15:51:55 +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: imx31: Fix IIM mapping leak in revision check 2026-07-24 15:51:32 +02:00
arm64 KVM: arm64: vgic: Check the interrupt is still ours before migrating it 2026-07-24 15:51:46 +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/spufs: fix out-of-bounds access in spufs_mem_mmap_access() 2026-07-24 15:51:55 +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: virt-pci: Fix build failure 2026-06-01 17:35:19 +02:00
x86 x86/boot: Reject too long acpi_rsdp= values 2026-07-24 15:51:47 +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