Skip to content

Commit

Permalink
Merge tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/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
  • Loading branch information
Linus Torvalds committed Oct 25, 2013
2 parents e6036c0 + 43b7c6c commit 88829df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static loff_t lower_offset_for_page(struct ecryptfs_crypt_stat *crypt_stat,
struct page *page)
{
return ecryptfs_lower_header_size(crypt_stat) +
(page->index << PAGE_CACHE_SHIFT);
((loff_t)page->index << PAGE_CACHE_SHIFT);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion fs/ecryptfs/keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
struct ecryptfs_msg_ctx *msg_ctx;
struct ecryptfs_message *msg = NULL;
char *auth_tok_sig;
char *payload;
char *payload = NULL;
size_t payload_len = 0;
int rc;

Expand Down Expand Up @@ -1203,6 +1203,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
}
out:
kfree(msg);
kfree(payload);
return rc;
}

Expand Down

0 comments on commit 88829df

Please sign in to comment.