Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1100295rwd; Thu, 1 Jun 2023 10:25:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/WALEQvaBz+113RoI7s7r/Z0PA/fGKftdjzx6zw33okS7bElkI8S31lMmha47yJFFgJyB X-Received: by 2002:a05:6a00:a01:b0:63d:2f13:200 with SMTP id p1-20020a056a000a0100b0063d2f130200mr8810676pfh.16.1685640323066; Thu, 01 Jun 2023 10:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685640323; cv=none; d=google.com; s=arc-20160816; b=iL7gBSHb0X0HMw3t5pyGYORjxDCDdqB3CBfwKLWyoTXL2hoekX8sLYliEC7/iZT7lC sWQmIUb4ItFhPeDIcf0ND5A/Gss1OfwNrK9sND96usLOyJVUVg2ohC3kNL5Ewnvb+UfI 0fX0S414Irt5OtBg4ALIcZWEKUheaf65HMjuj4UNJ3TXzoTRAiJoxGz1RCFrCFQI+c3s G30Hoko4eEpy6D+ifX7zKTe8wd8ITjSu9t5jSwqo9Rw3Nn6pBZ427MGDoJVAq2atWwvL PiLzuAeDCMrz33LbgdABt8wikhU1o4RXsNxhrQnmCpbY6f+UdQICQ3NUwunjlSO9V1lG h26Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HrJa2npduVqPVBdceO1uTgmstERDSfC0tCDcUBY0Kok=; b=Gf8CoKzYRoOvjthjpPmu+qvdXvQ1jTIcQB8syB1DEE9TyP+O8SGXgBs4gIlKr7Mvqg NOGuHDnLAhwIzSNFiOQ3G+zDYlxtvhIvPH/Vayk6I+JRXYPlRRe1pSbelXJ2PEFVEf2C PKmAjWUKxQHrTEfzWyP4yN4652sq1HtFWIFspru+qcaWEUc+knOHyZ69HiecqngNwnmB EYuG70t/6R3WWQaa5bzzGGQ/+36HDww7exFsmMtr/x+4JAOAfcsd5sOXKf9LKggVKnKm RJB2KWF+2lRh8CLJWlU/dTMvE52V0XT2bsi06dCSEcVSiQfpUHvXwoooeLLOwmaoN97l SVjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Evy09YWI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g139-20020a625291000000b0064d72c9a2d8si5812400pfb.53.2023.06.01.10.25.10; Thu, 01 Jun 2023 10:25:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Evy09YWI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230483AbjFAQ6Y (ORCPT + 99 others); Thu, 1 Jun 2023 12:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjFAQ6V (ORCPT ); Thu, 1 Jun 2023 12:58:21 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD3B10D0 for ; Thu, 1 Jun 2023 09:57:54 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-33d07bf83fcso3841915ab.0 for ; Thu, 01 Jun 2023 09:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685638673; x=1688230673; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HrJa2npduVqPVBdceO1uTgmstERDSfC0tCDcUBY0Kok=; b=Evy09YWIDeiRfZ7iWYo4Nfvi6VdHZvCiX00d75eU3bHNnDMH1PP4/Le5ci7VflkSpd JmjLBbFFoOTgBGm0i9nAEib42qojFCuLafQoTMTEjS22TERBI0gUSPvlM4nDSN+i5O84 /8ytsl3rR/Dcrt4qmQkZEo4/5TtCJvuUJCTBM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685638673; x=1688230673; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HrJa2npduVqPVBdceO1uTgmstERDSfC0tCDcUBY0Kok=; b=JPWVoI6k1f3o03O5TpsD3wmOhSPrvKP+OBmaTDD6QexOy81Dp15gjaZegobEdPAmdm ShTsJK88bBBU50mpChOVIGqZRSjA3EHiDl41KjQ8dQTGQx6HxyHWV/U4bD7vw2GjqnyL FkV1D7Hg2tnPXDrvjUYommBiRy63b/mFchqkvL1Ef7fJnC46mAzPugvoOrPSaeUBSKZz lMQjxzMo3sOtK7msJ5ZC35fQZBnYXkgl9RVORrEaGBpk2gLzJTPlFA37LTIhyaD/zpWe 94/qNb06WWwKkzZkojNmjrGnyC0YH7CdYpvhB2dJfVy4nfdTlXU1VoYCuG2xg2GlUks8 RnPg== X-Gm-Message-State: AC+VfDxbsnw9QSThVZAxarW6IDgfflFQYeNWzJM7udledeJgDr2B54h0 nYWeUoxM4U5cTYp+UtTRY30sHg== X-Received: by 2002:a92:cc01:0:b0:33a:5ec7:e07f with SMTP id s1-20020a92cc01000000b0033a5ec7e07fmr6184222ilp.5.1685638673689; Thu, 01 Jun 2023 09:57:53 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id x11-20020a63cc0b000000b0053f2037d639sm3394389pgf.81.2023.06.01.09.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 09:57:53 -0700 (PDT) From: Kees Cook To: tglx@linutronix.de, keescook@chromium.org Cc: masahiroy@kernel.org, mingo@redhat.com, joanbrugueram@gmail.com, peterz@infradead.org, hi@alyssa.is, glider@google.com, dave.hansen@linux.intel.com, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux@leemhuis.info, samitolvanen@google.com, hpa@zytor.com, ndesaulniers@google.com, bp@alien8.de, gustavoars@kernel.org, x86@kernel.org Subject: Re: [PATCH] x86/purgatory: Do not use fortified string functions Date: Thu, 1 Jun 2023 09:57:49 -0700 Message-Id: <168563866754.2890079.16297092272263772482.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230531003345.never.325-kees@kernel.org> References: <20230531003345.never.325-kees@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 May 2023 17:33:48 -0700, Kees Cook wrote: > With the addition of -fstrict-flex-arrays=3, struct sha256_state's > trailing array is no longer ignored by CONFIG_FORTIFY_SOURCE: > > struct sha256_state { > u32 state[SHA256_DIGEST_SIZE / 4]; > u64 count; > u8 buf[SHA256_BLOCK_SIZE]; > }; > > [...] Applied to for-next/hardening, thanks! [1/1] x86/purgatory: Do not use fortified string functions https://git.kernel.org/kees/c/f6ab7fc96a53 -- Kees Cook