From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEA9EC4708C for ; Tue, 6 Dec 2022 10:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233470AbiLFKiA (ORCPT ); Tue, 6 Dec 2022 05:38:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230450AbiLFKhw (ORCPT ); Tue, 6 Dec 2022 05:37:52 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F5BDFF4 for ; Tue, 6 Dec 2022 02:36:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670323018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D9WTzI07B2T90FQ6MBF1oIvNELJRpqkR308N9NI9I8E=; b=SB99WnPf9f6kGafyfbOktewcGCfDrvcu1b3i+msWfAh+WL2/ZLbSJftHUFpPXrwWlvWiHD VQalX8SMAnKeBXwj2I4WB1uDi0i5qjXclc60Vne+orHeg7cGwVbrexfyAdgV/BsFE7EDTP WCqgqL0YpDw22/YC62jYIB/P6Hzd8/0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-180-P_H1gjzhMMykIKA-7PCZCQ-1; Tue, 06 Dec 2022 05:36:57 -0500 X-MC-Unique: P_H1gjzhMMykIKA-7PCZCQ-1 Received: by mail-wr1-f71.google.com with SMTP id h10-20020adfaa8a000000b0024208cf285eso3119035wrc.22 for ; Tue, 06 Dec 2022 02:36:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=D9WTzI07B2T90FQ6MBF1oIvNELJRpqkR308N9NI9I8E=; b=O7ss7/0+fLGoRVoGYtVJbBxze2QMkRwe7vhKhAIWmeFUyPVbWxkrXh5vBUNpm/2t1E K5ICXFGJ7gQPRsVQWLBV3T0dA95FTKvQ4X5EnpwT/RSjuHbkyFgV+tnq61zdhwEkERLr Lgu9kyxhDnWe91cSUYt2RP4MuAs9ECHllTEd0gAQzBU1UR9FKH+xwIS+6eoTq+mwUVAA QTgj6UktTtZ+23BSRLhzZef9UPZH1xD1WoFyJcf92AgdXhZCj1ETOXDHgybDsZEMCUbE dpxBTTP6d9H9fRObzuLOtOl97jP4VMypUynWeezM3aBLzXlOA/D5yF0C9x4xRBj/2Z0N jAhw== X-Gm-Message-State: ANoB5pk591BpxacF77bKTtZGa+uv0boNn8sDoUbf3t8D7E3S6ngBs4Or necKED1T1AFSYy+LPDXjl2Su0D9PYsQP4vUAEh3iViQOBGJIevXgBypfjusL2L0ScHUSQdV04ts EKTArlwknUDR3t6TCmIdewg+t X-Received: by 2002:a5d:6101:0:b0:242:46d0:3ee1 with SMTP id v1-20020a5d6101000000b0024246d03ee1mr10075199wrt.315.1670323015969; Tue, 06 Dec 2022 02:36:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4hdCTFiVaTLif2boeNw/kxGbQScPuaS1un/J2RGjn40Favi8QTQ0cVDhBrer5EXpUMnibKEw== X-Received: by 2002:a5d:6101:0:b0:242:46d0:3ee1 with SMTP id v1-20020a5d6101000000b0024246d03ee1mr10075190wrt.315.1670323015747; Tue, 06 Dec 2022 02:36:55 -0800 (PST) Received: from gerbillo.redhat.com (146-241-106-100.dyn.eolo.it. [146.241.106.100]) by smtp.gmail.com with ESMTPSA id v128-20020a1cac86000000b003cfa80443a0sm20734164wme.35.2022.12.06.02.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 02:36:55 -0800 (PST) Message-ID: Subject: Re: [PATCH] net/ncsi: Silence runtime memcpy() false positive warning From: Paolo Abeni To: Kees Cook , Samuel Mendoza-Jonas Cc: Joel Stanley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Date: Tue, 06 Dec 2022 11:36:54 +0100 In-Reply-To: <20221202212418.never.837-kees@kernel.org> References: <20221202212418.never.837-kees@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, 2022-12-02 at 13:24 -0800, Kees Cook wrote: > The memcpy() in ncsi_cmd_handler_oem deserializes nca->data into a > flexible array structure that overlapping with non-flex-array members > (mfr_id) intentionally. Since the mem_to_flex() API is not finished, > temporarily silence this warning, since it is a false positive, using > unsafe_memcpy(). > > Reported-by: Joel Stanley > Link: https://lore.kernel.org/netdev/CACPK8Xdfi=OJKP0x0D1w87fQeFZ4A2DP2qzGCRcuVbpU-9=4sQ@mail.gmail.com/ > Cc: Samuel Mendoza-Jonas > Cc: "David S. Miller" > Cc: Eric Dumazet > Cc: Jakub Kicinski > Cc: Paolo Abeni > Cc: netdev@vger.kernel.org > Signed-off-by: Kees Cook Is this for the -net or the -net-next tree? It applies to both... It you are targetting the -net tree, I think it would be nicer adding a suitable Fixes tag. Thanks! Paolo