diff options
| author | Eric Biggers <[email protected]> | 2020-01-20 22:31:59 +0000 |
|---|---|---|
| committer | Eric Biggers <[email protected]> | 2020-01-22 22:49:56 +0000 |
| commit | f0d07a98a070bb5e443df19c3aa55693cbca9341 (patch) | |
| tree | 6ee18e57ea46e15f22d368ab3ed626ce23059502 /tools/perf/scripts/python/sched-migration.py | |
| parent | fscrypt: clarify what is meant by a per-file key (diff) | |
| download | kernel-f0d07a98a070bb5e443df19c3aa55693cbca9341.tar.gz kernel-f0d07a98a070bb5e443df19c3aa55693cbca9341.zip | |
ubifs: don't trigger assertion on invalid no-key filename
If userspace provides an invalid fscrypt no-key filename which encodes a
hash value with any of the UBIFS node type bits set (i.e. the high 3
bits), gracefully report ENOENT rather than triggering ubifs_assert().
Test case with kvm-xfstests shell:
. fs/ubifs/config
. ~/xfstests/common/encrypt
dev=$(__blkdev_to_ubi_volume /dev/vdc)
ubiupdatevol $dev -t
mount $dev /mnt -t ubifs
mkdir /mnt/edir
xfs_io -c set_encpolicy /mnt/edir
rm /mnt/edir/_,,,,,DAAAAAAAAAAAAAAAAAAAAAAAAAA
With the bug, the following assertion fails on the 'rm' command:
[ 19.066048] UBIFS error (ubi0:0 pid 379): ubifs_assert_failed: UBIFS assert failed: !(hash & ~UBIFS_S_KEY_HASH_MASK), in fs/ubifs/key.h:170
Fixes: f4f61d2cc6d8 ("ubifs: Implement encrypted filenames")
Cc: <[email protected]> # v4.10+
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions
