linux/arch/parisc/kernel
Kees Cook 721d28f3df parisc: Replace strlcpy() with strscpy()
strlcpy() reads the entire source buffer first. This read may exceed
the destination size limit. This is both inefficient and can lead
to linear read overflows if a source string is not NUL-terminated[1].
Additionally, it returns the size of the source string, not the
resulting size of the destination string. In an effort to remove strlcpy()
completely[2], replace strlcpy() here with strscpy().

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1]
Link: https://github.com/KSPP/linux/issues/89 [2]
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Azeem Shaikh <azeemshaikh38@gmail.com>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Helge Deller <deller@gmx.de>
2023-11-18 18:59:28 +01:00
..
syscalls asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
vdso32 parisc: Add missing FORCE prerequisites in Makefile 2022-12-18 22:18:49 +01:00
vdso64 parisc: Add missing FORCE prerequisites in Makefile 2022-12-18 22:18:49 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
alternative.c parisc: Use num_present_cpus() in alternative patching code 2023-05-23 18:17:32 +02:00
asm-offsets.c parisc: Prepare for Block-TLB support on 32-bit kernel 2023-09-07 09:12:19 +02:00
audit.c parisc: Fold 32-bit compat code into audit_classify_syscall() 2023-06-30 17:14:14 +02:00
cache.c parisc: BTLB: Initialize BTLB tables at CPU startup 2023-09-07 09:12:20 +02:00
compat_audit.c parisc: Fold 32-bit compat code into audit_classify_syscall() 2023-06-30 17:14:14 +02:00
drivers.c parisc: Show default CPU PSW.W setting as reported by PDC 2023-10-30 14:54:41 +01:00
entry.S parisc/pgtable: Do not drop upper 5 address bits of physical address 2023-11-07 19:48:30 +01:00
firmware.c parisc/firmware: Use PDC constants for narrow/wide firmware 2023-10-30 14:54:41 +01:00
ftrace.c parisc: ftrace: Add declaration for ftrace_function_trampoline() 2023-08-10 22:51:54 +02:00
hardware.c parisc: Clean up names in hardware database 2022-08-01 18:43:23 +02:00
head.S parisc: Prevent booting 64-bit kernels on PA1.x machines 2023-11-10 16:17:32 +01:00
hpmc.S parisc: Re-use toc_stack as hpmc_stack 2022-01-11 11:57:37 +01:00
inventory.c parisc: Add qemu fw_cfg interface 2020-10-15 08:10:37 +02:00
irq.c parisc: irq: Make irq_stack_union static to avoid sparse warning 2023-08-31 22:36:12 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kexec_file.c parisc: add support for kexec_file_load() syscall 2019-09-08 15:41:46 +02:00
kexec.c parisc: kexec: include reboot.h 2023-05-09 14:04:56 +02:00
kgdb.c parisc: Drop duplicate kgdb_pdc console 2022-12-18 22:18:49 +01:00
kprobes.c parisc: Fix typos in comments 2022-05-08 20:01:12 +02:00
Makefile parisc: Drop the pa7300lc LPMC handler 2023-08-20 20:23:46 +02:00
module.c parisc: module: Mark symindex __maybe_unused 2023-06-30 17:14:14 +02:00
pacache.S parisc: Ensure page alignment in flush functions 2023-05-03 17:43:26 +02:00
parisc_ksyms.c parisc: parisc_ksyms: Include libgcc.h for libgcc prototypes 2023-08-10 18:34:05 +02:00
patch.c parisc: Fix patch code locking and flushing 2022-05-17 21:52:59 +02:00
pci-dma.c parisc: Move proc_mckinley_root and proc_runway_root to sba_iommu 2023-08-10 22:22:03 +02:00
pci.c parisc: Drop comments which are already in pci.h 2019-09-05 16:41:11 +02:00
pdc_chassis.c parisc: chassis: Do not overwrite string on LCD display 2023-08-28 17:58:14 +02:00
pdc_cons.c parisc: Drop locking in pdc console code 2022-12-18 22:18:49 +01:00
pdt.c parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code 2023-08-10 17:32:09 +02:00
perf_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
perf_images.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
perf.c parisc: perf: Make cpu_device variable static 2023-08-10 23:00:18 +02:00
process.c parisc: Use generic mmap top-down layout and brk randomization 2023-08-22 10:24:46 +02:00
processor.c parisc: Replace strlcpy() with strscpy() 2023-11-18 18:59:28 +01:00
ptrace.c parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case 2023-02-01 21:42:37 +01:00
real2.S parisc: Fix argument pointer in real64_call_asm() 2023-05-03 17:43:26 +02:00
relocate_kernel.S parisc: add kexec syscall support 2019-09-08 15:37:04 +02:00
setup.c parisc: Move parisc_narrow_firmware variable to header file 2023-10-30 14:54:40 +01:00
signal32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
signal32.h parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
signal.c parisc: signal: Fix sparse incorrect type in assignment warning 2023-08-10 17:32:10 +02:00
smp.c parisc: simplify smp_prepare_boot_cpu() 2023-10-30 14:54:41 +01:00
stacktrace.c parisc: Fix implicit declaration of function '__kernel_text_address' 2021-11-13 22:10:56 +01:00
sys_parisc32.c
sys_parisc.c parisc: Use generic mmap top-down layout and brk randomization 2023-08-22 10:24:46 +02:00
syscall.S parisc: Fix lightweight spinlock checks to not break futexes 2023-08-10 17:32:09 +02:00
time.c parisc: Mark cr16 clock unstable on all SMP machines 2022-05-08 20:01:12 +02:00
toc_asm.S parisc: Enable TOC (transfer of contents) feature unconditionally 2022-01-11 11:57:37 +01:00
toc.c parisc: Fix missing prototype for 'toc_intr' warning in toc.c 2022-01-20 20:39:19 +01:00
topology.c parisc: fix a crash with multicore scheduler 2022-06-03 09:54:01 +02:00
traps.c parisc: traps: Drop cpu_lpmc function pointer 2023-08-20 20:23:46 +02:00
unaligned.c parisc: unaligned: Simplify 32-bit assembly in emulate_std() 2023-08-22 10:24:47 +02:00
unwind.c parisc: unwind: Avoid missing prototype warning for handle_interruption() 2023-07-03 18:56:03 +02:00
vdso.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vmlinux.lds.S parisc: BTLB: _edata symbol has to be page aligned for BTLB support 2023-09-07 09:12:20 +02:00