linux-stable/include
Azeem Shaikh 2933d3cd07 tracing: Replace strlcpy with strscpy in trace/events/task.h
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

Link: https://lore.kernel.org/linux-trace-kernel/20230831194212.1529941-1-azeemshaikh38@gmail.com

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-09-01 21:00:00 -04:00
..
acpi Merge branches 'acpi-scan', 'acpi-tad', 'acpi-extlog' and 'acpi-misc' 2023-08-25 20:49:52 +02:00
asm-generic RISC-V Patches for the 6.6 Merge Window, Part 1 2023-09-01 08:09:48 -07:00
clocksource
crypto This update includes the following changes: 2023-08-29 11:23:29 -07:00
drm drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
dt-bindings Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
keys
kunit - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
kvm
linux Tracing updates for 6.6: 2023-09-01 16:34:25 -07:00
math-emu
media media updates for v6.6-rc1 2023-09-01 12:21:32 -07:00
memory
misc
net sysctl-6.6-rc1 2023-08-29 17:39:15 -07:00
pcmcia
ras
rdma
rv rv: Set variable 'da_mon_##name' to static 2023-09-01 21:00:00 -04:00
scsi
soc This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
sound ASoC: Updates for v6.6 2023-08-28 16:13:03 +02:00
target
trace tracing: Replace strlcpy with strscpy in trace/events/task.h 2023-09-01 21:00:00 -04:00
uapi cgroup: Changes for v6.6 2023-09-01 15:58:21 -07:00
ufs
vdso
video
xen dma-maping updates for Linux 6.6 2023-08-29 20:32:10 -07:00