[Automated-testing] [PATCH 0/2] LTP wrapper for Syzkaller reproducers

Richard Palethorpe rpalethorpe at suse.com
Thu Nov 7 07:34:56 PST 2019


Hello,

This allows the user to run ./configure --with-syzkaller-repros and it will
automatically fetch the reproducers and generate the necessary LTP runtest
files which use 'syzwrap' to wrap the Syzkaller reproducers.

Optimistically speaking, this should allow you to run the reproducers in your
normal LTP test setup if you reduce the timeouts and your test runner is
reasonably advanced (see README.md).

I have been testing this with a modified version of Metan's runltp-ng which
almost runs the reproducers smoothly ;-). We haven't got around to documenting
it yet, but you can find it here:

https://github.com/richiejp/runltp-ng/tree/syzkaller

I began adding some sandboxing to syzwrap from the Syzkaller executor, but I
found this simply broke many of the reproducers which need access to
TAP/TUN. I guess the reproducers can be regenerated with the sanboxing built
in if the user cares enough. However I have left in the ability for syzwrap to
optionally add some sandboxing. This does appear to help prevent the root file
system from being trashed at the cost of breaking some reproducers.

Of course if the test runner can reset the SUT to a good state, then the
sandboxing is not necessary. This is quite easy to do with QEMU using image
overlays.

Richard Palethorpe (2):
  Wrapper for Syzkaller reproducers
  lib: Allow timeout coefficient < 1

 .gitmodules                                  |   5 +
 configure.ac                                 |  11 ++
 include/mk/features.mk.default               |   2 +
 include/mk/features.mk.in                    |   2 +
 lib/tst_test.c                               |   2 +-
 runtest/.gitignore                           |   1 +
 testcases/kernel/Makefile                    |   1 +
 testcases/kernel/syzkaller-repros/.gitignore |   1 +
 testcases/kernel/syzkaller-repros/Makefile   | 100 ++++++++++++++
 testcases/kernel/syzkaller-repros/README.md  |  45 +++++++
 testcases/kernel/syzkaller-repros/syzwrap.c  | 133 +++++++++++++++++++
 11 files changed, 302 insertions(+), 1 deletion(-)
 create mode 100644 runtest/.gitignore
 create mode 100644 testcases/kernel/syzkaller-repros/.gitignore
 create mode 100644 testcases/kernel/syzkaller-repros/Makefile
 create mode 100644 testcases/kernel/syzkaller-repros/README.md
 create mode 100644 testcases/kernel/syzkaller-repros/syzwrap.c

-- 
2.23.0



More information about the automated-testing mailing list