No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Amir Mohammad Jahangirzad 6ade15765e fs/orangefs: use snprintf() instead of sprintf()
[ Upstream commit cdfa1304657d6f23be8fd2bb0516380a3c89034e ]

sprintf() is discouraged for use with bounded destination buffers
as it does not prevent buffer overflows when the formatted output
exceeds the destination buffer size. snprintf() is a safer
alternative as it limits the number of bytes written and ensures
NUL-termination.

Replace sprintf() with snprintf() for copying the debug string
into a temporary buffer, using ORANGEFS_MAX_DEBUG_STRING_LEN as
the maximum size to ensure safe formatting and prevent memory
corruption in edge cases.

EDIT: After this patch sat on linux-next for a few days, Dan
Carpenter saw it and suggested that I use scnprintf instead of
snprintf. I made the change and retested.

Signed-off-by: Amir Mohammad Jahangirzad <a.jahangirzad@gmail.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-28 16:21:27 +02:00
arch (powerpc/512) Fix possible dma_unmap_single() on uninitialized pointer 2025-08-28 16:21:26 +02:00
block
certs
crypto
Documentation
drivers scsi: libiscsi: Initialize iscsi_conn->dd_data only if memory is allocated 2025-08-28 16:21:27 +02:00
fs fs/orangefs: use snprintf() instead of sprintf() 2025-08-28 16:21:27 +02:00
include uapi: in6: restore visibility of most IPv6 socket options 2025-08-28 16:21:27 +02:00
init
ipc
kernel rcu: Protect ->defer_qs_iw_pending from data race 2025-08-28 16:21:26 +02:00
lib
LICENSES
mm
net net: ncsi: Fix buffer overflow in fetching version id 2025-08-28 16:21:27 +02:00
samples
scripts
security
sound ASoC: codecs: rt5640: Retry DEVICE_ID verification 2025-08-28 16:21:26 +02:00
tools ktest.pl: Prevent recursion of default variable options 2025-08-28 16:21:26 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
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.