From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 152EE3481 for ; Sat, 31 Jul 2021 15:01:59 +0000 (UTC) Received: by mail-pj1-f43.google.com with SMTP id k4-20020a17090a5144b02901731c776526so25078716pjm.4 for ; Sat, 31 Jul 2021 08:01:59 -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=6NzNWl7LhGEt5gulXFub5aIXRWGd7b+RfXfHU7IL/eI=; b=Jx/NovSJ2alFyoaVfse4LYGuhNMlBcAWv6JTiM3YSwvodvaXCAulhewOn2HF0FC+nz N7t2fd02SxFeFS/jAywZfBDu3dF82py23YxGadXmxU6FsZZNwFLKknaPYZ73JtAAQWAr FgjDEpjlNdXTBhWlUNhxTGhy3p9i8wqoga8qo= 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=6NzNWl7LhGEt5gulXFub5aIXRWGd7b+RfXfHU7IL/eI=; b=IMvNvuRVwEU4TcJCWR9dzEstysKFmKbY4ZM8hWlSnqqK27oDeuJFoV0gaREU4iAF1t sgmpzC+wdmlQHkwiS0ngHDEVftbJlneLk4igo79F/pfGdIAgL+nhAqMiv9xPybKRPDc8 oYR298IHubyZUnQahjc223rKh/mczDTEvrgL/aomaD17sX1PXTH5LGZJZA2XJ/lAlNcR T/rYvCmryrIcyzDxGDJAgyWwstL94Y31+cEnN3P54e/4GJyYWngxAM/iXbSaqh7Bj3kx UxYsZFFyVu5KpoyhE1UzY9RcFFvMMgBQR7A0GuYW2dU0ExwsCSsclnNEu3VQMjAU/jN2 3+oQ== X-Gm-Message-State: AOAM532UA4J1M6+YYFOzDydwtYc47xJUq6YnZES/YhR33z2KkZqYggz3 eSPnHQYO8gvPfiDaDPFWySPAjw== X-Google-Smtp-Source: ABdhPJxldKFq/Rzqofqxn4rJbNcLhr5hYJ4ZeyAVRbwaYS9Cd10PchwbLiRXEC7+1Qe+4tL2UtPocg== X-Received: by 2002:a65:53ce:: with SMTP id z14mr2617394pgr.275.1627743719538; Sat, 31 Jul 2021 08:01:59 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id jz24sm1857832pjb.9.2021.07.31.08.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 08:01:58 -0700 (PDT) Date: Sat, 31 Jul 2021 08:01:57 -0700 From: Kees Cook To: Jakub Kicinski Cc: linux-hardening@vger.kernel.org, "Gustavo A. R. Silva" , Keith Packard , Greg Kroah-Hartman , Andrew Morton , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-staging@lists.linux.dev, linux-block@vger.kernel.org, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH 54/64] ipv6: Use struct_group() to zero rt6_info Message-ID: <202107310801.D50070F@keescook> References: <20210727205855.411487-1-keescook@chromium.org> <20210727205855.411487-55-keescook@chromium.org> <20210729115850.7f913c73@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210729115850.7f913c73@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> On Thu, Jul 29, 2021 at 11:58:50AM -0700, Jakub Kicinski wrote: > On Tue, 27 Jul 2021 13:58:45 -0700 Kees Cook wrote: > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > field bounds checking for memset(), avoid intentionally writing across > > neighboring fields. > > > > Add struct_group() to mark region of struct rt6_info that should be > > initialized to zero. > > memset_after() ? Oh, hah. Yes. I will adjust for v2. -- Kees Cook