From patchwork Fri Dec 23 18:10:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 36317 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp450750wrn; Fri, 23 Dec 2022 10:16:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXtwIkX/J7IoSOYlxe0Rq7ckkiGUnRkROwhpalLijEcWRKo5WTtY2rAQdhIbINjBTV12wAWa X-Received: by 2002:a17:906:30c2:b0:7ae:c0b:a25c with SMTP id b2-20020a17090630c200b007ae0c0ba25cmr8283542ejb.13.1671819364534; Fri, 23 Dec 2022 10:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671819364; cv=none; d=google.com; s=arc-20160816; b=O4Bnu341NfW66LDhwHba+M1GyLhvnvwRbLbFF6q17AgaQs11BK3JI366YnMXiwaH9h H5g/xc9qVPE5jinb43cEcWs4CvKPgZtPsCGlhK5KGJjyD1NQU1IySeoC+cqOxYy+pxSx DJtNBEqN6SfSH75e8EXOJ1HEyHa7A9scHaC+zg/FVsUlLQ0ny9lHOctVB3xtyukbaZ2W a7nS3kpvuFFHWxRWGqUgyRIGCufPL+phFbRsLEsV5rSP1SiqvRQ6uIW2IeT2Q0TXtjS/ it4xt8HozmjQLVrEyl6k+cLJsrTNPfL3dZYDD1DrpugT6VQUGWaAosIZpCPIC1wa2xpM KtJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=3+W6znzYikgthIHqAsodQzTODii43I4pz6o86CSVkKY=; b=Gm44ZFZXFogpWz9BICzBbJGsXhZPkANeVoCaSM3HcJCm0fLhFmOyIZ3xTByQuQJ+RB X7qx8M9q7Sylu9EK9ijwMHLgef/Awi9OvE5hY3VRN4Y/+TYSTwj5761hwJ6lJcDa7QuY AficIO1dLAsQclNGrd/KQ8P1pBUSZxD9zJy8D2712+9q6S7ryDSfMVvCD3wy5UhgzGv6 p+Lchlxe/XO+AMEUOa/W1z/6H4yc57bJlDA3LNaNxP9FObasXbpc8PtsdllVAigipzg8 86vTHVoFxL1P9/8gYlVM9McZl2mU4zth16+6MSsF54xNf9+R2/1JOjoS8oM64wHT+c8c sqSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NlxFzFp6; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz1-20020a1709072ce100b007c17b2f6ba7si3308055ejc.1000.2022.12.23.10.15.40; Fri, 23 Dec 2022 10:16:04 -0800 (PST) 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=NlxFzFp6; 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 S232830AbiLWSKd (ORCPT + 99 others); Fri, 23 Dec 2022 13:10:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230489AbiLWSKa (ORCPT ); Fri, 23 Dec 2022 13:10:30 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F16415A35 for ; Fri, 23 Dec 2022 10:10:21 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id t2so5609843ply.2 for ; Fri, 23 Dec 2022 10:10:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=3+W6znzYikgthIHqAsodQzTODii43I4pz6o86CSVkKY=; b=NlxFzFp6oxhdJwdm+cyc7GSZ5WJfeNogbUly2rKcbycHh9aBY/vO1gIiMTnoRjQ8xQ JjKiW2lody/8COOPqjoaDGWHHbuYINcwBh0xKkEF3DZUBwDExEwlSdbgjnYRt3M8Tuvg 2DFn9Rk2qE9RSyWXqO003OUNPjC74700ZcM1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3+W6znzYikgthIHqAsodQzTODii43I4pz6o86CSVkKY=; b=mi5SSkKCfQ56nERW7CzUdR0/Tcj4w/MH9wa2Edst3kb7euLA7BYuALSmXHWVvXw5VW sTDaFZlnIYMqKcNFpaB8eu1S61sAlFWpRGcfmAI1wIWHAWNlgPeEqr99A2VuybtcCu2x IU+YqtUha83okkI4D5A/HtQ5tKQZcKfh/9TPhLfVr7hYFQ+y1vhKdsEcNPXpC8f2hNBJ nb8wlZRhbze3UFDQCUA2ckW1QO7K67Ir96PH3WPvPKDeGWovBleecy8tCYtfntCdRZXU r9hhVgIK3/Y2r0L88Tbfb6KVXwV/yW4XZOMODfF8aapJ8SImXR+Pk2cyW38PqFuXFTLt bHvA== X-Gm-Message-State: AFqh2kqa1SdREpmW34SenAF1JGycl1mvZ8O9glFhax2vv288Rnw1qnUx avR2ReEl9ceiHxqMIAH8fnIObA== X-Received: by 2002:a17:902:7488:b0:189:f708:9b67 with SMTP id h8-20020a170902748800b00189f7089b67mr11585591pll.46.1671819020829; Fri, 23 Dec 2022 10:10:20 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n2-20020a170902e54200b001887e30b9ddsm2633377plf.257.2022.12.23.10.10.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 10:10:20 -0800 (PST) Date: Fri, 23 Dec 2022 10:10:19 -0800 From: Kees Cook To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Andrew Morton , Arnd Bergmann , Daniel =?iso-8859-1?q?D=EDaz?= , "Eric W. Biederman" , James Morris , Jann Horn , Kees Cook , kernel test robot , Kristina Martsenko , linux-hardening@vger.kernel.org, linux-security-module@vger.kernel.org, Luis Chamberlain , Marco Elver , Mark Rutland , Nathan Chancellor , Paul Moore , Peter Zijlstra , Petr Mladek , Ping-Ke Shih , Sami Tolvanen , Sebastian Andrzej Siewior , "Serge E. Hallyn" , tangmeng , Tiezhu Yang Subject: [GIT PULL] kernel hardening fixes for v6.1-rc1 Message-ID: <202212231009.EC864645D8@keescook> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 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 autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753029662088051806?= X-GMAIL-MSGID: =?utf-8?q?1753029662088051806?= Hi Linus, Please pull these kernel hardening fixes for v6.1-rc1, collected over the last week. Thanks! -Kees The following changes since commit d272e01fa0a2f15c5c331a37cd99c6875c7b7186: ksmbd: replace one-element arrays with flexible-array members (2022-12-02 13:14:29 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-v6.1-rc1-fixes for you to fetch changes up to cf8016408d880afe9c5dc495af40dc2932874e77: cfi: Fix CFI failure with KASAN (2022-12-23 10:04:31 -0800) ---------------------------------------------------------------- kernel hardening fixes for v6.1-rc1 - Fix CFI failure with KASAN (Sami Tolvanen) - Fix LKDTM + CFI under GCC 7 and 8 (Kristina Martsenko) - Limit CONFIG_ZERO_CALL_USED_REGS to Clang > 15.0.6 (Nathan Chancellor) - Ignore "contents" argument in LoadPin's LSM hook handling - Fix paste-o in /sys/kernel/warn_count API docs - Use READ_ONCE() consistently for oops/warn limit reading ---------------------------------------------------------------- Kees Cook (3): LoadPin: Ignore the "contents" argument of the LSM hooks docs: Fix path paste-o for /sys/kernel/warn_count exit: Use READ_ONCE() for all oops/warn limit reads Kristina Martsenko (1): lkdtm: cfi: Make PAC test work with GCC 7 and 8 Nathan Chancellor (1): security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6 Sami Tolvanen (1): cfi: Fix CFI failure with KASAN Documentation/ABI/testing/sysfs-kernel-warn_count | 2 +- drivers/misc/lkdtm/cfi.c | 6 ++++- kernel/Makefile | 3 --- kernel/exit.c | 6 +++-- kernel/panic.c | 7 ++++-- security/Kconfig.hardening | 3 +++ security/loadpin/loadpin.c | 30 ++++++++++++++--------- 7 files changed, 36 insertions(+), 21 deletions(-)