Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1631414
| From | David Oberhollenzer <david.oberhollenzer@sigma-star.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ubifs: Return -ENOKEY from rename if encryption keys are missing |
| Date | 2017-04-26 13:50 +0200 |
| Message-ID | <tAtCh-1In-13@gated-at.bofh.it> (permalink) |
| References | <tzU1Q-3Vb-19@gated-at.bofh.it> <tAcUO-7ME-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/25/2017 07:54 PM, Eric Biggers wrote:
> Did you test that this change actually does anything? Unlike ext4 and f2fs,
> ubifs calls fscrypt_setup_filename() from its rename methods rather than through
> a helper function ${FS}_find_entry(). Therefore it's able to pass in lookup=0,
> which means that the key is required. So it should already be failing with
> ENOKEY. You can verify this by running xfstests generic/419.
Actually, running xfstests was how this cropped up in the first place.
The UBIFS rename and xrename functions allready call
fscrypt_setup_filename with lookup=0, however there are other tests
before that call and moving them around causes generic/419 to fail
at a different place where EPERM was expected.
Therefore I concluded that the safest way to fix this might be to
simply copy the way the checks are handled in ext4.
With recent xfstests + UBIFS support patch, after applying this patch,
generic/419 passes.
David
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] ubifs: Return -ENOKEY from rename if encryption keys are missing Richard Weinberger <richard@nod.at> - 2017-04-24 23:50 +0200
Re: [PATCH] ubifs: Return -ENOKEY from rename if encryption keys are missing Eric Biggers <ebiggers@google.com> - 2017-04-25 20:00 +0200
Re: [PATCH] ubifs: Return -ENOKEY from rename if encryption keys are missing David Oberhollenzer <david.oberhollenzer@sigma-star.at> - 2017-04-26 13:50 +0200
Re: [PATCH] ubifs: Return -ENOKEY from rename if encryption keys are missing Eric Biggers <ebiggers3@gmail.com> - 2017-04-27 01:00 +0200
Re: [PATCH] ubifs: Return -ENOKEY from rename if encryption keys are missing David Oberhollenzer <david.oberhollenzer@sigma-star.at> - 2017-04-27 11:00 +0200
Re: [PATCH] ubifs: Return -ENOKEY from rename if encryption keys are missing Eric Biggers <ebiggers3@gmail.com> - 2017-04-27 21:40 +0200
csiph-web