Go to file
Kees Cook e28b035958 bcachefs: 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].
Additionally, it returns the size of the source string, not the
resulting size of the destination string. In an effort to remove strlcpy()
completely[2], replace strlcpy() here with strscpy().

Nothing checks the return value here, so a direct replacement with
strspy() is possible.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1]
Link: https://github.com/KSPP/linux/issues/89 [2]
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Brian Foster <bfoster@redhat.com>
Cc:  <linux-bcachefs@vger.kernel.org>
Link: https://lore.kernel.org/r/20240110235438.work.385-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
2024-01-18 12:29:21 -08:00
Documentation USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
arch USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
block for-6.8/block-2024-01-08 2024-01-11 13:58:04 -08:00
certs This update includes the following changes: 2023-11-02 16:15:30 -10:00
crypto crypto: scomp - fix req->dst buffer overflow 2023-12-29 11:25:56 +08:00
drivers USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
fs bcachefs: Replace strlcpy() with strscpy() 2024-01-18 12:29:21 -08:00
include USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
init Driver core changes for 6.8-rc1 2024-01-18 09:48:40 -08:00
io_uring Generic: 2024-01-17 13:03:37 -08:00
ipc shm: Slim down dependencies 2023-12-20 19:26:31 -05:00
kernel Fix a cpufreq related performance regression on certain systems, 2024-01-18 11:57:33 -08:00
lib 17 hotfixes. 10 address post-6.7 issues and the other 7 are cc:stable. 2024-01-17 09:31:36 -08:00
mm Generic: 2024-01-17 13:03:37 -08:00
net TTY/Serial changes for 6.8-rc1 2024-01-18 11:37:24 -08:00
rust Rust changes for v6.8 2024-01-11 13:05:41 -08:00
samples media updates for v6.8-rc1 2024-01-12 14:29:48 -08:00
scripts Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
security misc cleanups (the part that hadn't been picked by individual fs trees) 2024-01-11 20:23:50 -08:00
sound TTY/Serial changes for 6.8-rc1 2024-01-18 11:37:24 -08:00
tools Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
usr usr/Kconfig: fix typos of "its" 2023-12-20 15:02:58 -08:00
virt Generic: 2024-01-17 13:03:37 -08:00
.clang-format clang-format: Update with v6.7-rc4's `for_each` macro list 2023-12-08 23:54:38 +01:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/ 2023-10-03 20:49:09 +09:00
.mailmap Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
.rustfmt.toml rust: add `.rustfmt.toml` 2022-09-28 09:02:20 +02:00
COPYING
CREDITS Staging driver changes for 6.8-rc1 2024-01-18 10:30:48 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS TTY/Serial changes for 6.8-rc1 2024-01-18 11:37:24 -08:00
Makefile Quite a lot of kexec work this time around. Many singleton patches in 2024-01-09 11:46:20 -08:00
README

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.