libfstab_fuzzer: Add dictionary to guide the fuzzer

This is probably an overkill, but still, add a collection of
interesting keywords that may appear in a fstab file.

Also add myself to the "CC" list of this fuzz target.

BYPASS_INCLUSIVE_LANGUAGE_REASON="slave" or MS_SLAVE is a mount flag

Bug: 204056804
Test: adb shell /data/fuzz/x86_64/libfstab_fuzzer/libfstab_fuzzer \
  -dict=/data/fuzz/x86_64/libfstab_fuzzer/fstab.dict
Change-Id: Ife55837212a711dcbeed4f00d97da0cb022c7156
This commit is contained in:
Yi-Yo Chiang 2021-10-26 22:53:45 +08:00
parent 6aa256fdf6
commit ed72e37c4a
2 changed files with 77 additions and 0 deletions

View file

@ -25,4 +25,11 @@ cc_fuzz {
shared_libs: [
"libbase",
],
dictionary: "fstab.dict",
fuzz_config: {
cc: [
"yochiang@google.com",
],
},
}

70
fs_mgr/fuzz/fstab.dict Normal file
View file

@ -0,0 +1,70 @@
"#"
"="
","
"f2fs"
# mount flags
"noatime"
"noexec"
"nosuid"
"nodev"
"nodiratime"
"ro"
"rw"
"sync"
"remount"
"bind"
"rec"
"unbindable"
"private"
"slave"
"shared"
"defaults"
# fs_mgr flags
"wait"
"check"
"nonremovable"
"recoveryonly"
"noemulatedsd"
"notrim"
"verify"
"formattable"
"slotselect"
"latemount"
"nofail"
"verifyatboot"
"quota"
"avb"
"logical"
"checkpoint=block"
"checkpoint=fs"
"first_stage_mount"
"slotselect_other"
"fsverity"
"metadata_csum"
"fscompress"
"overlayfs_remove_missing_lowerdir"
# fs_mgr flags that expect an argument
"reserve_root="
"lowerdir="
"encryptable="
"voldmanaged="
"length="
"swapprio="
"zramsize="
"forceencrypt="
"fileencryption="
"forcefdeorfbe="
"max_comp_streams="
"reservedsize="
"readahead_size_kb="
"eraseblk="
"logicalblk="
"avb_keys="
"avb="
"keydirectory="
"metadata_encryption="
"sysfs_path="
"zram_backingdev_size="