diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-25 02:32:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-25 02:32:01 -0400 |
commit | 88829dfe4b6ea0c1c24d415668b3bfa78e5a5b16 (patch) | |
tree | 81b99b02f96d81b4a62b0f7a24e53fdae673bf75 /fs | |
parent | e6036c0b88962df82a8853971b86a55f09faef40 (diff) | |
parent | 43b7c6c6a4e3916edd186ceb61be0c67d1e0969e (diff) |
Merge tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
Pull ecryptfs fixes from Tyler Hicks:
"Two important fixes
- Fix long standing memory leak in the (rarely used) public key
support
- Fix large file corruption on 32 bit architectures"
* tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
eCryptfs: fix 32 bit corruption issue
ecryptfs: Fix memory leakage in keystore.c
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/crypto.c | 2 | ||||
-rw-r--r-- | fs/ecryptfs/keystore.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index c88e355f7635..000eae2782b6 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -408,7 +408,7 @@ static loff_t lower_offset_for_page(struct ecryptfs_crypt_stat *crypt_stat, | |||
408 | struct page *page) | 408 | struct page *page) |
409 | { | 409 | { |
410 | return ecryptfs_lower_header_size(crypt_stat) + | 410 | return ecryptfs_lower_header_size(crypt_stat) + |
411 | (page->index << PAGE_CACHE_SHIFT); | 411 | ((loff_t)page->index << PAGE_CACHE_SHIFT); |
412 | } | 412 | } |
413 | 413 | ||
414 | /** | 414 | /** |
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 7d52806c2119..4725a07f003c 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -1149,7 +1149,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, | |||
1149 | struct ecryptfs_msg_ctx *msg_ctx; | 1149 | struct ecryptfs_msg_ctx *msg_ctx; |
1150 | struct ecryptfs_message *msg = NULL; | 1150 | struct ecryptfs_message *msg = NULL; |
1151 | char *auth_tok_sig; | 1151 | char *auth_tok_sig; |
1152 | char *payload; | 1152 | char *payload = NULL; |
1153 | size_t payload_len = 0; | 1153 | size_t payload_len = 0; |
1154 | int rc; | 1154 | int rc; |
1155 | 1155 | ||
@@ -1203,6 +1203,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, | |||
1203 | } | 1203 | } |
1204 | out: | 1204 | out: |
1205 | kfree(msg); | 1205 | kfree(msg); |
1206 | kfree(payload); | ||
1206 | return rc; | 1207 | return rc; |
1207 | } | 1208 | } |
1208 | 1209 | ||