From owner-dev-commits-src-all@freebsd.org Sat May 8 06:25:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7C7662A84D; Sat, 8 May 2021 06:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fcckk4LNJz4Ycb; Sat, 8 May 2021 06:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 881FD1A21C; Sat, 8 May 2021 06:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1486PY7C022465; Sat, 8 May 2021 06:25:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1486PYS0022464; Sat, 8 May 2021 06:25:34 GMT (envelope-from git) Date: Sat, 8 May 2021 06:25:34 GMT Message-Id: <202105080625.1486PYS0022464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 2018d4886281 - main - stress2: Added two new syzkaller reproducers. Update the exclude list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2018d4886281275b4222c860545fa97ab97029e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2021 06:25:34 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=2018d4886281275b4222c860545fa97ab97029e3 commit 2018d4886281275b4222c860545fa97ab97029e3 Author: Peter Holm AuthorDate: 2021-05-08 06:24:42 +0000 Commit: Peter Holm CommitDate: 2021-05-08 06:24:42 +0000 stress2: Added two new syzkaller reproducers. Update the exclude list --- tools/test/stress2/misc/all.exclude | 4 +- tools/test/stress2/misc/syzkaller35.sh | 101 +++++++++++++++++++++++++++++++++ tools/test/stress2/misc/syzkaller36.sh | 98 ++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 50e4d0ecc77b..e388fa8957d9 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -48,8 +48,6 @@ quota10.sh people.freebsd.org/~pho/stress/log/quota10-2.txt 20200525 quota2.sh panic: dqflush: stray dquot 20120221 quota3.sh panic: softdep_deallocate_dependencies: unrecovered ... 20111222 quota7.sh panic: dqflush: stray dquot 20120221 -sctp.sh panic: Queues are not empty when handling ... i386 20201104 -sctp2.sh panic: soclose: SS_NOFDREF on enter 20200307 sctp3.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 sendfile25.sh WiP 20200611 signal.sh Timing issues. Needs fixing 20171116 @@ -72,6 +70,8 @@ syzkaller30.sh May change policy for random threads to to domainset_fixed 20210 syzkaller31.sh panic: Bad tailq NEXT(0xfffffe0079608f00->tqh_last) != NULL 20210322 syzkaller32.sh Fatal trap 18: integer divide fault while in kernel mode 20210322 syzkaller33.sh Fatal trap 18: integer divide fault while in kernel mode 20210418 +syzkaller35.sh panic: AEAD without a separate IV 20210508 +syzkaller36.sh panic: IV outside buffer length 20210508 truss3.sh WiP 20200915 unionfs.sh insmntque: non-locked vp: xx is not exclusive locked... 20130909 unionfs2.sh insmntque: mp-safe fs and non-locked vp is not ... 20111219 diff --git a/tools/test/stress2/misc/syzkaller35.sh b/tools/test/stress2/misc/syzkaller35.sh new file mode 100755 index 000000000000..14619c24ab9c --- /dev/null +++ b/tools/test/stress2/misc/syzkaller35.sh @@ -0,0 +1,101 @@ +#!/bin/sh + +# panic: AEAD without a separate IV +# cpuid = 18 +# time = 1620305816 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01aeea25d0 +# vpanic() at vpanic+0x181/frame 0xfffffe01aeea2620 +# panic() at panic+0x43/frame 0xfffffe01aeea2680 +# crp_sanity() at crp_sanity+0x4e9/frame 0xfffffe01aeea26b0 +# crypto_dispatch() at crypto_dispatch+0xf/frame 0xfffffe01aeea26d0 +# crypto_ioctl() at crypto_ioctl+0x1e33/frame 0xfffffe01aeea27e0 +# devfs_ioctl() at devfs_ioctl+0xcd/frame 0xfffffe01aeea2830 +# VOP_IOCTL_APV() at VOP_IOCTL_APV+0x59/frame 0xfffffe01aeea2850 +# vn_ioctl() at vn_ioctl+0x133/frame 0xfffffe01aeea2960 +# devfs_ioctl_f() at devfs_ioctl_f+0x1e/frame 0xfffffe01aeea2980 +# kern_ioctl() at kern_ioctl+0x289/frame 0xfffffe01aeea29f0 +# sys_ioctl() at sys_ioctl+0x12a/frame 0xfffffe01aeea2ac0 +# amd64_syscall() at amd64_syscall+0x147/frame 0xfffffe01aeea2bf0 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01aeea2bf0 +# --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8003827da, rsp = 0x7fffffffe848, rbp = 0x7fffffffe890 --- +# KDB: enter: panic +# [ thread pid 4018 tid 100350 ] +# Stopped at kdb_enter+0x37: movq $0,0x1282a9e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #0 main-n246502-49c894ddced: Thu May 6 09:17:33 CEST 2021 +# pho@t2.osted.lan:/usr/src/sys/amd64/compile/PHO +# db> + +[ `uname -p` != "amd64" ] && exit 0 +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +cat > /tmp/syzkaller35.c < +#include +#include +#include +#include +#include +#include +#include +#include +#include + +uint64_t r[1] = {0xffffffffffffffff}; + +int main(void) +{ + syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); + intptr_t res = 0; + memcpy((void*)0x20000340, "/dev/crypto\000", 12); + res = syscall(SYS_openat, 0xffffffffffffff9cul, 0x20000340ul, 0ul, 0ul); + if (res != -1) + r[0] = res; + *(uint32_t*)0x20000440 = 0x28; + *(uint32_t*)0x20000444 = 0; + *(uint32_t*)0x20000448 = 0x10; + *(uint64_t*)0x20000450 = 0x20000380; + memcpy((void*)0x20000380, + "\x3c\x02\x2e\x61\x79\x2e\xec\xb0\x7f\x8a\xee\x18\xe5\xaa\x35\x05", + 16); + *(uint32_t*)0x20000458 = 0; + *(uint64_t*)0x20000460 = 0; + *(uint32_t*)0x20000468 = 0; + *(uint32_t*)0x2000046c = 0xfdffffff; + *(uint32_t*)0x20000470 = 0; + *(uint32_t*)0x20000474 = 0; + *(uint32_t*)0x20000478 = 0; + *(uint32_t*)0x2000047c = 0; + syscall(SYS_ioctl, r[0], 0xc040636aul, 0x20000440ul); + *(uint32_t*)0x20000280 = 0; + *(uint16_t*)0x20000284 = 1; + *(uint16_t*)0x20000286 = 0; + *(uint32_t*)0x20000288 = 0xf0a; + *(uint32_t*)0x2000028c = 0; + *(uint32_t*)0x20000290 = 0; + *(uint64_t*)0x20000298 = 0x20000480; + *(uint64_t*)0x200002a0 = 0; + *(uint64_t*)0x200002a8 = 0; + *(uint64_t*)0x200002b0 = 0x20000680; + *(uint64_t*)0x200002b8 = 0; + syscall(SYS_ioctl, r[0], 0xc040636dul, 0x20000280ul); + return 0; +} +EOF +mycc -o /tmp/syzkaller35 -Wall -Wextra -O0 /tmp/syzkaller35.c || + exit 1 + +kldload cryptodev.ko && loaded=1 +(cd /tmp; timeout 3m ./syzkaller35) +[ $loaded ] && kldunload cryptodev.ko + +rm -rf /tmp/syzkaller35 syzkaller35.c /tmp/syzkaller.* +exit 0 diff --git a/tools/test/stress2/misc/syzkaller36.sh b/tools/test/stress2/misc/syzkaller36.sh new file mode 100755 index 000000000000..ca4678408a25 --- /dev/null +++ b/tools/test/stress2/misc/syzkaller36.sh @@ -0,0 +1,98 @@ +#!/bin/sh + +# panic: IV outside buffer length +# cpuid = 22 +# time = 1620355853 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01af19d5d0 +# vpanic() at vpanic+0x181/frame 0xfffffe01af19d620 +# panic() at panic+0x43/frame 0xfffffe01af19d680 +# crp_sanity() at crp_sanity+0x212/frame 0xfffffe01af19d6b0 +# crypto_dispatch() at crypto_dispatch+0xf/frame 0xfffffe01af19d6d0 +# crypto_ioctl() at crypto_ioctl+0x18a9/frame 0xfffffe01af19d7e0 +# devfs_ioctl() at devfs_ioctl+0xcd/frame 0xfffffe01af19d830 +# VOP_IOCTL_APV() at VOP_IOCTL_APV+0x59/frame 0xfffffe01af19d850 +# vn_ioctl() at vn_ioctl+0x133/frame 0xfffffe01af19d960 +# devfs_ioctl_f() at devfs_ioctl_f+0x1e/frame 0xfffffe01af19d980 +# kern_ioctl() at kern_ioctl+0x289/frame 0xfffffe01af19d9f0 +# sys_ioctl() at sys_ioctl+0x12a/frame 0xfffffe01af19dac0 +# amd64_syscall() at amd64_syscall+0x147/frame 0xfffffe01af19dbf0 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01af19dbf0 +# --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8003827da, rsp = 0x7fffffffe4f8, rbp = 0x7fffffffe540 --- +# KDB: enter: panic +# [ thread pid 2908 tid 100493 ] +# Stopped at kdb_enter+0x37: movq $0,0x1282a9e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #1 main-n246506-be578b67b5a: Thu May 6 19:40:29 CEST 2021 +# pho@t2.osted.lan:/usr/src/sys/amd64/compile/PHO +# db> + +[ `uname -p` != "amd64" ] && exit 0 +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +cat > /tmp/syzkaller36.c < +#include +#include +#include +#include +#include +#include +#include +#include +#include + +uint64_t r[1] = {0xffffffffffffffff}; + +int main(void) +{ + syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); + intptr_t res = 0; + memcpy((void*)0x20000000, "/dev/crypto\000", 12); + res = syscall(SYS_openat, 0xffffffffffffff9cul, 0x20000000ul, 0ul, 0ul); + if (res != -1) + r[0] = res; + *(uint32_t*)0x20000440 = 0x17; + *(uint32_t*)0x20000444 = 0; + *(uint32_t*)0x20000448 = 0x10; + *(uint64_t*)0x20000450 = 0x200001c0; + memcpy((void*)0x200001c0, + "\x3c\x02\x2e\x61\x79\x2e\xec\xb0\x7f\x8a\xee\x18\xe5\xaa\x35\x05", + 16); + *(uint32_t*)0x20000458 = 0; + *(uint64_t*)0x20000460 = 0; + *(uint32_t*)0x20000468 = 0; + *(uint32_t*)0x2000046c = 0xfdffffff; + *(uint32_t*)0x20000470 = 0; + *(uint32_t*)0x20000474 = 0; + *(uint32_t*)0x20000478 = 0; + *(uint32_t*)0x2000047c = 0; + syscall(SYS_ioctl, r[0], 0xc040636aul, 0x20000440ul); + *(uint32_t*)0x20000180 = 0; + *(uint16_t*)0x20000184 = 1; + *(uint16_t*)0x20000186 = 0; + *(uint32_t*)0x20000188 = 7; + *(uint64_t*)0x20000190 = 0x20000200; + *(uint64_t*)0x20000198 = 0; + *(uint64_t*)0x200001a0 = 0; + *(uint64_t*)0x200001a8 = 0; + syscall(SYS_ioctl, r[0], 0xc0306367ul, 0x20000180ul); + return 0; +} +EOF +mycc -o /tmp/syzkaller36 -Wall -Wextra -O0 /tmp/syzkaller36.c || + exit 1 + +kldload cryptodev.ko && loaded=1 +(cd /tmp; timeout 3m ./syzkaller36) +[ $loaded ] && kldunload cryptodev.ko + +rm -rf /tmp/syzkaller36 syzkaller36.c /tmp/syzkaller.* +exit 0