aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
Commit message (Collapse)AuthorAgeFilesLines
...
* executor: arm64: sys/linux: allocate 1024 pages for guest address spaceAlexander Potapenko2024-11-268-9/+9
| | | | | | | Pass 1024 pages of memory to both syz_kvm_setup_syzos_vm() and syz_kvm_setup_cpu$arm64() to make sure that: - there is enough memory for guest allocations (e.g. ITS pages) - host can tamper with that memory, provoking more bugs
* sys/linux/dev_kvm.txt: support SYZOS_API_ITS_SEND_CMDAlexander Potapenko2024-11-262-0/+40
|
* sys/linux/dev_kvm.txt: describe SYZOS_API_ITS_SETUPAlexander Potapenko2024-11-261-0/+7
|
* tools/syz-declextract: prefix flags with auto_Dmitry Vyukov2024-11-261-2/+2
| | | | They can clash with our manual flags names.
* sys/linux: update descriptions/constsDmitry Vyukov2024-11-269-28/+188
| | | | | | | Update to upstream commit 228a1157fb9f. VFIO_TYPE1_NESTING_IOMMU const was removed in 35890f85573c. Remove it from descriptions.
* tools/syz-declextract: support nested netlink policiesDmitry Vyukov2024-11-182-151/+520
|
* tools/syz-declextract: don't generate NLA_REJECT/TYPE_MAX attrsDmitry Vyukov2024-11-181-4/+0
| | | | These are not accepted as inputs (NLA_REJECT is usually used in dump operation).
* sys/linux: remove nl_generic_attr_nonested hackDmitry Vyukov2024-11-181-6/+1
| | | | | It was needed to work around restriction on recursion via arrays. Since we permit it now, we can remove the hack.
* tools/syz-declextract: add heuristic for sigsetsizeDmitry Vyukov2024-11-141-11/+11
|
* tools/syz-declextract: improve name matching heuristicsDmitry Vyukov2024-11-141-95/+95
|
* sys/linux: ensure that auto descriptions are self-sufficientDmitry Vyukov2024-11-141-1/+1
| | | | | Test that if we enable only auto descriptions, nothing gets disabled. Currently nothing can create fd_cgroup which is used by the descriptions.
* tools/syz-declextract: store interfaces info in a text fileDmitry Vyukov2024-11-142-12622/+925
| | | | | | | | | | One line per interface allows to use all power of unix utilities to process these files. For example the following command allow to select all unpriviledged interfaces present in one kernel but not in another: comm -23 <(cat auto1.info | grep access:user | cut -f -2 | sort) \ <(cat auto2.info | cut -f -2 | sort)
* tools/syz-declextract: fix generic netlink family namesDmitry Vyukov2024-11-131-1/+1
|
* pkg/compiler: add consts to all files that mention themDmitry Vyukov2024-11-1337-309/+889
| | | | | | | | | We already do this in most cases except for template structs (nlattr notably). Add consts that are used in template structs to all files that use them. This helps to avoid flakiness, and allows to replace descriptions files with other descriptions files without regenerating all const files. This also fixes check for presence of descriptions for sys/linux/auto.txt.json.
* tools/syz-declextract: fix reserved struct field namesDmitry Vyukov2024-11-131-4/+4
|
* tools/syz-declextract: improve declaration name extractionDmitry Vyukov2024-11-131-0/+14
| | | | | | | Extracting declaration name is trickier than removing casts. If the initialized type is a union, then the expression may also contain InitListExpr and other nodes. Remove all of them in a more robust way.
* sys/linux: add new ioctls for io_uring, dev_block and fsSablin Viacheslav2024-11-136-7/+89
|
* tools/syz-declextract: add syscall entry functionDmitry Vyukov2024-11-121-0/+519
|
* tools/syz-declextract: add entry function and access levelDmitry Vyukov2024-11-121-0/+914
| | | | For now for netlink only.
* sys/linux: regenerate automatic descriptionsDmitry Vyukov2024-11-1123-8631/+595
|
* tools/syz-declextract: enumerate io_uring operationsDmitry Vyukov2024-11-112-314/+1015
|
* tools/syz-declextract: annotate interfaces with descriptions presenceDmitry Vyukov2024-11-111-867/+2601
|
* tools/syz-declextract: fix non-determinism and syscall selectionDmitry Vyukov2024-11-113-40/+76
| | | | | | | | | Currently syscall selection is non-deterministic and we frequently choose wrond ones. This leads to flaky argument names/types, and wrong argument types (e.g. int16 instead of uid, old_utimbuf32 instead of utimbuf, etc). Make syscall selection robust and correct.
* sys/linux: regenerate const filesDmitry Vyukov2024-11-111-1/+0
|
* sys/linux: update 9p mount optionsSablin Viacheslav2024-11-111-0/+4
|
* sys/linux: add test_dummy_encryption=v1 mount flag for ext4 and f2fsSablin Viacheslav2024-11-051-166/+168
|
* sys/linux: added new ioctls for f2fsSablin Viacheslav2024-11-042-0/+26
|
* sys/linux: use syz_init_net_socket for bluetoothSabyrzhan Tasbolatov2024-10-301-4/+4
| | | | | | Replace socket_$bt_{bnep, cmtp, hidp, rfcomm} to syz_init_net_socket. Fixes: https://github.com/google/syzkaller/issues/4729
* tools/syz-declextract: add files/subsystems for interfacesDmitry Vyukov2024-10-251-864/+6121
|
* tools/syz-declextract: rework interface list handlingDmitry Vyukov2024-10-251-0/+3458
| | | | | | | | Produce both descriptions and interface list in one run (it's slow, we don't want/need to run the tool twice). Produce output in json format. Later we will add more properties, and will do more processing of the list.
* tools/syz-declextract: make fixed header more readableDmitry Vyukov2024-10-251-3/+3
| | | | Combine all fixed header parts in a single raw string literal.
* sys/linux: regenerate descriptionsDmitry Vyukov2024-10-255-378/+452
| | | | Regenerate descriptions on kernel commit 715ca9dd687f89ddaac8ec8ccb3b5e5a30311a99.
* dashboard/config/linux: increase number of devices to 32Dmitry Vyukov2024-10-243-0/+5
|
* executor: sys/linux: arm64: reserve address for ITS, add a seed for ITS creationAlexander Potapenko2024-10-212-1/+31
| | | | | | | Reserve SYZOS address for the ITS redistributor at 0x08080000, add it to the list of kvm_guest_addrs. Also implement a syzlang test for the host part of ITS configuration as per https://www.kernel.org/doc/html/v6.1/virt/kvm/devices/arm-vgic-its.html
* sys/linux/dev_kvm.txt: syz_kvm_vgic_v3_setup() should return fd_kvmdevAlexander Potapenko2024-10-211-1/+1
|
* sys/linux/test: split dev_iommuAleksandr Nogikh2024-10-143-28/+30
| | | | | The test has become too big (>40 calls). Split off dev_iommu_vfio and remove the overlap with dev_iommu_hwpt.
* sys/linux: describe new BTF typesPaul Chaignon2024-10-102-0/+54
| | | | | | | | | | | | | Describe four new BTF types introduced in commits [1, 2, 3, 4] upstream. Note BTF_KIND_TAG was later renamed to BTF_KIND_DECL_TAG. These four types are also described in the documentation at [5]. 1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1828f0b04828 2 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b5ea834dde6b6 3 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8c42d2fa4eeab 4 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6089fb325cf73 5 - https://docs.kernel.org/bpf/btf.html#btf-kind-float Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
* sys/linux: fix linkage field of BTF_KIND_VAR typePaul Chaignon2024-10-102-1/+5
| | | | | | | | | | The linkage field of BTF type BTF_KIND_VAR isn't actually a boolean, but a flag. Given it can now take three different values [1], it doesn't match the boolean type and needs to be fixed. This commit defines it as a proper flags type. 1 - https://docs.kernel.org/bpf/btf.html#btf-kind-var Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
* sys/linux: add automatic_helper attribute to some syscalls and run ↵Pimyn Girgis2024-10-098-330/+360
| | | | syz-declextract
* sys/linux: add Landlock scopes for Linux 6.12Mickaël Salaün2024-09-3010-10/+15
| | | | | | | | | | Add new the landlock_ruleset_attr's "scoped" field and related flags for Linux 6.12: LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET and LANDLOCK_SCOPE_SIGNAL. Update tests with the new landlock_ruleset_attr's field. Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
* sys/linux/test: add ELF binary seedDmitry Vyukov2024-09-272-2/+7
| | | | Add a seed that creates and execs something that resembles an ELF binary.
* sys/linux: add descriptions for binfmt_misc register/formatsDmitry Vyukov2024-09-271-0/+34
|
* sys/linux: fix binfmt_misc formatDmitry Vyukov2024-09-271-8/+1
| | | | | | | We create 2 binfmt_misc formats: ":syz0:M:0:\x01::./file0:" ":syz1:M:1:\x02::./file0:POC" They don't require syz0/1 prefix in the fix. syz0/1 is just name of the format.
* sys/linux: use GICD/GICR register offsets in SYZOS_API_MEMWRITEAlexander Potapenko2024-09-274-3/+156
| | | | | In addition to random offsets passed to SYZOS_API_MEMWRITE, use VGICv3 distributor/redistributor base and offsets of the corresponding registers.
* sys/linux: result of running syz-declextractPimyn Girgis2024-09-256-1110/+3442
|
* sys/linux/test: add arm64-syz_kvm_setup_syzos_vm-vgicv3-cpu1Alexander Potapenko2024-09-251-0/+16
| | | | | This is a variant of arm64-syz_kvm_setup_syzos_vm-vgicv3 running on a secondary CPU.
* sys/linux: add tests for syz_kvm_setup_syzos_vm()Alexander Potapenko2024-09-255-0/+86
| | | | Rewrite existing tests using syz_kvm_setup_cpu to use the new pseudo-syscall API
* executor: arm64: sys/linux: implement syz_kvm_setup_syzos_vm and ↵Alexander Potapenko2024-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | syz_kvm_add_vcpu The old syz_kvm_setup_cpu() API mixed together VM and VCPU setup, making it harder to create and fuzz two VCPUs in the same VM. Introduce two new pseudo-syscalls, syz_kvm_setup_syzos_vm() and syz_kvm_add_vcpu(), that will simplify this task. syz_kvm_setup_syzos_vm() takes a VM file descriptor, performs VM setup (allocates guest memory and installs SYZOS code into it) and returns a new kvm_syz_vm resource, which is in fact a pointer to `struct kvm_syz_vm` encapsulating VM-specific data in the C code. syz_kvm_add_vcpu() takes the VM ID denoted by kvm_syz_vm and creates a new VCPU within that VM with a proper CPU number. It then stores the fuzzer-supplied SYZOS API sequence into the corresponding part (indexed by CPU number) of the VM memory slot, and sets up the CPU registers to interpret that sequence. The new pseudo-syscall let the fuzzer create independent CPUs that run different code sequences without interfering with each other.
* sys/linux: add syz_create_resourceDmitry Vyukov2024-09-194-17/+40
| | | | | | | | syz_create_resource allows to turn any value into a resource. Improve binfmt descriptions using syz_create_resource: we need to pass the same file name to write syscalls and execve. Use syz_create_resource to improve binfmt descriptions.
* sys/linux: ignore return values of lseek for fake coverageDmitry Vyukov2024-09-131-1/+5
|