From patchwork Thu Jul 20 00:44:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuniyuki Iwashima X-Patchwork-Id: 13319666 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22E4819F for ; Thu, 20 Jul 2023 00:45:05 +0000 (UTC) Received: from smtp-fw-9106.amazon.com (smtp-fw-9106.amazon.com [207.171.188.206]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B13E31FFD for ; Wed, 19 Jul 2023 17:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1689813904; x=1721349904; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IuQyRUcPjQN/97CsMPtEb+quqU6Xf+VmEbrHlXWuHwM=; b=MngO38INwI+Ng8TvGu3zbU/G0F+bBg6lj+BQp1felSFSu1ggm8CYVvre ZpCJu7tmSUv89cP+4Y9AS3NU9QgxVXob+JQYOL6rS1dYHpb65hCLXzjTL ylMUFEehpfWp/C4xYWtnJUxU0AUS0Q+NayHT2HiZuOoa3+nGSYcGoz+K4 M=; X-IronPort-AV: E=Sophos;i="6.01,216,1684800000"; d="scan'208";a="660865785" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1a-m6i4x-9fe6ad2f.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-9106.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2023 00:44:58 +0000 Received: from EX19MTAUWC002.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1a-m6i4x-9fe6ad2f.us-east-1.amazon.com (Postfix) with ESMTPS id 86DA48043C; Thu, 20 Jul 2023 00:44:55 +0000 (UTC) Received: from EX19D004ANA001.ant.amazon.com (10.37.240.138) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 20 Jul 2023 00:44:46 +0000 Received: from 88665a182662.ant.amazon.com (10.106.101.39) by EX19D004ANA001.ant.amazon.com (10.37.240.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 20 Jul 2023 00:44:42 +0000 From: Kuniyuki Iwashima 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" , Subject: [PATCH v2 net 0/2] net: Fix error/warning by -fstrict-flex-arrays=3 Date: Wed, 19 Jul 2023 17:44:08 -0700 Message-ID: <20230720004410.87588-1-kuniyu@amazon.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.106.101.39] X-ClientProxiedBy: EX19D032UWB002.ant.amazon.com (10.13.139.190) To EX19D004ANA001.ant.amazon.com (10.37.240.138) Precedence: Bulk X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org 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: v2: * 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(). net/packet/af_packet.c | 7 ++++++- net/unix/af_unix.c | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-)