1
0
Fork 0
alistair23-linux/include
David Howells a511e1af8b KEYS: Move the point of trust determination to __key_link()
Move the point at which a key is determined to be trustworthy to
__key_link() so that we use the contents of the keyring being linked in to
to determine whether the key being linked in is trusted or not.

What is 'trusted' then becomes a matter of what's in the keyring.

Currently, the test is done when the key is parsed, but given that at that
point we can only sensibly refer to the contents of the system trusted
keyring, we can only use that as the basis for working out the
trustworthiness of a new key.

With this change, a trusted keyring is a set of keys that once the
trusted-only flag is set cannot be added to except by verification through
one of the contained keys.

Further, adding a key into a trusted keyring, whilst it might grant
trustworthiness in the context of that keyring, does not automatically
grant trustworthiness in the context of a second keyring to which it could
be secondarily linked.

To accomplish this, the authentication data associated with the key source
must now be retained.  For an X.509 cert, this means the contents of the
AuthorityKeyIdentifier and the signature data.


If system keyrings are disabled then restrict_link_by_builtin_trusted()
resolves to restrict_link_reject().  The integrity digital signature code
still works correctly with this as it was previously using
KEY_FLAG_TRUSTED_ONLY, which doesn't permit anything to be added if there
is no system keyring against which trust can be determined.

Signed-off-by: David Howells <dhowells@redhat.com>
2016-04-11 22:43:43 +01:00
..
acpi Merge branches 'acpi-processor' and 'acpi-cppc' 2016-03-14 14:20:33 +01:00
asm-generic arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
clocksource
crypto KEYS: Move the point of trust determination to __key_link() 2016-04-11 22:43:43 +01:00
drm Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-03-21 13:48:00 -07:00
dt-bindings The clk changes for this release cycle are mostly dominated by 2016-03-23 06:06:45 -07:00
keys KEYS: Move the point of trust determination to __key_link() 2016-04-11 22:43:43 +01:00
kvm arm64: KVM: vgic-v3: Avoid accessing ICH registers 2016-03-09 04:24:04 +00:00
linux KEYS: Add a facility to restrict new links into a keyring 2016-04-11 22:37:37 +01:00
math-emu
media Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
memory
misc cxl: Remove cxl_get_phys_dev() kernel API 2016-03-09 23:40:02 +11:00
net net: ping: make ping_v6_sendmsg static 2016-03-23 22:09:58 -04:00
pcmcia
ras
rdma Round two of 4.6 merge window patches 2016-03-22 15:48:44 -07:00
rxrpc rxrpc: Be more selective about the types of received packets we accept 2016-03-04 15:56:06 +00:00
scsi SCSI misc on 20160326 2016-03-26 11:31:01 -07:00
soc IOMMU Updates for Linux v4.6 2016-03-22 11:57:43 -07:00
sound ASoC: Updates for v4.6 2016-03-14 14:03:29 +01:00
target target: add a new add_wwn_groups fabrics method 2016-03-30 20:06:44 -07:00
trace mm/page_isolation: fix tracepoint to mirror check function behavior 2016-04-01 17:03:37 -05:00
uapi Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-04-03 07:06:53 -05:00
video drm/omap: add dispc_channel_connected field to omap_dss_device 2016-03-03 17:38:22 +02:00
xen xen-netback: re-import canonical netif header 2016-03-13 22:08:01 -04:00
Kbuild