[PATCH v8 00/18] fix format overflows in libraries
Stephen Hemminger
stephen at networkplumber.org
Sun Dec 28 19:56:03 CET 2025
Change all the libraries to find and fix cases where a string
could overflow when formatting or using strclpy. This does provide
early indication of possible problems where the file prefix is too
long to fit in unix domain socket path, and where a hash table
is being requested that has a name too long.
v8 - small changes such as adding updates to docbook comments
and avoiding asprintf where not needed
Stephen Hemminger (18):
lpm: restrict name size
hash: add checks for hash name length
graph: avoid overflowing comment buffer
latencystats: add check for string overflow
telemetry: check for path overflow
efd: handle possible name truncation
eal: use C library to parse filesystem table
eal: warn if thread name is truncated
eal: avoid format overflow when handling addresses
eal: add check for sysfs path overflow
eal: limit maximum runtime directory and socket paths
eal: check for hugefile path overflow
eal: check tailq length
eal: handle long shared library path
ethdev: avoid possible overflow in xstat names
vhost: check for overflow in xstat name
cfgfile: add length checks and increase line buffer
lib: enable format overflow warnings
app/test/test_hash.c | 21 ++++++
doc/guides/rel_notes/release_26_03.rst | 3 +
lib/cfgfile/rte_cfgfile.c | 43 ++++++++---
lib/cfgfile/rte_cfgfile.h | 6 +-
lib/eal/common/eal_common_config.c | 6 +-
lib/eal/common/eal_common_memory.c | 2 +-
lib/eal/common/eal_common_options.c | 17 +++--
lib/eal/common/eal_common_proc.c | 83 ++++++++++++++--------
lib/eal/common/eal_common_tailqs.c | 13 +++-
lib/eal/common/eal_filesystem.h | 23 ++++--
lib/eal/freebsd/eal.c | 6 +-
lib/eal/linux/eal.c | 6 +-
lib/eal/linux/eal_hugepage_info.c | 98 ++++++++++++--------------
lib/eal/linux/eal_memalloc.c | 11 ++-
lib/eal/linux/eal_memory.c | 9 ++-
lib/eal/windows/eal.c | 6 +-
lib/efd/rte_efd.c | 18 +++--
lib/ethdev/rte_ethdev.c | 35 ++++++---
lib/graph/graph_pcap.c | 9 ++-
lib/hash/rte_cuckoo_hash.c | 41 +++++++----
lib/hash/rte_fbk_hash.c | 12 +++-
lib/hash/rte_fbk_hash.h | 1 +
lib/latencystats/rte_latencystats.c | 9 ++-
lib/lpm/rte_lpm.c | 16 +++--
lib/lpm/rte_lpm.h | 1 +
lib/meson.build | 4 --
lib/telemetry/telemetry_legacy.c | 7 +-
lib/vhost/vhost.c | 14 ++--
28 files changed, 354 insertions(+), 166 deletions(-)
--
2.51.0
More information about the dev
mailing list