Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2939380ybt; Mon, 22 Jun 2020 10:43:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV33ASgCgxn4zLdgJ9K5+X4E7bq5HaLNeGAMkv4+YcIao4/1Wv2qNxhOQaBWYOD4ASsJom X-Received: by 2002:aa7:c3d3:: with SMTP id l19mr18837247edr.126.1592847781251; Mon, 22 Jun 2020 10:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592847781; cv=none; d=google.com; s=arc-20160816; b=QA17H5zMU+AEj66F/K0XbaiFLtLjEXYbNCjuZB3UOKp9RAqEI61MYUleTmvgfeGd74 MD8qOkg6XNVhgCoIE9Btse4PxnPmv4lq/WabXkxZCBYRpQ8alsYlgTqzxL3egCl4HJE3 wgJQmeNu4xv+PkbCYmJGxFcCRcoGLr5i8zcQPR7wZzC+XEm0639s/2nbKTTg3Z3mky5i c+rip3jONVZfYMPRdvKgF/+uWSD7MoEuOpK73jhY9j5MLjabnvP6BWW1oCu1eHb+6fL3 dvYAmaw0UGjNgdFSSJKxu0DxyO2tQQiNbSrt2WuRnQ2+9vIX9r+m1GvgH4uvUN6kichl f8jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=0aj0ug3SZhT8jDpDiSTQq68lHjXR/fcAZk0yFxzETsA=; b=Tfpo9yv876GfUyGdBhzZfV3pI6ShL90t1XdQWt9zK+EGZQV33CdHpdz1bP/If6+nO5 wHbw/WjKCPSbWc7pC8yzYIsI+E6Bg28m85C/DXtKoMftW7a0EW124tArpwsu/+1Zcqsb 441/nAhigHMBtnQAxRMAOmz+nZ/FEG9PBiRLidOnezM0fTtTBA/M5q9pEMjioRSHD9+2 wBrYORYCRH8KYXeSn0xnvnKgAUxyZimYn5nfpjRqnRsZlPd58zlgf5Xpub4TatIts/17 vFV1obqmw2nEDPV/tO4kBVFQ/GInAhXbAoDFX3JhWqiCGQB3Liwhut4t1spBADMzQWVw LlyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w26si10180109eds.339.2020.06.22.10.42.37; Mon, 22 Jun 2020 10:43:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730067AbgFVRi3 (ORCPT + 99 others); Mon, 22 Jun 2020 13:38:29 -0400 Received: from namei.org ([65.99.196.166]:39828 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729864AbgFVRi3 (ORCPT ); Mon, 22 Jun 2020 13:38:29 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 05MHcE04020486; Mon, 22 Jun 2020 17:38:14 GMT Date: Tue, 23 Jun 2020 03:38:14 +1000 (AEST) From: James Morris To: Sami Tolvanen cc: David Howells , James Morris , Kees Cook , "Eric W. Biederman" , KP Singh , Casey Schaufler , Thomas Cedeno , Anders Roxell , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH] security: fix the key_permission LSM hook function type In-Reply-To: <20200615181232.119491-1-samitolvanen@google.com> Message-ID: References: <20200615181232.119491-1-samitolvanen@google.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Jun 2020, Sami Tolvanen wrote: > Commit 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than > a mask") changed the type of the key_permission callback functions, but > didn't change the type of the hook, which trips indirect call checking with > Control-Flow Integrity (CFI). This change fixes the issue by changing the > hook type to match the functions. > > Fixes: 8c0637e950d6 ("keys: Make the KEY_NEED_* perms an enum rather than a mask") > Signed-off-by: Sami Tolvanen Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git fixes-v5.8 NOTE: please cc: the LSM list with patches such as these. -- James Morris