3
0
Fork 0
forked from mirrors/linux
kernel/net/rds
Baris Can Goral 5bccdc51f9 replace strncpy with strscpy_pad
The strncpy() function is actively dangerous to use since it may not
NULL-terminate the destination string, resulting in potential memory
content exposures, unbounded reads, or crashes.
Link: https://github.com/KSPP/linux/issues/90

In addition, strscpy_pad is more appropriate because it also zero-fills
any remaining space in the destination if the source is shorter than
the provided buffer size.

Signed-off-by: Baris Can Goral <goralbaris@gmail.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Link: https://patch.msgid.link/20250521161036.14489-1-goralbaris@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-05-26 22:28:44 +02:00
..
af_rds.c net/rds: Fix UBSAN: array-index-out-of-bounds in rds_cmsg_recv 2024-01-22 11:24:00 +00:00
bind.c
cong.c
connection.c replace strncpy with strscpy_pad 2025-05-26 22:28:44 +02:00
ib.c
ib.h RDS: IB: Remove unused declarations 2024-08-01 09:03:28 -07:00
ib_cm.c
ib_frmr.c
ib_mr.h
ib_rdma.c net/rds: remove unused struct 'rds_ib_dereg_odp_mr' 2024-10-03 16:42:52 -07:00
ib_recv.c net: add missing includes of linux/sched/clock.h 2023-01-27 11:19:46 +00:00
ib_ring.c
ib_send.c
ib_stats.c
ib_sysctl.c net: rds: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
info.c
info.h
Kconfig net: rds: add option for GCOV profiling 2024-08-09 13:18:46 +01:00
loop.c
loop.h
Makefile net: rds: add option for GCOV profiling 2024-08-09 13:18:46 +01:00
message.c rds: rds_rm_zerocopy_callback() correct order for list_add_tail() 2023-02-13 09:33:39 +00:00
page.c rds: Use nested-BH locking for rds_page_remainder 2025-05-15 15:23:31 +02:00
rdma.c net/rds: fix possible cp null dereference 2024-03-29 12:04:09 -07:00
rdma_transport.c net: rds: Fix possible NULL-pointer dereference 2023-09-20 08:49:03 +01:00
rdma_transport.h net/rds: Remove unused function declarations 2023-08-13 12:25:42 +01:00
rds.h net/rds: Remove unused function declarations 2023-08-13 12:25:42 +01:00
rds_single_path.h
recv.c net:rds: Fix possible deadlock in rds_message_put 2024-02-13 10:25:30 +01:00
send.c rds: introduce acquire/release ordering in acquire/release_in_xmit() 2024-03-19 12:15:35 +01:00
stats.c net/rds: Replace deprecated strncpy() with strscpy_pad() 2025-02-21 15:51:26 -08:00
sysctl.c net: rds: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
tcp.c net: better track kernel sockets lifetime 2025-02-21 16:00:58 -08:00
tcp.h net/rds: Remove unused function declarations 2023-08-13 12:25:42 +01:00
tcp_connect.c net: prevent address rewrite in kernel_bind() 2023-10-01 19:31:29 +01:00
tcp_listen.c net: change proto and proto_ops accept type 2024-05-13 18:19:09 -06:00
tcp_recv.c rds:Simplify the allocation of slab caches 2024-06-19 10:47:40 +01:00
tcp_send.c rds: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage 2023-06-24 15:50:12 -07:00
tcp_stats.c
threads.c
transport.c