Hello,
syzbot found the following issue on:
HEAD commit: 275cd30cffcd In a section 1 manual, use the plain English ..
git tree: openbsd
console output:
https://syzkaller.appspot.com/x/log.txt?x=115d6bdf980000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7058272de1526588
dashboard link:
https://syzkaller.appspot.com/bug?extid=171f3fbee35ba6030ee9
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/19bf9c285724/disk-275cd30c.raw.xz
bsd.gdb:
https://storage.googleapis.com/syzbot-assets/a4ba84a21048/bsd-275cd30c.gdb.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/0582828e2b89/kernel-275cd30c.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+171f3f...@syzkaller.appspotmail.com
panic: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/multicore/kernel/sys/net/if_tun.c", line 322
Stopped at db_enter+0x25: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*415774 99968 0 0x2 0 0K ifconfig
143745 82857 0 0x14000 0x200 1 reaper
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff83437f15) at panic+0x1e5 sys/kern/subr_prf.c:198
__assert(ffffffff833e6541,ffffffff833b894d,142,ffffffff833c30fd) at __assert+0x29
tun_clone_destroy(ffff800001459000) at tun_clone_destroy+0x38a sys/net/if_tun.c:322
if_clone_destroy(ffff80002a42e860) at if_clone_destroy+0x1d7 sys/net/if.c:1383
ifioctl(ffff800001442570,80206979,ffff80002a42e860,ffff80002a4431e8) at ifioctl+0x5c5
sys_ioctl(ffff80002a4431e8,ffff80002a42ea40,ffff80002a42e990) at sys_ioctl+0x5c3
syscall(ffff80002a42ea40) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a42ea40) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x741297e0db20, count: 6
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
*cpu0: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/multicore/kernel/sys/net/if_tun.c", line 322
ddb{0}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff83437f15) at panic+0x1e5 sys/kern/subr_prf.c:198
__assert(ffffffff833e6541,ffffffff833b894d,142,ffffffff833c30fd) at __assert+0x29
tun_clone_destroy(ffff800001459000) at tun_clone_destroy+0x38a sys/net/if_tun.c:322
if_clone_destroy(ffff80002a42e860) at if_clone_destroy+0x1d7 sys/net/if.c:1383
ifioctl(ffff800001442570,80206979,ffff80002a42e860,ffff80002a4431e8) at ifioctl+0x5c5
sys_ioctl(ffff80002a4431e8,ffff80002a42ea40,ffff80002a42e990) at sys_ioctl+0x5c3
syscall(ffff80002a42ea40) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a42ea40) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x741297e0db20, count: -9
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002a42e610
rbx 0xffffffff83798dc7 cpu_info_full_primary+0x2dc7
rdx 0
rcx 0xffff80002a4431e8
rax 0xffffffff83797ff0 cpu_info_full_primary+0x1ff0
r8 0x101010101010101
r9 0x8080808080808080
r10 0xc47a1f7583eb35e6
r11 0x8c2ca434817f3878
r12 0xffffffff83798bc8 cpu_info_full_primary+0x2bc8
r13 0
r14 0
r15 0x1
rip 0xffffffff824f07e5 db_enter+0x25
cs 0x8
rflags 0x246
rsp 0xffff80002a42e600
ss 0x10
db_enter+0x25: addq $0x8,%rsp
ddb{0}> show proc
PROC (ifconfig) tid=415774 pid=99968 tcnt=1 stat=onproc
flags process=2<EXEC> proc=0
runpri=32, usrpri=86, slppri=32, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
forw=0xffffffffffffffff, list=0xffff8000ffffc008,0xffff80002a443708
process=0xffff80002a49b920 user=0xffff80002a429000, vmspace=0xfffffd807eb8b720
estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
14676 50372 91326 0 3 0x2 clonelk ifconfig
91326 200517 35670 0 3 0x10008a sigsusp sh
*99968 415774 66452 0 7 0x2 ifconfig
66452 247278 38862 0 3 0x10008a sigsusp sh
35670 81172 11046 0 3 0x82 wait syz-executor
38862 307890 11046 0 3 0x82 wait syz-executor
5687 319802 0 0 3 0x14280 nfsidl nfsio
78845 203934 0 0 3 0x14280 nfsidl nfsio
58757 112679 0 0 3 0x14280 nfsidl nfsio
16078 434792 0 0 3 0x14280 nfsidl nfsio
6917 264522 0 0 3 0x14280 nfsidl nfsio
26784 417227 0 0 3 0x14280 nfsidl nfsio
98974 133249 0 0 3 0x14280 nfsidl nfsio
14810 404553 0 0 3 0x14280 nfsidl nfsio
29331 109434 0 0 3 0x14280 nfsidl nfsio
85642 428380 0 0 3 0x14280 nfsidl nfsio
83215 59346 0 0 3 0x14280 nfsidl nfsio
23592 216552 0 0 3 0x14280 nfsidl nfsio
66988 285944 0 0 3 0x14280 nfsidl nfsio
90969 256529 0 0 3 0x14280 nfsidl nfsio
50463 305463 0 0 3 0x14280 nfsidl nfsio
1593 88120 0 0 3 0x14280 nfsidl nfsio
81754 183242 0 0 3 0x14280 nfsidl nfsio
29520 319531 0 0 3 0x14280 nfsidl nfsio
94785 128324 0 0 3 0x14280 nfsidl nfsio
47519 166942 0 0 3 0x14280 nfsidl nfsio
35170 425554 0 0 3 0x14200 bored sosplice
39273 223870 11046 0 3 0x82 piperd syz-executor
39686 376900 11046 0 3 0x82 piperd syz-executor
92933 466911 11046 0 3 0x82 piperd syz-executor
11046 54073 96080 0 3 0x82 wait syz-executor
96080 193552 23687 0 3 0x10008a sigsusp ksh
23687 465029 54260 0 3 0x98 kqread sshd-session
54260 458479 27366 0 3 0x92 kqread sshd-session
49757 17871 1 0 3 0x100083 ttyin getty
27366 342660 1 0 3 0x88 kqread sshd
54774 324699 15318 74 3 0x1100092 bpf pflogd
15318 427730 1 0 3 0x80 sbwait pflogd
22325 83717 93157 73 3 0x1100090 kqread syslogd
93157 11111 1 0 3 0x100082 sbwait syslogd
89074 281163 1 0 3 0x100080 kqread resolvd
10526 49913 25616 77 2 0x100012 dhcpleased
96713 133005 25616 77 2 0x100012 dhcpleased
25616 207574 1 0 3 0x80 kqread dhcpleased
38962 301754 0 0 3 0x14200 bored smr
45835 93940 0 0 2 0x14200 zerothread
78724 52261 0 0 3 0x14200 aiodoned aiodoned
78570 330439 0 0 3 0x14200 syncer update
93414 424876 0 0 3 0x14200 cleaner cleaner
82857 143745 0 0 7 0x14200 reaper
55092 360587 0 0 3 0x14200 pgdaemon pagedaemon
92425 83304 0 0 3 0x14200 bored viomb
70323 422051 0 0 3 0x40014200 acpi0 acpi0
84152 510995 0 0 3 0x40014200 idle1
54269 187213 0 0 3 0x14200 bored softnet3
74194 484669 0 0 3 0x14200 bored softnet2
31361 173166 0 0 3 0x14200 bored softnet1
39124 439132 0 0 2 0x14200 softnet0
78488 255659 0 0 3 0x14200 bored systqmp
13122 14589 0 0 3 0x14200 bored systq
89456 319072 0 0 3 0x14200 tmoslp softclockmp
86782 84767 0 0 3 0x40014200 tmoslp softclock
80739 231029 0 0 3 0x40014200 idle0
1 403527 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 99968 (ifconfig) thread 0xffff80002a4431e8 (415774)
exclusive rwlock clonelk r = 0 (0xffffffff83820328)
#0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5bb sys/kern/subr_witness.c:1155
#1 rw_do_enter_write+0x3ea sys/kern/kern_rwlock.c:316
#2 if_clone_destroy+0x67
#3 ifioctl+0x5c5
#4 sys_ioctl+0x5c3
#5 syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#5 syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
#6 Xsyscall+0x128
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839ad518)
#0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5bb sys/kern/subr_witness.c:1155
#1 __mp_acquire_count+0x58
#2 mi_switch+0x4b7 sys/kern/sched_bsd.c:441
#3 sleep_finish+0x24f sys/kern/kern_synch.c:414
#4 rw_do_enter_write+0x1de sys/kern/kern_rwlock.c:292
#5 if_clone_destroy+0x67
#6 ifioctl+0x5c5
#7 sys_ioctl+0x5c3
#8 syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#8 syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
#9 Xsyscall+0x128
Process 39124 (softnet0) thread 0xffff8000ffffea20 (439132)
shared rwlock softnet0 r = 0 (0xffff80000002c070)
#0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5bb sys/kern/subr_witness.c:1155
#1 taskq_thread+0x12a sys/kern/kern_task.c:442
#2 proc_trampoline+0x10
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10180 11011K 11286K 166960K 11516 0
pcb 17 12K 12K 166960K 46 0
rtable 149 4K 7K 166960K 368 0
pf 26 16K 18K 166960K 48 0
ifaddr 27 4K 7K 166960K 47 0
ifgroup 39 1K 2K 166960K 57 0
sysctl 1 1K 1K 166960K 1 0
counters 56 35K 36K 166960K 66 0
ioctlops 0 0K 4K 166960K 1499 0
iov 0 0K 12K 166960K 11 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1402 88K 89K 166960K 1637 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 5K 166960K 5 0
VM map 2 1K 1K 166960K 2 0
sem 7 0K 0K 166960K 8 0
dirhash 12 2K 2K 166960K 15 0
ACPI 1690 195K 286K 166960K 12468 0
file desc 11 37K 89K 166960K 298 0
sigio 0 0K 0K 166960K 5 0
proc 86 116K 128K 166960K 566 0
subproc 45 2K 4K 166960K 109 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
ip_moptions 0 0K 0K 166960K 12 0
in_multi 55 4K 7K 166960K 103 0
ether_multi 1 0K 0K 166960K 2 0
mrt 0 0K 0K 166960K 1 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 61 281K 281K 166960K 61 0
exec 0 0K 1K 166960K 521 0
fusefs mount 1 32K 32K 166960K 1 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 150 46K 82K 166960K 4310 0
UVM aobj 7 2K 2K 166960K 7 0
pinsyscall 36 72K 100K 166960K 1419 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
ip6_options 0 0K 0K 166960K 7 0
NDP 8 0K 2K 166960K 29 0
temp 26 8634K 8702K 166960K 7213 0
kqueue 13 20K 30K 166960K 51 0
SYN cache 2 16K 16K 166960K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 24 0 0 1 0 1 1 0 8 0
rtpcb 120 45 0 42 1 0 1 1 0 8 0
rtentry 112 111 0 45 4 0 4 4 0 8 0
unpcb 144 101 0 84 1 0 1 1 0 8 0
syncache 336 4 0 4 1 1 0 1 0 8 0
tcpcb 808 46 0 42 1 0 1 1 0 8 0
arp 120 18 0 8 1 0 1 1 0 8 0
inpcb 376 189 0 180 2 0 2 2 0 8 1
nd6 136 24 0 12 1 0 1 1 0 8 0
pkpcb 40 1 0 1 1 1 0 1 0 8 0
kcovpl 48 12 0 7 1 0 1 1 0 8 0
ppxss 1168 1 0 1 1 1 0 1 0 8 0
pffrag 232 2 0 0 1 0 1 1 0 482 0
pffrnode 88 2 0 0 1 0 1 1 0 8 0
pffrent 40 2 0 0 1 0 1 1 0 8 0
pfosfp 40 1428 0 1005 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfstitem 24 23 0 13 1 0 1 1 0 8 0
pfstkey 128 23 0 13 1 0 1 1 0 8 0
pfstate 376 23 0 13 3 0 3 3 0 8 0
pfrule 1344 21 0 16 2 1 1 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 452 0 176 29 1 28 29 0 8 6
art_table 32 453 0 176 4 0 4 4 0 8 0
art_node 16 110 0 50 1 0 1 1 0 8 0
semapl 112 6 0 1 1 0 1 1 0 8 0
shmpl 112 4 0 0 1 0 1 1 0 8 0
dirhash 1024 19 0 2 3 0 3 3 0 8 0
dino2pl 256 1898 0 393 95 0 95 95 0 8 0
ffsino 280 1898 0 393 109 0 109 109 0 8 0
nchpl 144 2324 0 1795 63 33 30 63 0 8 7
uvmvnodes 80 2151 0 0 44 0 44 44 0 8 0
vnodes 216 2151 0 0 120 0 120 120 0 8 0
namei 1024 8132 0 8132 1 0 1 1 0 8 1
percpumem 16 47 0 5 1 0 1 1 0 8 0
kstatmem 264 26 0 10 2 0 2 2 0 8 0
scxspl 216 7114 0 7114 5 3 2 3 1 8 2
plimitpl 152 62 0 45 1 0 1 1 0 8 0
sigapl 424 619 0 552 8 0 8 8 0 8 0
futexpl 64 2515 0 2515 1 0 1 1 0 8 1
knotepl 120 311 0 0 10 0 10 10 0 8 0
kqueuepl 216 62 0 53 1 0 1 1 0 8 0
pipepl 328 134 0 107 3 0 3 3 0 8 0
fdescpl 504 580 0 555 5 0 5 5 0 8 1
filepl 152 3087 0 2918 12 1 11 12 0 8 2
lockfpl 104 308 0 306 2 1 1 2 0 8 0
lockfspl 48 89 0 87 1 0 1 1 0 8 0
sessionpl 144 27 0 18 1 0 1 1 0 8 0
pgrppl 48 41 0 24 1 0 1 1 0 8 0
ucredpl 104 450 0 437 1 0 1 1 0 8 0
zombiepl 144 555 0 552 1 0 1 1 0 8 0
processpl 1168 619 0 552 6 0 6 6 0 8 0
procpl 648 875 0 808 7 0 7 7 0 8 0
srpgc 96 4 0 4 2 1 1 1 0 8 1
sosppl 168 2 0 2 1 1 0 1 0 8 0
sockpl 688 337 0 308 4 0 4 4 0 8 1
mcl64k 65536 2 0 0 1 0 1 1 0 8 0
mcl16k 16384 1 0 0 1 0 1 1 0 8 0
mcl8k 8192 6 0 0 1 0 1 1 0 8 0
mcl4k 4096 117 0 0 15 0 15 15 0 8 0
mcl2k 2048 18 0 0 3 0 3 3 0 8 0
mtagpl 96 7 0 0 1 0 1 1 0 8 0
mbufpl 256 206 0 0 13 0 13 13 0 8 0
bufpl 280 2611 0 130 178 0 178 178 0 8 0
anonpl 24 123508 0 120547 49 2 47 48 0 184 16
amapchunkpl 152 13365 0 13097 26 1 25 26 0 158 8
amappl16 200 2581 0 2567 18 8 10 15 0 8 8
amappl15 192 6 0 6 1 1 0 1 0 8 0
amappl14 184 115 0 103 1 0 1 1 0 8 0
amappl13 176 5 0 5 1 1 0 1 0 8 0
amappl12 168 1247 0 1222 3 1 2 2 0 8 0
amappl11 160 70 0 56 1 0 1 1 0 8 0
amappl10 152 7 0 7 1 1 0 1 0 8 0
amappl9 144 246 0 246 1 1 0 1 0 8 0
amappl8 136 24 0 21 1 0 1 1 0 8 0
amappl7 128 110 0 97 1 0 1 1 0 8 0
amappl6 120 186 0 179 1 0 1 1 0 8 0
amappl5 112 125 0 114 1 0 1 1 0 8 0
amappl4 104 320 0 300 1 0 1 1 0 8 0
amappl3 96 2291 0 2229 4 0 4 4 0 8 1
amappl2 88 666 0 600 2 0 2 2 0 8 0
amappl1 80 8591 0 8035 14 1 13 14 0 8 0
amappl 88 3916 0 3819 5 0 5 5 0 92 1
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 253 0 253 1 1 0 1 0 8 0
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 6 0 0 1 0 1 1 0 8 0
uaddrrnd 24 580 0 555 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 580 0 555 1 0 1 1 0 8 0
vmmpekpl 168 6679 0 6623 3 0 3 3 0 8 0
vmmpepl 168 42537 0 41089 96 1 95 96 0 357 16
vmsppl 456 579 0 555 5 0 5 5 0 8 1
rwobjpl 64 17291 0 14295 51 1 50 51 0 8 0
pdppl 4096 1168 0 1110 104 32 72 84 0 8 14
pvpl 32 16473 0 0 134 1 133 133 0 265 0
pmappl 248 579 0 555 3 0 3 3 0 8 1
extentpl 40 55 0 38 1 0 1 1 0 8 0
phpool 112 284 0 37 8 0 8 8 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff83437f15) at panic+0x1e5 sys/kern/subr_prf.c:198
__assert(ffffffff833e6541,ffffffff833b894d,142,ffffffff833c30fd) at __assert+0x29
tun_clone_destroy(ffff800001459000) at tun_clone_destroy+0x38a sys/net/if_tun.c:322
if_clone_destroy(ffff80002a42e860) at if_clone_destroy+0x1d7 sys/net/if.c:1383
ifioctl(ffff800001442570,80206979,ffff80002a42e860,ffff80002a4431e8) at ifioctl+0x5c5
sys_ioctl(ffff80002a4431e8,ffff80002a42ea40,ffff80002a42e990) at sys_ioctl+0x5c3
syscall(ffff80002a42ea40) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a42ea40) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x741297e0db20, count: -9
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x27: addq $0x8,%rsp
x86_ipi_db(ffff800029aabff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
__mp_lock(ffffffff839ad310) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline]
__mp_lock(ffffffff839ad310) at __mp_lock+0x192 sys/kern/kern_lock.c:144
reaper(ffff8000ffffd6d0) at reaper+0x24b sys/kern/kern_exit.c:478
end trace frame: 0x0, count: 10
ddb{1}> trace
x86_ipi_db(ffff800029aabff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
__mp_lock(ffffffff839ad310) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline]
__mp_lock(ffffffff839ad310) at __mp_lock+0x192 sys/kern/kern_lock.c:144
reaper(ffff8000ffffd6d0) at reaper+0x24b sys/kern/kern_exit.c:478
end trace frame: 0x0, count: -5
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup