From patchwork Thu Feb 14 16:19:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 10813147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B007313B5 for ; Thu, 14 Feb 2019 16:19:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D8702E9BE for ; Thu, 14 Feb 2019 16:19:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 919E22E9E9; Thu, 14 Feb 2019 16:19:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F80B2E9BE for ; Thu, 14 Feb 2019 16:19:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730386AbfBNQTt (ORCPT ); Thu, 14 Feb 2019 11:19:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51948 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729942AbfBNQTt (ORCPT ); Thu, 14 Feb 2019 11:19:49 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50243C04D293; Thu, 14 Feb 2019 16:19:49 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-121-129.rdu2.redhat.com [10.10.121.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 818435C23D; Thu, 14 Feb 2019 16:19:46 +0000 (UTC) Subject: [PATCH 0/4] keys: Miscellaneous fixes From: David Howells To: jmorris@namei.org Cc: linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, dhowells@redhat.com, ebiggers@kernel.org, linux-kernel@vger.kernel.org Date: Thu, 14 Feb 2019 16:19:45 +0000 Message-ID: <155016118572.8115.3243711127043478822.stgit@warthog.procyon.org.uk> User-Agent: StGit/unknown-version MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 14 Feb 2019 16:19:49 +0000 (UTC) Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Hi James, Here are some keyrings fixes. (1) Handle quotas better, allowing full quota to be reached. (2) Fix the creation of shortcuts in the assoc_array internal representation when the index key needs to be an exact multiple of the machine word size. (3) Fix a dependency loop between the request_key contruction record and the request_key authentication key. The construction record isn't really necessary and can be dispensed with. (4) Set the timestamp on a new key rather than leaving it as 0. This would ordinarily be fine - provided the system clock is never set to a time before 1970. The patches can be found here tagged thusly: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-fixes-20190214 and also on the following branch: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-fixes David --- David Howells (3): assoc_array: Fix shortcut creation keys: Fix dependency loop between construction record and auth key keys: Timestamp new keys Eric Biggers (1): KEYS: allow reaching the keys quotas exactly fs/nfs/nfs4idmap.c | 31 ++++++++------- include/keys/request_key_auth-type.h | 36 +++++++++++++++++ include/linux/key-type.h | 22 +++------- lib/assoc_array.c | 8 ++-- security/keys/internal.h | 13 ------ security/keys/key.c | 5 +- security/keys/keyctl.c | 1 security/keys/process_keys.c | 1 security/keys/request_key.c | 72 ++++++++++++++-------------------- security/keys/request_key_auth.c | 16 ++++---- 10 files changed, 108 insertions(+), 97 deletions(-) create mode 100644 include/keys/request_key_auth-type.h