Commit Graph

4153 Commits

Author SHA1 Message Date
Dmitry Vyukov
2dd371a3b1 tools/kcovfuzzer: add simple KCOV/libfuzzer glue 2019-09-19 15:56:24 +02:00
Andrey Konovalov
408e453738
Update external_fuzzing_usb.md 2019-09-19 15:53:52 +02:00
Andrey Konovalov
72ada85635
Update external_fuzzing_usb.md 2019-09-19 15:45:23 +02:00
Paul Chaignon
a32a318486 sys/linux: update BPF constants
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-09-19 15:31:20 +02:00
Eric Biggers
eb9400440d sys/linux: re-generate Linux descriptions from next-20190918 2019-09-19 09:38:51 +02:00
Eric Biggers
a4e87d4bb6 sys/linux: update fscrypt descriptions
- For v5.4: new ioctls FS_IOC_ADD_ENCRYPTION_KEY,
  FS_IOC_REMOVE_ENCRYPTION_KEY, FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS,
  FS_IOC_GET_ENCRYPTION_KEY_STATUS, and FS_IOC_GET_ENCRYPTION_POLICY_EX.

- For v5.4: FS_IOC_SET_ENCRYPTION_POLICY now accepts an
  fscrypt_policy_v2 argument in addition to the original fscrypt_policy
  which is now called fscrypt_policy_v1.

- For v5.4: the fscrypt definitions were moved to a new header
  <linux/fscrypt.h>, and some constants were given new FSCRYPT_* names
  instead of FS_*.  Handle this, and to keep things organized similarly
  move the syzkaller descriptions to a new file fscrypt.txt.

- For v5.0: remove the removed Speck modes and add Adiantum.

- For v5.0: add the DIRECT_KEY encryption policy flag.

Also fix the argument types for FS_IOC_GET_ENCRYPTION_POLICY and
FS_IOC_GET_ENCRYPTION_PWSALT, which had been mixed up.
2019-09-19 09:38:51 +02:00
Eric Biggers
6aa8d1eb8f sys/syz-extract: re-enable extraction for fsverity.txt
fsverity is now upstream, so re-enable extracting its consts.
2019-09-19 09:38:51 +02:00
Zubin Mithra
46c0be242e docs: update syzbot.md
Add in some information about fix bisection.
2019-09-18 15:09:15 +02:00
Siddharth Muralee
1037b42440 dashboard/config: Add netbsd kernel configs 2019-09-18 15:00:55 +02:00
Siddharth M
7fa5d0a69b pkg/build: build netbsd using config files 2019-09-18 15:00:55 +02:00
Andrey Konovalov
14d4158490 sys/targets: add ASAN compiler flag to optional
*BSD GCC doesn't have ASAN.
2019-09-18 14:02:33 +02:00
Andrey Konovalov
4dc46dd6c9 docs: fix USB Raspberry Pi instructions 2019-09-18 13:40:13 +02:00
Paul Chaignon
c2dcd7009f sys/linux: update BPF's anonymous structures
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-09-18 06:50:02 +02:00
Paul Chaignon
03e0d24559 sys/linux: basic support for bpf-to-bpf function calls
The BPF template currently only defines helper calls.  BPF function calls
(bpf-to-bpf calls) are however supported in Linux since v4.16.

This patch defines bpf-to-bpf calls in the template.

Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-09-17 20:38:59 +02:00
Dmitry Vyukov
ad847b96aa pkg/report: ignore "INFO: recovery required on readonly filesystem"
This is not a kernel bug.
2019-09-17 16:14:31 +02:00
Andrey Konovalov
d62be7809c runtest: add a flag to specify tests to run 2019-09-17 15:58:29 +02:00
Andrey Konovalov
d555ee7ed1 executor: fix out-of-bounds access to syscalls array
Move accessing syscalls array to check for USB syscalls after we validate
the call_num value (it can be e.g. instr_copyin/out).
2019-09-17 15:10:25 +02:00
Andrey Konovalov
e9b387d18c sys/targets: build executor with ASAN for test target 2019-09-17 15:10:25 +02:00
Andrey Konovalov
5883acb646 pkg/report: improve some USB reports 2019-09-17 15:09:43 +02:00
Andrey Konovalov
669cade06a dashboard/config: add debian stretch options
See #760 for details.
2019-09-17 14:42:25 +02:00
Paul Chaignon
c9364a4648 sys/linux: support for loopkup-free map value accesses
A new BPF instruction that allows lookup-free map value accesses was added
in Linux v5.2, with commit d8eca5b ("bpf: implement lookup-free direct
value access for maps").  It enables direct access to map values without
having to call a BPF helper.  It is currently used to implement global
variable support.

This commit adds support for that new instruction.

Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-09-17 14:41:41 +02:00
Veronica Radu
13dcda9b39 updated golangci.yml to exclude new errors 2019-09-17 13:02:55 +02:00
Andrey Konovalov
51ca0454d7 pkg/osutil: fix arm build
pkg/osutil/osutil_linux.go:44:13: cannot use info.Totalram (type uint32) as type uint64 in return argument
2019-09-16 14:15:38 +02:00
Michael Tuexen
cb93629971 sys/freebsd/sys.txt: update sendfile description
The signature of sendfile() on FreeBSD is different from the one
used on Linux.
2019-09-16 10:39:16 +02:00
Michael Tüxen
55c50e708b
sys/freebsd/vnet.txt: replace IPPROTO_SEP by IPPROTO_DCCP (#1401)
r350749 updated the constant from IPPROTO_SEP to IPPROTO_DCCP
to be consistent with the IANA registry.
2019-09-16 09:51:17 +02:00
Yevgeny Pats
32d593576a fix fuzzit script to work with latest CLI syntax
Signed-off-by: Yevgeny Pats <yp@fuzzit.dev>
2019-09-13 15:37:40 +01:00
Marco Vanotti
40fa42bc27 executor/fuchsia: close vmo handle in syz_mmap.
This commit fixes a handle leak in syz_mmap. The bug was pointed out by
mdempsky during a code review.

The `syz_mmap` function creates a VMO and maps it to a VMAR in the address
specified by the `syz_mmap` parameters. Once a VMO is mapped to a vmar,
the handle to the vmo can be closed without problems.

The new code makes sure that `zx_handle_close(vmo_handle)` gets called before
the `syz_mmap` function returns.
2019-09-12 21:17:27 -03:00
Yevgeny Pats
0b7672eeaf updated fuzzit to v2.4.46 2019-09-12 08:59:42 +01:00
Marco Vanotti
f4e53c1037 executor/fuchsia: don't crash on syz_mmap failure.
syz_mmap is a pseudo-syscall that can be used by syzkaller in fuzzing
programs, however, it is also used to setup the environment for
syz-executor. syz-executor already checks the return value[0] when it is
used for setting up the environment, so it doesn't make sense for the
function to crash (most probably, in a fuzzing program it will be called
with arguments that would make it fail).

The previous behavior was causing a bunch of "Lost connection to test
machine" syzkaller crashes which were meaningless. An example of a
program in which syz_mmap would crash would be any program in which the
handle to the root vmar is closed before calling syz_mmap.

[0]:
a60cb4cd84/executor/executor_fuchsia.h (L15)
2019-09-11 16:38:45 -03:00
Marco Vanotti
000d39a9b8 pkg/ipc: Send output from syz-executor for non-Forkserver oses.
This change reuses the logic for sending the output back from
syz-executor to syz-fuzzer that forkserver oses use: reading it
periodically. This will be useful for debugging issues in Fuchsia that
does not support forkserver yet.
2019-09-11 16:38:45 -03:00
Andrey Konovalov
a60cb4cd84 executor/usb: use UTF16 encoding for default string
Also respond with lang ID when string #0 is requested.
2019-09-06 20:11:54 +02:00
Andrey Konovalov
3fe4b3b1aa executor/usb: fix null-ptr-deref in syz_usb_control_io 2019-09-06 20:11:54 +02:00
Andrey Konovalov
1af11d9328 executor/usb: improve debugging messages 2019-09-06 20:11:54 +02:00
Andrey Konovalov
a381ceb297 sys/linux/usb: fix CDC mac address encoding 2019-09-06 20:11:54 +02:00
Andrey Konovalov
35d270e58c sys/linux/usb: always provide device string ids
This forces the kernel to make a USB string request and select a lang ID
early during the enumaration stage.
2019-09-06 20:11:54 +02:00
Andrey Konovalov
2d7c71133a executor/usb: allow syz_usb_control_io args to be 0 2019-09-06 20:11:54 +02:00
Andrey Konovalov
4280382fb9 sys/linux/vusb.txt: properly describe interfaces for USB CDC NCM
Also rename cdc_ethernet to cdc_ecm.
2019-09-06 17:19:55 +02:00
Andrey Konovalov
a38da1b89a sys/linux, executor: basic support for multiple USB interfaces 2019-09-06 17:19:55 +02:00
Dmitry Vyukov
acb5b744f9
docs: add another research paper 2019-09-06 13:50:39 +02:00
Andrey Konovalov
c16be727a6 executor: fix sigsegv for default USB string response 2019-09-05 19:03:35 +02:00
Andrey Konovalov
bf6bcce4f2 sys/linux/vusb.txt: fix typo in descriptions 2019-09-05 16:28:13 +02:00
Andrey Konovalov
040fda5884 tools/syz-usbgen: ignore building keyboard.c 2019-09-04 15:59:38 +02:00
Andrey Konovalov
24cb2b46b8 docs: update USB fuzzing documentation 2019-09-04 13:53:01 +02:00
Andrey Konovalov
d994512dff sys/linux, dashboard: update USB config 2019-09-04 13:09:49 +02:00
Andrey Konovalov
6c19c36919 dashboard/config: improve config generation scripts
1. Use MAKE_ARGS var to pass arguments to make.
2. Pass -m to merge_config.sh to avoid calling make without CC.
3. Make util_add_syzbot_extra_bits() operate on .config.
2019-09-04 13:09:49 +02:00
Andrey Konovalov
3977854c2a
pkg/compiler: remove fixed TODO (#1376) 2019-09-04 12:58:59 +02:00
Zubin Mithra
05c2dc45fb dashboard/app: fix typo and change reporting description
* Fix a typo in mail_bisect_result.txt related to the "syz fix:" line.
* Improve the description to make it clearer why sending a "syz fix:" is
important.
2019-09-04 11:01:18 +02:00
Veronica Radu
5de425bc59 prog: implemented argument and call priorities 2019-09-04 10:46:46 +02:00
Dmitry Vyukov
b0e5f924b5 pkg/report: update ODEBUG warning format
It seems something has changed in the kernel again...
2019-09-04 10:35:20 +02:00
Andrey Konovalov
12381952e3 sys/linux/vusb.txt: fix unused EPSNUM param 2019-09-04 07:10:15 +02:00