Commit 833137a6 authored by liujinbao1's avatar liujinbao1 Committed by Paul Lawrence
Browse files

ANDROID: fuse-bpf: Add NULL pointer check in fuse_entry_revalidate



If userspace tried to add a backing file in a fuse_dentry_revalidate
where there wasn't one originally, this would trigger a crash. Disallow
this operation for now.

Bug: 296013218
Fixes: 57f3ff96 ("ANDROID: fuse-bpf v1.1")

Test: fuse_test passes, following script no longer crashes:

adb shell su root setenforce 0
adb shell su root chmod ug+w /data/media
adb shell su root rm /data/media/Android -rf
adb shell su root mkdir -p /storage/emulated/Android/data/test
adb shell su root ls -l /storage/emulated/Android/data/test

Change-Id: Id8a67c43d1edfa010403d5f17e31109b796998cf
Signed-off-by: default avatarliujinbao1 <liujinbao1@xiaomi.corp-partner.google.com>
(cherry picked from commit 63d4231d)
parent 42e4a441
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment