linux-stable/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
head.S
insnemu.S
irq.c
kgdb.c
Makefile
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
setup.c nios2: Replace all non-returning strlcpy with strscpy 2023-06-13 16:51:49 -05:00
signal.c
sys_nios2.c
syscall_table.c
time.c
traps.c
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00