Main-line Linux kernel tree http://www.kernel.org
Go to file
Azeem Shaikh 7f09a3a09f drm/amd/pm: 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

Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230522155245.2336818-1-azeemshaikh38@gmail.com
2023-05-26 13:52:19 -07:00
arch parisc architecture fixes for kernel v6.4-rc2: 2023-05-14 09:54:38 -07:00
block
certs
crypto
Documentation
drivers drm/amd/pm: Replace all non-returning strlcpy with strscpy 2023-05-26 13:52:19 -07:00
fs vboxsf: Replace all non-returning strlcpy with strscpy 2023-05-22 12:35:14 -07:00
include fortify: strcat: Move definition to use fortified strlcat() 2023-05-16 14:15:45 -07:00
init
io_uring
ipc
kernel tracing: Replace all non-returning strlcpy with strscpy 2023-05-26 13:52:19 -07:00
lib ubsan: remove cc-option test for UBSAN_TRAP 2023-05-17 12:01:54 -07:00
LICENSES
mm
net
rust
samples
scripts ubsan: Tighten UBSAN_BOUNDS on GCC 2023-05-16 13:57:14 -07:00
security
sound
tools kunit: tool: Enable CONFIG_FORTIFY_SOURCE under UML 2023-05-16 14:07:05 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS string: Add Kunit tests for strcat() family 2023-05-16 14:08:02 -07:00
Makefile kbuild: Enable -fstrict-flex-arrays=3 2023-05-22 12:33:53 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.