1
linux/arch/nios2/kernel
Azeem Shaikh 6a22e017f9 nios2: Replace all non-returning 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].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2023-06-13 16:51:49 -05:00
..
.gitignore
asm-offsets.c
cpuinfo.c nios2: Replace all non-returning strlcpy with strscpy 2023-06-13 16:51:49 -05:00
entry.S nios2: add force_successful_syscall_return() 2022-08-15 11:25:32 -05:00
head.S
insnemu.S
irq.c
kgdb.c
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
misaligned.c
module.c
nios2_ksyms.c
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
prom.c
ptrace.c nios2: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:40 -08:00
setup.c nios2: Replace all non-returning strlcpy with strscpy 2023-06-13 16:51:49 -05:00
signal.c nios2: restarts apply only to the first sigframe we build... 2022-08-15 11:25:32 -05:00
sys_nios2.c
syscall_table.c nios2: don't leave NULLs in sys_call_table[] 2022-08-15 11:25:32 -05:00
time.c
traps.c
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00