1
0
Fork 0

eCryptfs: fix 32 bit corruption issue

Shifting page->index on 32 bit systems was overflowing, causing
data corruption of > 4GB files. Fix this by casting it first.

https://launchpad.net/bugs/1243636

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reported-by: Lars Duesing <lars.duesing@camelotsweb.de>
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
hifive-unleashed-5.1
Colin Ian King 2013-10-24 14:08:07 +00:00 committed by Tyler Hicks
parent 3edc8376c0
commit 43b7c6c6a4
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
/**