public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] replace deprecated strcpy with strscpy
@ 2024-08-27 11:35 Hongbo Li
  2024-08-27 11:35 ` [PATCH net-next 1/6] net: prefer strscpy over strcpy Hongbo Li
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Hongbo Li @ 2024-08-27 11:35 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, dsahern, ralf, jmaloy, ying.xue
  Cc: netdev, linux-hams, netfilter-devel

The deprecated helper strcpy() performs no bounds checking on the
destination buffer. This could result in linear overflows beyond
the end of the buffer, leading to all kinds of misbehaviors.
The safe replacement is strscpy() [1].

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]

Hongbo Li (6):
  net: prefer strscpy over strcpy
  net/ipv6: replace deprecated strcpy with strscpy
  net/netrom: prefer strscpy over strcpy
  net/netfilter: replace deprecated strcpy with strscpy
  net/tipc: replace deprecated strcpy with strscpy
  net/ipv4: net: prefer strscpy over strcpy

 net/core/dev.c                  | 2 +-
 net/ipv4/ip_tunnel.c            | 2 +-
 net/ipv4/netfilter/arp_tables.c | 2 +-
 net/ipv4/netfilter/ip_tables.c  | 2 +-
 net/ipv6/ndisc.c                | 2 +-
 net/netfilter/xt_recent.c       | 2 +-
 net/netrom/nr_route.c           | 4 ++--
 net/tipc/bearer.c               | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-08-28  8:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 11:35 [PATCH net-next 0/6] replace deprecated strcpy with strscpy Hongbo Li
2024-08-27 11:35 ` [PATCH net-next 1/6] net: prefer strscpy over strcpy Hongbo Li
2024-08-27 12:30   ` Dan Carpenter
2024-08-28  7:43     ` Hongbo Li
2024-08-28  8:54       ` Dan Carpenter
2024-08-27 11:35 ` [PATCH net-next 2/6] net/ipv6: replace deprecated strcpy with strscpy Hongbo Li
2024-08-27 11:35 ` [PATCH net-next 3/6] net/netrom: prefer strscpy over strcpy Hongbo Li
2024-08-27 11:35 ` [PATCH net-next 4/6] net/netfilter: replace deprecated strcpy with strscpy Hongbo Li
2024-08-27 11:35 ` [PATCH net-next 5/6] net/tipc: " Hongbo Li
2024-08-27 11:35 ` [PATCH net-next 6/6] net/ipv4: net: prefer strscpy over strcpy Hongbo Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox