mirror-linux/arch/um/include/shared
Azeem Shaikh f0a6b5831c uml: 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].
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

Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230614003604.1021205-1-azeemshaikh38@gmail.com
2023-06-20 13:35:37 -07:00
..
skas um: separate child and parent errors in clone stub 2021-02-12 21:34:33 +01:00
arch.h
as-layout.h um: make stub data pages size tweakable 2023-04-20 23:08:43 +02:00
common-offsets.h um: common-offsets.h debriding... 2021-12-21 21:31:35 +01:00
elf_user.h
frame_kern.h
init.h
irq_kern.h um: time-travel: rework interrupt handling in ext mode 2021-02-12 21:24:27 +01:00
irq_user.h um: header debriding - activate_ipi() 2021-12-21 21:31:35 +01:00
kern.h
kern_util.h um: remove a dangling extern of syscall_trace() 2021-12-21 21:31:35 +01:00
longjmp.h um: rename set_signals() to um_set_signals() 2021-12-21 21:13:44 +01:00
mem.h um: Replace to_phys() and to_virt() with less generic function names 2022-07-17 23:44:40 +02:00
mem_user.h um: header debriding - mem_user.h 2021-12-21 21:31:35 +01:00
net_kern.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
net_user.h um: header debriding - net_*.h 2021-12-21 21:31:35 +01:00
os.h um: seed rng using host OS rng 2022-07-18 15:04:04 +02:00
ptrace_user.h
registers.h um: stop polluting the namespace with registers.h contents 2021-12-21 21:31:35 +01:00
sigio.h um: header debriding - sigio.h 2021-12-21 21:31:36 +01:00
timetravel.h um: expose time-travel mode to userspace side 2021-06-17 21:44:51 +02:00
um_malloc.h
user.h uml: Replace strlcpy with strscpy 2023-06-20 13:35:37 -07:00