[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170419170940.GA89688@gmail.com>
Date: Wed, 19 Apr 2017 10:09:40 -0700
From: Eric Biggers <ebiggers3@...il.com>
To: Richard Weinberger <richard.weinberger@...il.com>
Cc: Gwendal Grignou <gwendal@...omium.org>,
Theodore Ts'o <tytso@....edu>,
Eric Biggers <ebiggers@...gle.com>, linux-ext4@...r.kernel.org,
linux-fscrypt@...r.kernel.org, kinaba@...omium.org,
hashimoto@...omium.org
Subject: Re: [PATCH] fscrypt: use 32 bytes of encrypted filename
Hi Richard,
On Wed, Apr 19, 2017 at 03:37:42PM +0200, Richard Weinberger wrote:
> >
> > Tested only on ext4.
>
> I hope you classify this patch as RFC then.
> We'll have problems when you just develop and test for ext4. :-)
>
It's a little difficult for people to test stuff on UBIFS without a turn-key
solution like kvm-xfstests where they can just run something like
'kvm-xfstests -c ext4,f2fs,ubifs -g encrypt'.
I did post patches to add UBIFS support to xfstests and kvm-xfstests a few
months ago; maybe you're interested in taking them over and working to get them
merged?
> > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> > index c4a389a6027b..14b2a2335a32 100644
> > --- a/fs/ext4/namei.c
> > +++ b/fs/ext4/namei.c
> > @@ -1257,8 +1257,8 @@ static inline int ext4_match(struct ext4_filename *fname,
> > int ret;
> > if (de->name_len < 16)
> > return 0;
> > - ret = memcmp(de->name + de->name_len - 16,
> > - fname->crypto_buf.name + 8, 16);
> > + ret = memcmp(de->name + de->name_len - 32,
> > + fname->crypto_buf.name + 8, 32);
> > return (ret == 0) ? 1 : 0;
> > }
> > name = fname->crypto_buf.name;
>
> Can the code still be able to read filenames which have been encrypted
> using the "old" scheme?
>
The patch only changes the presentation of long encrypted filenames when
accessed without the key. It doesn't change how filenames are encrypted.
- Eric
Powered by blists - more mailing lists