From 2edcdbfc985724b57a74b996ef5cac8ca1698423 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Feb 28 2014 16:48:34 +0000 Subject: CVE-2014-0102 keyctl_link can be used to cause an oops (rhbz 1071396) --- diff --git a/kernel.spec b/kernel.spec index 6d98d61..bca5c88 100644 --- a/kernel.spec +++ b/kernel.spec @@ -634,6 +634,9 @@ Patch25203: dma-debug-account-for-cachelines-and-read-only-mappings.patch #rhbz 1056170 Patch25025: usb-ehci-fix-deadlock-when-threadirqs-option-is-used.patch +#CVE-2014-0102 rhbz 1071396 +Patch25026: keyring-fix.patch + # END OF PATCH DEFINITIONS %endif @@ -1287,6 +1290,9 @@ ApplyPatch dma-debug-account-for-cachelines-and-read-only-mappings.patch #rhbz 1056170 ApplyPatch usb-ehci-fix-deadlock-when-threadirqs-option-is-used.patch +#CVE-2014-0102 rhbz 1071396 +ApplyPatch keyring-fix.patch + # END OF PATCH APPLICATIONS %endif @@ -2066,6 +2072,9 @@ fi # ||----w | # || || %changelog +* Fri Feb 28 2014 Josh Boyer +- CVE-2014-0102 keyctl_link can be used to cause an oops (rhbz 1071396) + * Thu Feb 27 2014 Josh Boyer - 3.14.0-0.rc4.git2.1 - Linux v3.14-rc4-45-gd2a0476 diff --git a/keyring-fix.patch b/keyring-fix.patch new file mode 100644 index 0000000..6539144 --- /dev/null +++ b/keyring-fix.patch @@ -0,0 +1,17 @@ +@@ -, +, @@ +--- +--- a/security/keys/keyring.c ++++ a/security/keys/keyring.c +@@ -1000,7 +1000,11 @@ static int keyring_detect_cycle_iterator(const void *object, + + kenter("{%d}", key->serial); + +- BUG_ON(key != ctx->match_data); ++ /* We might get a keyring with matching index-key that is nonetheless a ++ * different keyring. */ ++ if (key != ctx->match_data) ++ return 0; ++ + ctx->result = ERR_PTR(-EDEADLK); + return 1; + }