Skip to content

net: Fix error/warning by -fstrict-flex-arrays=3.

Kuniyuki Iwashima netdev oe-lkp 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesApplied 2/2
  2. v22 patches 5 repliesSuperseded
  3. v12 patches 9 repliesSuperseded

Changes in v3 from the cover letter

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

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2af_unix: Fix fortify_panic() in unix_bind_bsd().net/unix/af_unix.c+2 -42 repliesApplied
2/2af_packet: Fix warning of fortified memcpy() in packet_getname().include/uapi/linux/if_packet.h net/packet/af_packet.c+6 -20 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSimon HormanKees Cook
SeriesR-b R-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 net 0/2] net: Fix error/warning by -fstrict-flex-arrays=3.

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/[email protected]/
* Patch 2: Fix offset calc.

v1: https://lore.kernel.org/netdev/[email protected]/

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(-)
Signature · 1 line
2.30.2