From: Greg Kroah-Hartman Date: Tue, 29 Mar 2011 02:07:48 +0000 (-0700) Subject: .38 patches X-Git-Tag: v2.6.38.3~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cdd7d67ce342d601ecb0546e9f64beaee940c35;p=thirdparty%2Fkernel%2Fstable-queue.git .38 patches --- diff --git a/queue-2.6.38/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch b/queue-2.6.38/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch new file mode 100644 index 00000000000..c8cd2efe9b9 --- /dev/null +++ b/queue-2.6.38/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch @@ -0,0 +1,31 @@ +From 1821df040ac3cd6a57518739f345da6d50ea9d3f Mon Sep 17 00:00:00 2001 +From: Roberto Sassu +Date: Thu, 17 Mar 2011 12:48:50 +0100 +Subject: eCryptfs: ecryptfs_keyring_auth_tok_for_sig() bug fix + +From: Roberto Sassu + +commit 1821df040ac3cd6a57518739f345da6d50ea9d3f upstream. + +The pointer '(*auth_tok_key)' is set to NULL in case request_key() +fails, in order to prevent its use by functions calling +ecryptfs_keyring_auth_tok_for_sig(). + +Signed-off-by: Roberto Sassu +Signed-off-by: Tyler Hicks +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ecryptfs/keystore.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/ecryptfs/keystore.c ++++ b/fs/ecryptfs/keystore.c +@@ -1563,6 +1563,7 @@ int ecryptfs_keyring_auth_tok_for_sig(st + printk(KERN_ERR "Could not find key with description: [%s]\n", + sig); + rc = process_request_key_err(PTR_ERR(*auth_tok_key)); ++ (*auth_tok_key) = NULL; + goto out; + } + (*auth_tok) = ecryptfs_get_key_payload_data(*auth_tok_key); diff --git a/queue-2.6.38/ecryptfs-unlock-page-in-write_begin-error-path.patch b/queue-2.6.38/ecryptfs-unlock-page-in-write_begin-error-path.patch new file mode 100644 index 00000000000..2a843c2ec7c --- /dev/null +++ b/queue-2.6.38/ecryptfs-unlock-page-in-write_begin-error-path.patch @@ -0,0 +1,34 @@ +From 50f198ae16ac66508d4b8d5a40967a8507ad19ee Mon Sep 17 00:00:00 2001 +From: Tyler Hicks +Date: Wed, 9 Mar 2011 11:49:13 -0600 +Subject: eCryptfs: Unlock page in write_begin error path + +From: Tyler Hicks + +commit 50f198ae16ac66508d4b8d5a40967a8507ad19ee upstream. + +Unlock the page in error path of ecryptfs_write_begin(). This may +happen, for example, if decryption fails while bring the page +up-to-date. + +Signed-off-by: Tyler Hicks +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ecryptfs/mmap.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/fs/ecryptfs/mmap.c ++++ b/fs/ecryptfs/mmap.c +@@ -374,6 +374,11 @@ static int ecryptfs_write_begin(struct f + && (pos != 0)) + zero_user(page, 0, PAGE_CACHE_SIZE); + out: ++ if (unlikely(rc)) { ++ unlock_page(page); ++ page_cache_release(page); ++ *pagep = NULL; ++ } + return rc; + } + diff --git a/queue-2.6.38/series b/queue-2.6.38/series index 1c68f9056a1..345839aa7fc 100644 --- a/queue-2.6.38/series +++ b/queue-2.6.38/series @@ -12,3 +12,5 @@ ses-show-devices-for-enclosures-with-no-page-7.patch ses-avoid-kernel-panic-when-lun-0-is-not-mapped.patch pci-acpi-report-aspm-support-to-bios-if-not-disabled-from-command-line.patch x86-64-mm-put-early-page-table-high.patch +ecryptfs-unlock-page-in-write_begin-error-path.patch +ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch