aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorStefano Duo <stefanoduo@google.com>2020-08-10 13:07:06 +0000
committerDmitry Vyukov <dvyukov@google.com>2020-08-14 18:55:11 +0200
commit7c06bb218a06d171525a00367ecc50069b7163a8 (patch)
tree821bbf94117b0737094a2056984b45935fe3f2f6 /sys/linux
parenta1481759c36a84dd1316d40531fc65b3dd6f5b8f (diff)
sys/linux/test: add test performing getdents64() on FUSE dir
Add syzkaller program which correctly handles a getdents64() syscall on a FUSE directory. Here the related comment/discussion https://github.com/google/syzkaller/pull/2001#issuecomment-671185292.
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/test/fuse_getdents649
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/linux/test/fuse_getdents64 b/sys/linux/test/fuse_getdents64
new file mode 100644
index 000000000..3ec2ee164
--- /dev/null
+++ b/sys/linux/test/fuse_getdents64
@@ -0,0 +1,9 @@
+mkdirat(0xffffffffffffff9c, &AUTO='./file0\x00', 0x0)
+r0 = openat$fuse(0xffffffffffffff9c, &AUTO='/dev/fuse\x00', 0x2, 0x0)
+mount$fuse(0x0, &AUTO='./file0\x00', &AUTO='fuse\x00', 0x0, &AUTO={{'fd', 0x3d, r0}, 0x2c, {'rootmode', 0x3d, 0x4000}, 0x2c, {'user_id', 0x3d, 0x0}, 0x2c, {'group_id', 0x3d, 0x0}, 0x2c, {[], [], 0x0}})
+read$FUSE(r0, &AUTO={AUTO, 0x0, <r1=>0x0, 0x0, 0x0, 0x0, 0x0, ""/8192}, AUTO)
+write$FUSE_INIT(r0, &AUTO={AUTO, 0x0, r1, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}}, AUTO)
+r2 = openat$dir(0xffffffffffffff9c, &AUTO='./file0\x00', 0x0, 0x0)
+syz_fuse_handle_req(r0, &AUTO=""/8192, AUTO, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, &AUTO={AUTO, 0x0, 0x0, {0x0, 0x8, AUTO}}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
+getdents64(r2, &AUTO=""/1024, AUTO)
+syz_fuse_handle_req(r0, &AUTO=""/8192, AUTO, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, &AUTO={AUTO, 0x0, 0x0, [{0x0, 0x0, 0x4, 0x0, '#,,-'}]}, 0x0, 0x0, 0x0})