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 X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FD1BC48BE5 for ; Thu, 17 Jun 2021 19:30:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BA43610CD for ; Thu, 17 Jun 2021 19:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232881AbhFQTcV (ORCPT ); Thu, 17 Jun 2021 15:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232650AbhFQTcT (ORCPT ); Thu, 17 Jun 2021 15:32:19 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B647C061760 for ; Thu, 17 Jun 2021 12:30:10 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id 13-20020a17090a08cdb029016eed209ca4so4478453pjn.1 for ; Thu, 17 Jun 2021 12:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Hrorq9wqViQmhGOFFkZLIlBQLP9XRCmNAgszGBG5cNM=; b=UjhBFmj53egtMyJ00ZkClVrgAfvnWzTHeO08/1NVtWDVFp8yUJq6gbvTejf1cL8coa ObV+c50VD3mJAHyHt3uHFnS5r9Zpd7tJaP8Te3HYKJ3f9URNkPVzJ2Uq6wIJFO3kCGKR m4ob7/oHFin0TmKke8zNIXawcadc37nU0tdnQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Hrorq9wqViQmhGOFFkZLIlBQLP9XRCmNAgszGBG5cNM=; b=Bz9B5p97bTvZSaBUUBlULwGdiJH7RNZmtMHt/VUaqMFzxHzRgrGF8tXyOZUnm6gB9K +i3k3Y98PavmCrrIahsHb8PV3iZpxvmME0NWcN8Aa4UVur2Gqjf0BKG6v9mqTspo6rA+ iJ5xw8YKcHnwrdLitxErQiL18osBxFY4063eO5Xf71+YDmbkhOB5RFqI6yEYp/msTrsT 8uSW1G8xZZsjn39JvL7NrxaWjaIfgvMLg7IM4mysOF5RbTXuwbafWLi6x6DmwwxsxDIN my4EQZKzaL7hbFN+NH/TDO/N3aKvCLLRNKid/R+7lzMi8UO/5GU0N1mc2BOTVGz3M39U bTeQ== X-Gm-Message-State: AOAM5302Lhtgqn3Nm+vnKGwIHjHNgxpttvTXUznVOg51LBs5pFXiklVm gx38v7IPWNbesxcLfOEHVB7YsA== X-Google-Smtp-Source: ABdhPJwtWc5aurHGuviL31BSdk7TdiEElg8wfkdeWP/DnCBN+SPkw5EaYw3o2oW7ePgTHEHPnG8XEg== X-Received: by 2002:a17:90a:9f81:: with SMTP id o1mr17428279pjp.96.1623958209933; Thu, 17 Jun 2021 12:30:09 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t12sm6112590pfc.133.2021.06.17.12.30.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 12:30:09 -0700 (PDT) Date: Thu, 17 Jun 2021 12:30:08 -0700 From: Kees Cook To: netdev@vger.kernel.org Cc: Johannes Berg , "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] mac80211: Recast pointer for trailing memcpy() Message-ID: <202106171229.824139CA76@keescook> References: <20210617042709.2170111-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210617042709.2170111-1-keescook@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 16, 2021 at 09:27:09PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring array fields. > > Give memcpy() a specific source pointer type so it can correctly > calculate the bounds of the copy. Hmpf, please ignore this patch; sorry for the noise. This fix got mis-tested on my end and does not solve the problem I was trying to solve. I will return with a v2. :) -- Kees Cook