aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/test
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-01-05 12:44:49 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-01-05 12:50:29 +0100
commitd646e21ff436cd2a40b23314436cd53f21ae9500 (patch)
treec6a58928ecfbef09b335d19a6d8c20884203b688 /sys/linux/test
parentc5f5069930ee90925617ded2e413bc99716eb559 (diff)
prog: fix tests for string enforcement
String value enforcement broke a number of tests where we use different values. Be more string as to what string values we use in tests. Required to add tmpfs descriptions to test syz_mount_image. Also special-casing AF_ALG algorithms as these are auto-generated.
Diffstat (limited to 'sys/linux/test')
-rw-r--r--sys/linux/test/binder4
-rw-r--r--sys/linux/test/nonexec08
-rw-r--r--sys/linux/test/nonexec17
-rw-r--r--sys/linux/test/syz_mount_image4
4 files changed, 4 insertions, 19 deletions
diff --git a/sys/linux/test/binder b/sys/linux/test/binder
index 18f1aece7..8805d2deb 100644
--- a/sys/linux/test/binder
+++ b/sys/linux/test/binder
@@ -1,6 +1,6 @@
-r0 = syz_open_dev$binder(&AUTO='/dev/binder#\x00', 0x0, 0x2)
+r0 = syz_open_dev$binderN(&AUTO='/dev/binder#\x00', 0x0, 0x2)
ioctl$BINDER_SET_CONTEXT_MGR_EXT(r0, AUTO, &AUTO={AUTO, 0x100, 0x0, 0x0})
mmap$binder(&(0x7f00000a0000), 0x2000, 0x1, 0x11, r0, 0x0)
-r1 = syz_open_dev$binder(&AUTO='/dev/binder#\x00', 0x0, 0x2)
+r1 = syz_open_dev$binderN(&AUTO='/dev/binder#\x00', 0x0, 0x2)
mmap$binder(&(0x7f00000c0000), 0x2000, 0x1, 0x11, r1, 0x0)
ioctl$BINDER_WRITE_READ(r1, AUTO, &AUTO={AUTO, AUTO, &AUTO=[@transaction_sg={AUTO, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, AUTO, AUTO, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @fd={AUTO, AUTO, r0, AUTO, 0x0}, @ptr={AUTO, 0x0, &AUTO=""/10, AUTO, 0x0, 0x0}}, &AUTO={AUTO, AUTO, AUTO}}, 0x10}], AUTO, AUTO, &AUTO})
diff --git a/sys/linux/test/nonexec0 b/sys/linux/test/nonexec0
deleted file mode 100644
index d4ce3ba4f..000000000
--- a/sys/linux/test/nonexec0
+++ /dev/null
@@ -1,8 +0,0 @@
-# This makes syz-executor non-executable.
-# Does not work with repeat because on the second iteration the executor is still non-executable.
-# setuid does not have permissions to set extended acl.
-# FS_IOC_FSSETXATTR fails with EOPNOTSUPP, but it still changes the attrs.
-# requires: -repeat -sandbox=setuid
-
-r0 = syz_open_procfs(0x0, &AUTO='exe\x00')
-fsetxattr$system_posix_acl(r0, &AUTO='system.posix_acl_access\x00', &AUTO={{AUTO}, {0x1, 0x2, AUTO}, [{AUTO, 0x0, 0x0}, {0x2, 0x4, 0x0}], {AUTO, 0x0, AUTO}, [], {0x10, 0x2, AUTO}, {AUTO, 0x0, AUTO}}, 0x34, 0x0) # EOPNOTSUPP
diff --git a/sys/linux/test/nonexec1 b/sys/linux/test/nonexec1
deleted file mode 100644
index 324e704b5..000000000
--- a/sys/linux/test/nonexec1
+++ /dev/null
@@ -1,7 +0,0 @@
-# This makes syz-executor non-executable.
-# sandbox=namespace does not have permissions for FS_IOC_FSSETXATTR.
-# requires: -repeat -sandbox=namespace -sandbox=setuid
-
-r0 = syz_open_procfs(0x0, &AUTO='exe\x00')
-fsetxattr$system_posix_acl(r0, &AUTO='system.posix_acl_access\x00', &AUTO={{AUTO}, {0x1, 0x2, AUTO}, [{AUTO, 0x0, 0x0}, {0x2, 0x4, 0x0}], {AUTO, 0x0, AUTO}, [], {0x10, 0x2, AUTO}, {AUTO, 0x0, AUTO}}, 0x34, 0x0) # EOPNOTSUPP
-ioctl$FS_IOC_FSSETXATTR(r0, 0x40086602, &AUTO={0x17e, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}) # ENOTTY
diff --git a/sys/linux/test/syz_mount_image b/sys/linux/test/syz_mount_image
index 53f40022b..e4afeb00f 100644
--- a/sys/linux/test/syz_mount_image
+++ b/sys/linux/test/syz_mount_image
@@ -1,2 +1,2 @@
-syz_mount_image$ext4(&(0x7f0000000000)='tmpfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
-syz_mount_image$ext4(&(0x7f0000000000)='tmpfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x1, 0x0, 0x0, 0x0)
+syz_mount_image$tmpfs(&(0x7f0000000000)='tmpfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
+syz_mount_image$tmpfs(&(0x7f0000000000)='tmpfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x1, 0x0, 0x0, 0x0)