ACK: [PATCH 1/1][SAUCY][SRU] eCryptfs: fix 32 bit corruption issue

Luis Henriques luis.henriques at canonical.com
Fri Oct 25 08:52:00 UTC 2013


On Thu, Oct 24, 2013 at 05:23:46PM -0700, Tyler Hicks wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> BugLink: https://launchpad.net/bugs/1243636
> 
> Shifting page->index on 32 bit systems was overflowing, causing
> data corruption of > 4GB files. Fix this by casting it first.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> Reported-by: Lars Duesing <lars.duesing at camelotsweb.de>
> Cc: stable at vger.kernel.org # v3.11+
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> (cherry picked from commit 43b7c6c6a4e3916edd186ceb61be0c67d1e0969e
>  from the next branch of kernel/git/tyhicks/ecryptfs.git)
> ---
>  fs/ecryptfs/crypto.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
> index d107576..40db688 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,
>  				    struct page *page)
>  {
>  	return ecryptfs_lower_header_size(crypt_stat) +
> -	       (page->index << PAGE_CACHE_SHIFT);
> +	       ((loff_t)page->index << PAGE_CACHE_SHIFT);
>  }
>  
>  /**
> -- 
> 1.8.3.2
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Cheers,
--
Luis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20131025/2bc3d501/attachment.sig>


More information about the kernel-team mailing list