aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/crypto.c
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>2009-08-11 01:36:32 -0400
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>2009-09-23 10:10:31 -0400
commitb0105eaefa7cce8f4a941d0fc6354b250d30e745 (patch)
tree60bed48ff88aa22d9ee36b64d23421cf9e50d2a8 /fs/ecryptfs/crypto.c
parent382684984e93039a3bbd83b04d341b0ceb831519 (diff)
eCryptfs: Handle unrecognized tag 3 cipher codes
Returns an error when an unrecognized cipher code is present in a tag 3 packet or an ecryptfs_crypt_stat cannot be initialized. Also sets an crypt_stat->tfm error pointer to NULL to ensure that it will not be incorrectly freed in ecryptfs_destroy_crypt_stat(). Acked-by: Serge Hallyn <serue@us.ibm.com> Cc: ecryptfs-devel@lists.launchpad.net Cc: stable <stable@kernel.org> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Diffstat (limited to 'fs/ecryptfs/crypto.c')
-rw-r--r--fs/ecryptfs/crypto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 931f715827ac..f92370aa5704 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -795,6 +795,7 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)
795 kfree(full_alg_name); 795 kfree(full_alg_name);
796 if (IS_ERR(crypt_stat->tfm)) { 796 if (IS_ERR(crypt_stat->tfm)) {
797 rc = PTR_ERR(crypt_stat->tfm); 797 rc = PTR_ERR(crypt_stat->tfm);
798 crypt_stat->tfm = NULL;
798 ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): " 799 ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): "
799 "Error initializing cipher [%s]\n", 800 "Error initializing cipher [%s]\n",
800 crypt_stat->cipher); 801 crypt_stat->cipher);