Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp126748imj; Thu, 14 Feb 2019 16:53:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IaZtKiz8mVvrpkBlbrMD6TQ+sxRQek1v4J2YobwFRZ2Tchy2l/CcCMMVHKZSy0JjKTl2D/N X-Received: by 2002:a63:cf4b:: with SMTP id b11mr2739981pgj.405.1550192026031; Thu, 14 Feb 2019 16:53:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550192026; cv=none; d=google.com; s=arc-20160816; b=0rLhicyEPgwW/an4k81GjITjMZCNTHR7X2Akndhw33U6U+U08qL0R5+vEpMm02y430 pS1pUiE7KOIyDwcqh6v9W+oJ5UdCdGeEZ8LUHJvjW1Q2b/SLo+FvLfQhuJJF7arUjmz/ dM7h4kYZSW6TugZ7/X3HxXQuqULmtSUKOC5D/Vcs24Q2Cz3XQRpl9Mwm0oHEXy+E5CO+ s9mTCpnBpcNuCvYrRtCvyu4bWVgrJi5cA3fqYV1Cq+ta2sWl4QgBj3qyZpwOCnMEqJk0 g3+3AZUWmryYtPu9/z3A/J3nFPLaRhLt3VBBP0fW9dUeLXoRhD0mVPsqeUA1z1BkUgRv 7CWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject; bh=Pk6eRqm+AXZ5XbRawG5agKLjFAiNzRwhdEh7vWS8Nq8=; b=Z6ENSX/wsuFQ4+6CXBKxioggX0eVbo2HfF434kKFEowvNWJU3gBvixJ9Q0VuC5OsrF kCDHkFhOEelwGeiRq26riYneJ1V7ooGfO3jHUKNxPrxKS6IPta7WodnXvyyuP19gQ/5C 88k+XxsZ5bjJ2AtyF3VBdVtNi8K0ALOPzGqXT5ePCGpp7usl9jSoXykLrf62bQPkfJCZ qGE/dHYckJJ6FYKqrVpGBU+8xBdNoNKhkAqsFzmGzc0hzw69IBG9dyUrGLwXNcdTjkMC iu2CETIG2+7lsxW0gHNCmGDqf4iK22WO55saNjCZ9A49yoiiFnMjgkfnhNwbs7kO+/ds msgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si2002736pll.283.2019.02.14.16.53.30; Thu, 14 Feb 2019 16:53:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404616AbfBNQTu (ORCPT + 99 others); Thu, 14 Feb 2019 11:19:50 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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