netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net 0/2] net: Fix error/warning by -fstrict-flex-arrays=3.
@ 2023-07-24 21:34 Kuniyuki Iwashima
  2023-07-24 21:34 ` [PATCH v3 net 1/2] af_unix: Fix fortify_panic() in unix_bind_bsd() Kuniyuki Iwashima
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Kuniyuki Iwashima @ 2023-07-24 21:34 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Willem de Bruijn, Kees Cook, Gustavo A. R. Silva, Breno Leitao,
	Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") started applying
strict rules for standard string functions (strlen(), memcpy(), etc.) if
CONFIG_FORTIFY_SOURCE=y.

This series fixes two false positives caught by syzkaller.


Changes:
  v3:
    * Drop Reviewed-by
    * Patch 1: Use strnlen()
    * Patch 2: Add a new flex array member

  v2: https://lore.kernel.org/netdev/20230720004410.87588-1-kuniyu@amazon.com/
    * Patch 2: Fix offset calc.

  v1: https://lore.kernel.org/netdev/20230719185322.44255-1-kuniyu@amazon.com/


Kuniyuki Iwashima (2):
  af_unix: Fix fortify_panic() in unix_bind_bsd().
  af_packet: Fix warning of fortified memcpy() in packet_getname().

 include/uapi/linux/if_packet.h | 6 +++++-
 net/packet/af_packet.c         | 2 +-
 net/unix/af_unix.c             | 6 ++----
 3 files changed, 8 insertions(+), 6 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2023-07-26 22:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24 21:34 [PATCH v3 net 0/2] net: Fix error/warning by -fstrict-flex-arrays=3 Kuniyuki Iwashima
2023-07-24 21:34 ` [PATCH v3 net 1/2] af_unix: Fix fortify_panic() in unix_bind_bsd() Kuniyuki Iwashima
2023-07-26 13:52   ` kernel test robot
2023-07-26 16:19     ` Kuniyuki Iwashima
2023-07-26 22:02       ` Kees Cook
2023-07-24 21:34 ` [PATCH v3 net 2/2] af_packet: Fix warning of fortified memcpy() in packet_getname() Kuniyuki Iwashima
2023-07-25 17:25 ` [PATCH v3 net 0/2] net: Fix error/warning by -fstrict-flex-arrays=3 Simon Horman
2023-07-25 18:05 ` Kees Cook
2023-07-26  3:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).