[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 19 Apr 2017 19:12:01 +0200
From: Richard Weinberger <richard@....at>
To: Eric Biggers <ebiggers3@...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,
David Oberhollenzer <david.oberhollenzer@...ma-star.at>
Subject: Re: [PATCH] fscrypt: use 32 bytes of encrypted filename
Eric,
Am 19.04.2017 um 19:09 schrieb Eric Biggers:
> 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?
I assigned this talk already to David.
He can tell what the status is.
>>> 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.
Thanks for pointing this out.
Thanks,
//richard
Powered by blists - more mailing lists