From c9b9e94af5ddd5c6146b3fdc5cad6275df572371 Mon Sep 17 00:00:00 2001 From: Mimi Zohar Date: Thu, 22 May 2014 14:02:23 -0400 Subject: [PATCH] KEYS: special dot prefixed keyring name bug fix commit a4e3b8d79a5c6d40f4a9703abf7fe3abcc6c3b8d upstream. Dot prefixed keyring names are supposed to be reserved for the kernel, but add_key() calls key_get_type_from_user(), which incorrectly verifies the 'type' field, not the 'description' field. This patch verifies the 'description' field isn't dot prefixed, when creating a new keyring, and removes the dot prefix test in key_get_type_from_user(). Changelog v6: - whitespace and other cleanup Changelog v5: - Only prevent userspace from creating a dot prefixed keyring, not regular keys - Dmitry Reported-by: Dmitry Kasatkin Signed-off-by: Mimi Zohar Acked-by: David Howells [bwh: Backported to 3.2: adjust context, indentation] Signed-off-by: Ben Hutchings --- Reading git-format-patch failed