[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1591C866-F48B-4F82-B2D1-7F7180E3EE2A@dilger.ca>
Date: Wed, 15 Apr 2015 09:14:17 -0600
From: Andreas Dilger <adilger@...ger.ca>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [patch] ext4 crypto: type bug with encrypted symlinks
Nak. ostr.len is the variable being swabbed, and it is a __u32.
Cheers, Andreas
> On Apr 15, 2015, at 03:21, Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> sd->len is an __le16 and not an __le32.
>
> Fixes: f1195c72c951 ('ext4 crypto: Add symlink encryption')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index 69e12ee..5c82a3c 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -3256,7 +3256,7 @@ static int ext4_symlink(struct inode *dir,
> ext4_put_fname_crypto_ctx(&ctx);
> if (err < 0)
> goto err_drop_inode;
> - sd->len = cpu_to_le32(ostr.len);
> + sd->len = cpu_to_le16(ostr.len);
> disk_link.name = (char *) sd;
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists