5065 Commits

Author SHA1 Message Date
Andrey Konovalov
af47d1d5c0 sys/linux: rename ipvs.txt to netfilter_ipvs.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
8ddccc2581 sys/linux: rename fsverity.txt to fs_ioctl_fsverity.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
2a2ff48439 sys/linux: rename fscrypt.txt to fs_ioctl_fscrypt.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
562406d573 sys/linux: rename fuse.txt to fs_fuse.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
9a5c775864 sys/linux: rename 9p.txt to fs_9p.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
c94245053a sys/linux: rename fs_btrfs.txt to fs_ioctl_btrfs.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
ea75f0e93e sys/linux: rename fs_ext4.txt to fs_ioctl_ext4.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
a47f57a951 sys/linux: rename apparmor.txt to security_apparmor.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
5644d14ff1 sys/linux: rename selinux.txt to security_selinux.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
0b84f68300 sys/linux: rename smack.txt to security_smack.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
1e72cce4ed sys/linux: rename devio.txt to dev_bus_usb.txt 2020-06-12 18:42:12 +02:00
Andrey Konovalov
d1c1c84952
Update syscall_descriptions.md 2020-06-12 18:16:15 +02:00
Andrey Konovalov
3036d6fd0b
Update external_fuzzing_usb.md 2020-06-12 17:41:07 +02:00
Andrey Konovalov
df5902545c
Update syscall_descriptions.md 2020-06-12 14:48:32 +02:00
Andrey Konovalov
c149e34955
Update syscall_descriptions.md 2020-06-12 14:46:16 +02:00
Dmitry Vyukov
6fe5725de8 pkg/report: ingore another android debug output that looks like kernel crash 2020-06-12 08:23:36 +02:00
Alexey Kardashevskiy
819b58b09f ppc64: Increase page size
The default configuration on PPC64 uses 64K system page size. Having it
4K was not a problem until recently when 365fba2440cee3aed74c77
"executor: surround the data mapping with PROT_NONE pages" added
surrounding mappings not aligned to the actual system page size.

This changes the page size for ppc64 to 64K and introduces the upper
limit to randPageCount() as we have the hard coded limit of 16MB.
If the unlikely event of a PPC64 system with 4K pages, we will end up
allocating less pages which is not great but acceptable.

This avoids using os.Getpagesize() as the page size on a building host
may be different than on the test machine so we always use the bigger
size for simplicity.

Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
2020-06-12 05:54:26 +02:00
Alexey Kardashevskiy
c6ec8ed9ce cover/report: Extend call instruction parser for PPE64 little endian
This adds one more pattern in the list of recognized once as this is
what they look like in objdump:
c0000000001c21a8:       f9 d2 11 48     bl      c0000000002df4a0 <__sanitizer_cov_trace_pc>

Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
2020-06-12 05:54:26 +02:00
Dmitry Vyukov
588020678f all: use more respective language
Some terms are normalised on the technical level
but may be oppressive on a societal level.
Replace them with more technically neutral terms.
See the following doc for a longer version:
https://tools.ietf.org/id/draft-knodel-terminology-00.html
2020-06-11 23:19:34 +02:00
Dmitry Vyukov
829fd56fbf sys/targets: always fail if SOURCEDIR_GOOS is set but compiler is broken
We should not skip the second check as well.
2020-06-11 23:18:52 +02:00
m00nbsd
0f23e882fa
sys/netbsd: add support for fault injection (#1817) 2020-06-11 23:16:52 +02:00
Christoph Paasch
1ffa7b1e77 sys/linux: mptcp: Add netlink-API for MPTCP path-management
MPTCP exposes a generic netlink API to control address advertisement and
subflow-creation. syzkaller should make use of this interface.
2020-06-11 22:16:56 +02:00
Lorenz Bauer
6dd6b37bc7 sys/linux: update BPF_MAP_UPDATE_ELEM to enable more thorough sockmap fuzzing
sockmap and sockhash expect the value of the update syscall to be a file
descriptor for a UDP or TCP socket. Add this knowledge by introducing a
separate union for map update values.
2020-06-11 21:10:50 +02:00
Lorenz Bauer
954e0f8699 sys/linux: update bpf_attach_args
Attaching and detaching can be done on some map types (sockmap) and
the current network namespace as well.
2020-06-11 21:10:50 +02:00
Dmitry Vyukov
5c25fdab08 sys/targets: fail loudly if SOURCEDIR_GOOS is set but compiler is broken
Since we now have SOURCEDIR_{FUCHSIA,AKAROS,NETBSD} exported in the
syz-big-env docker image, this will make CI fail for broken cross-builds too.

Update instructions in the docker image to fix the current problem
with permissions in syz-big-env: we need to tar with --mode=go=u.
2020-06-11 18:06:49 +02:00
TheOfficialFloW
1beaee2171
sys/linux: add l2cap descriptions
* sys/linux: add l2cap descriptions

* sys/linux: restore bpf and fscrypt changes

* sys/linux: restore key.txt
2020-06-11 17:59:37 +02:00
Michael Tüxen
dfdd11f777
sys/targets: use a different SYZ_DATA_OFFSET for 32-bit FreeBSD (#1809)
* sys/targets: use a different SYZ_DATA_OFFSET for 32-bit FreeBSD

It seems that the value used on all platforms (512 << 20) does
not work on 32-bit FreeBSD when using the clang tools.
Try (256 << 20) instead.

* sys/targets: add comment why a non-default value is needed
2020-06-11 17:57:14 +02:00
Marco Vanotti
3ab7a05ad8 sys/targets: fix fuchsiaCFlags
This commit modifies the fuchsia cflags to use the short version of
the «target» flag. The previous code seemed to be broken due to lacking
an `=` after the flag name using the long version.
2020-06-10 18:12:49 -03:00
Eric Biggers
80e99b01d7 sys/linux: update fscrypt descriptions
- Add fscrypt_add_key_arg::key_id and "fscrypt-provisioning" key type
  (Linux 5.6, https://git.kernel.org/linus/93edd392cad7)

- Add FS_IOC_GET_ENCRYPTION_NONCE
  (Linux 5.7, https://git.kernel.org/linus/e98ad464750c)

- Add FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32
  (Linux 5.8, https://git.kernel.org/linus/e3b1078bedd3)
2020-06-10 10:13:43 -07:00
Andrey Konovalov
a6f7998d6b
Update syscall_descriptions_syntax.md 2020-06-10 14:21:54 +02:00
TheOfficialFloW
5caaad3a74
sys/linux: add vhci headers for event packets
* sys/linux: add vhci headers for command packets

* sys/linux: make generate

* sys/linux: use event packet instead of command packets

* sys/linux/vhci.txt: move low-energy entries to hci_ev_le_meta_un

* sys/linux/vhci.txt: add hci_ev_cmd_complete opcodes
2020-06-10 14:11:42 +02:00
Paul Chaignon
b4eca5502e
sys/linux: BPF update for 5.8 merge window part 1
* sys/linux: update BPF constants

Signed-off-by: Paul Chaignon <paul@cilium.io>

* sys/linux: Add BPF_ENABLE_STATS bpf(2) command

Signed-off-by: Paul Chaignon <paul@cilium.io>

* sys/linux: Add BPF_ITER_CREATE bpf(2) command

Signed-off-by: Paul Chaignon <paul@cilium.io>

* sys/linux: Fix BPF_*_GET_NEXT_ID bpf(2) commands

These commands are used to retrieve a new ID for various BPF objects.
With the current command descriptions, however, the output 'next ID' is
treated as an input field.

Fix: c2dcd70 ("sys/linux: update BPF's anonymous structures")
Signed-off-by: Paul Chaignon <paul@cilium.io>

* sys/linux: Add LINK_GET_* bpf(2) commands

Signed-off-by: Paul Chaignon <paul@cilium.io>
2020-06-10 13:16:19 +02:00
Ricardo Cañuelo
79bb873bd7 docs: new file pseudo_syscalls.md
Add a brief description about pseudo-syscalls and how to create new
ones.
2020-06-10 13:10:58 +02:00
Ricardo Cañuelo
8648bd1f6d tools: add custom udev rules to generated images
Add a default udev rule file to the image creation process in
create-gce-image.sh and create-image.sh.

This change creates a default rule to make udev create a custom-named
symlink for the specific vim2m device.
2020-06-10 13:09:12 +02:00
Dmitry Vyukov
860c4de9cf sys/linux: regenerate const files on next-20200609 2020-06-09 16:01:11 +02:00
Ricardo Cañuelo
ed70e69f00 sys/linux: v4l2 and vim2: update and add additional const files
Add missing const files for dev_video4linux_vim2m: 386, arm and
ppc64le).

Update dev_video4linux const files.
2020-06-09 15:58:40 +02:00
Ricardo Cañuelo
07fe0fb871 sys/linux: v4l2 and vim2m2 refactoring
Remove a single template parameter to v4l2_buffer, as it should always
use a fd_request descriptor. Update all syscalls that use it.

Refactor the VIDIOC_STREAMON and VIDIOC_STREAMOFF vim2m ioctls to use
v4l2_buf_type_vim2m as a parameter instead of an union.

Remove ioctl$VIDIOC_RESERVED from dev_video4linux.txt (not defined in
upstream kernel).
2020-06-09 15:58:40 +02:00
Ricardo Cañuelo
c5e085d96d sys/linux: specific descriptions for vim2m (v4l2)
Add a set of descriptions to focus the fuzzing process on the V4L2 vim2m
test driver. This should be useful to test the M2M framework.

The syscalls are based on a specific file descriptor for the vim2m
device and a selection of v4l2 ioctls that operate on it. Some of the
existing v4l2 data structure definitions have been extended to allow
restricting and selecting some options in order to narrow down the
fuzzing process.

Initial support for Request API added.
2020-06-09 15:58:40 +02:00
Dmitry Vyukov
092934c131 syz-fuzzer: log that we connected to manager
For debugging of connectivity issues.
2020-06-09 13:52:43 +02:00
Ricardo Cañuelo
0d60b78a51 docs: suggested changes for pull-request 1797
https://github.com/google/syzkaller/pull/1797
2020-06-08 22:21:43 +02:00
Ricardo Cañuelo
d6de733164 docs: more info about resources and the "enable_sysaclls" config option
- Give some extra clarifications and examples about resources in syscall
    descriptions.
  - More details about how to use the "enable_syscalls" option.
  - Mention pseudo-syscalls in the general syscall description doc file.
2020-06-08 22:21:43 +02:00
m00nbsd
7604bb0341
dashboard/config/netbsd: add fault(4) to the kernel build (#1795) 2020-06-08 11:59:03 +02:00
Dmitry Vyukov
7751efd04a prog: increase number of iterations in a test
The test is random and needs some large number of iterations to pass.
It failed for me after an unrelated change in descriptions.
So bump number of iterations.
2020-06-07 20:27:18 +02:00
Dmitry Vyukov
2c2b926cb7 .golangci.yml: reduce function line count from 200 to 140
140 lines should be enough for everyone.
2020-06-07 10:41:01 +02:00
Dmitry Vyukov
948dd3af44 prog: remove target.StringDictionary
The linux string dictionary comes from extremely old times
when we did not have proper descriptions for almost anything,
and the dictionary was a quick hack to guess at least some
special strings.
Now we have way better descriptions and the dictionary
become both unnecessary and probably even harmful.
2020-06-07 10:41:01 +02:00
Dmitry Vyukov
3f04838a10 .golangci.yml: make goconst checker more strict 2020-06-07 10:41:01 +02:00
Dmitry Vyukov
cdf1aa4dc3 pkg/report: deduplicate code across netbsd and openbsd 2020-06-07 10:41:01 +02:00
Dmitry Vyukov
21b79583f1 .golangci.yml: enable receiver name check for pkg/ast 2020-06-07 10:41:01 +02:00
Dmitry Vyukov
70854cd639 .golangci.yml: enable lll for pkg/report/linux.go 2020-06-07 10:41:01 +02:00
Dmitry Vyukov
0e2e52a87a .golangci.yml: reduce scope of suppressions
Reduce scope of some suppressions (some are violated only in some packages).
Remove some outdated, fix and enable the type switch warning.
2020-06-07 10:41:01 +02:00