¹j¼õ¬|ÿ ž¨E1\…:panic: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/main/kernel/sys/net/if_tun.c", line 319 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *281029 3543 0 0x2 0 0 ifconfig db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bdfe1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f7f80,ffffffff834343de,13f,ffffffff8343dd9c) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff8000015cb800) at tun_clone_destroy+0x32d if_clone_destroy(ffff800038d65430) at if_clone_destroy+0x1d5 sys/net/if.c:1464 sys_ioctl(ffff80002a795240,ffff800038d65600,ffff800038d65550) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff800038d65600) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038d65600) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7597e7218d20, count: 7 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/main/kernel/sys/net/if_tun.c", line 319 ddb> show kasan No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bdfe1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f7f80,ffffffff834343de,13f,ffffffff8343dd9c) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff8000015cb800) at tun_clone_destroy+0x32d if_clone_destroy(ffff800038d65430) at if_clone_destroy+0x1d5 sys/net/if.c:1464 sys_ioctl(ffff80002a795240,ffff800038d65600,ffff800038d65550) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff800038d65600) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038d65600) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7597e7218d20, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800038d652c0 rbx 0 rdx 0 rcx 0 rax 0xffff80002a795240 r8 0x101010101010101 r9 0x8080808080808080 r10 0x9690404de7eb71af r11 0xe5abfc5eeb399464 r12 0 r13 0xffffffff83992f50 tap_cloner r14 0 r15 0x1 rip 0xffffffff82fb1d85 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800038d652b0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (ifconfig) tid=281029 pid=3543 tcnt=1 stat=onproc flags process=2 proc=0 runpri=32, usrpri=76, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a794a78,0xffff80002a794028 process=0xffff8000390d8930 user=0xffff800038d60000, vmspace=0xfffff980700c6cf8 estcpu=26, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 80301 197849 29010 0 3 0x2 0 clonelk ifconfig 29010 357051 27344 0 3 0x100002 0x88 sigsusp sh 27344 402897 46722 0 3 0x2 0x80 wait syz-executor * 3543 281029 88324 0 7 0x2 0 ifconfig 88324 431243 37511 0 3 0x100002 0x88 sigsusp sh 37511 10355 46722 0 3 0x2 0x80 wait syz-executor 58112 220034 50412 0 2 0x2 0 ifconfig 50412 443657 32262 0 3 0x100002 0x88 sigsusp sh 32262 224040 46722 0 3 0x2 0x80 wait syz-executor 60543 34236 46722 0 2 0x2 0xc80 syz-executor 1842 246681 0 0 3 0x14000 0x200 acct acct 34398 90807 46722 0 3 0x2 0x80 piperd syz-executor 29628 189216 0 0 3 0x14000 0x280 nfsidl nfsio 62491 220335 0 0 3 0x14000 0x280 nfsidl nfsio 66322 71346 0 0 3 0x14000 0x280 nfsidl nfsio 3430 396584 0 0 3 0x14000 0x280 nfsidl nfsio 20962 435500 0 0 3 0x14000 0x280 nfsidl nfsio 90949 97073 0 0 3 0x14000 0x280 nfsidl nfsio 83683 364312 0 0 3 0x14000 0x280 nfsidl nfsio 21175 29374 0 0 3 0x14000 0x280 nfsidl nfsio 79426 480707 0 0 3 0x14000 0x280 nfsidl nfsio 61074 115086 0 0 3 0x14000 0x280 nfsidl nfsio 2971 338586 0 0 3 0x14000 0x280 nfsidl nfsio 16644 90974 0 0 3 0x14000 0x280 nfsidl nfsio 24135 399743 0 0 3 0x14000 0x280 nfsidl nfsio 26292 423182 0 0 3 0x14000 0x280 nfsidl nfsio 80665 453680 0 0 3 0x14000 0x280 nfsidl nfsio 21793 3183 0 0 3 0x14000 0x280 nfsidl nfsio 88905 151531 0 0 3 0x14000 0x280 nfsidl nfsio 81915 147635 0 0 3 0x14000 0x280 nfsidl nfsio 34173 420717 0 0 3 0x14000 0x280 nfsidl nfsio 54930 265222 0 0 3 0x14000 0x280 nfsidl nfsio 21359 306001 46722 0 3 0x2 0x80 nanoslp syz-executor 46722 264625 73721 0 3 0x2 0x80 wait syz-executor 73721 376127 34163 0 3 0x100002 0x88 sigsusp ksh 34163 316212 69875 0 3 0x10 0x88 kqread sshd-session 69875 465464 53653 0 3 0x12 0x80 kqread sshd-session 27630 442880 1 0 3 0x100003 0x80 ttyin getty 53653 422698 1 0 3 0 0x88 kqread sshd 13458 408370 43839 73 3 0x1100010 0x80 kqread syslogd 43839 203512 1 0 3 0x100002 0x80 sbwait syslogd-parent 88732 148097 1 0 3 0x100000 0x80 kqread resolvd 56871 456721 213 77 2 0x100012 0 dhcpleased 37263 7726 213 77 3 0x100012 0x80 kqread dhcpleased 213 267170 1 0 3 0 0x80 kqread dhcpleased 83425 73887 0 0 3 0x14000 0x200 bored smr 76181 163252 0 0 3 0x14000 0x200 pgzero zerothread 54055 242300 0 0 3 0x14000 0x200 aiodoned aiodoned 59562 434818 0 0 3 0x14000 0x200 syncer update 16457 292235 0 0 3 0x14000 0x200 cleaner cleaner 94273 216936 0 0 3 0x14000 0x200 reaper reaper 76914 356465 0 0 3 0x14000 0x200 pgdaemon pagedaemon 34970 326873 0 0 3 0x14000 0x200 bored viomb 76828 482258 0 0 3 0x14000 0x40000200 acpi0 acpi0 21284 271396 0 0 3 0x14000 0x200 bored softnet0 62856 317788 0 0 3 0x14000 0x200 smrbar systqmp 34556 209907 0 0 3 0x14000 0x200 bored systq 55576 159634 0 0 2 0x14000 0x40000200 softclock 75083 117013 0 0 3 0x14000 0x40000200 idle0 1 142865 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11024 12091K 12248K 166960K 12411 0 pcb 17 13K 14K 166960K 88 0 rtable 106 4K 8K 166960K 1441 0 pf 25 12K 72K 166960K 165 0 ifaddr 22 4K 8K 166960K 212 0 ifgroup 39 1K 2K 166960K 242 0 sysctl 4 1K 9K 166960K 8 0 counters 31 17K 18K 166960K 90 0 ioctlops 0 0K 4K 166960K 118 0 iov 0 0K 16K 166960K 12 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1293 81K 82K 166960K 1934 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 6 0 VM map 2 1K 1K 166960K 2 0 sem 10 0K 0K 166960K 12 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12472 0 file desc 17 61K 89K 166960K 879 0 sigio 0 0K 0K 166960K 1 0 proc 82 83K 83K 166960K 1532 0 subproc 63 3K 4K 166960K 414 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 15 0 in_multi 34 2K 6K 166960K 488 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 17 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 853 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 197 145K 164K 166960K 7656 0 UVM aobj 72 3K 5K 166960K 73 0 pinsyscall 38 76K 93K 166960K 2905 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 5 0 NDP 8 0K 2K 166960K 152 0 temp 34 9114K 9179K 166960K 15556 0 kqueue 13 20K 26K 166960K 68 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 119 0 116 1 0 1 1 0 8 0 rtentry 136 506 0 460 4 0 4 4 0 8 0 unpcb 144 140 0 124 1 0 1 1 0 8 0 syncache 336 6 0 6 1 0 1 1 0 8 1 tcpcb 736 105 0 101 4 0 4 4 0 8 3 arp 96 91 0 84 1 0 1 1 0 8 0 inpcb 328 416 0 406 4 0 4 4 0 8 3 ip6q 80 2 0 2 1 0 1 1 0 8 1 ip6af 40 4 0 4 1 0 1 1 0 8 1 nd6 112 130 0 124 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 46 0 39 1 0 1 1 0 8 0 ppxss 1072 17 0 16 1 0 1 1 0 8 0 pppxif 1416 2 0 1 1 0 1 1 0 8 0 pfrktable 1344 6 0 6 1 0 1 1 0 8 1 pfanchor 1288 2 0 2 1 0 1 1 0 8 1 pftag 88 1 0 0 1 0 1 1 0 8 0 pfrule 1360 6 0 6 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 2039 0 1792 33 7 26 33 0 8 6 art_table 40 2041 0 1792 6 0 6 6 0 8 1 art_node 32 506 0 454 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 72 10 0 2 1 0 1 1 0 8 0 shmpl 120 69 0 0 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2059 0 518 97 0 97 97 0 8 0 ffsino 256 2059 0 518 97 0 97 97 0 8 0 nchpl 144 2526 0 672 69 0 69 69 0 8 0 vnodes 216 2588 0 0 144 0 144 144 0 8 0 namei 1024 12489 0 12489 3 0 3 3 0 8 3 vcpupl 3968 16 0 16 2 0 2 2 0 8 2 vmpool 808 1 0 1 1 0 1 1 0 8 1 pfiaddrpl 120 2 0 2 1 0 1 1 0 8 1 kstatmem 264 133 0 116 3 0 3 3 0 8 1 scxspl 216 12228 0 12228 8 0 8 8 1 8 8 plimitpl 152 99 0 83 1 0 1 1 0 8 0 sigapl 424 1114 0 1050 8 0 8 8 0 8 0 knotepl 120 9919 0 9872 7 0 7 7 0 8 5 kqueuepl 184 185 0 176 3 0 3 3 0 8 2 pipepl 304 256 0 229 3 0 3 3 0 8 0 fdescpl 448 1080 0 1051 5 0 5 5 0 8 1 filepl 120 3987 0 3794 9 0 9 9 0 8 1 lockfpl 104 74 0 72 1 0 1 1 0 8 0 lockfspl 48 37 0 35 1 0 1 1 0 8 0 sessionpl 144 69 0 61 1 0 1 1 0 8 0 pgrppl 48 121 0 105 1 0 1 1 0 8 0 ucredpl 104 557 0 545 1 0 1 1 0 8 0 zombiepl 144 1054 0 1050 1 0 1 1 0 8 0 processpl 1160 1114 0 1050 5 0 5 5 0 8 0 procpl 664 1512 0 1448 7 0 7 7 0 8 0 sockpl 552 680 0 651 5 0 5 5 0 8 2 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl9k128 9344 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 17 0 17 1 0 1 1 0 8 1 mcl4k 4096 2809 0 2756 13 0 13 13 0 8 5 mcl2k 2048 940 0 937 3 0 3 3 0 8 2 mextrefs 64 239 0 237 1 0 1 1 0 8 0 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 9313 0 9216 14 0 14 14 0 8 2 bufpl 272 4747 0 84 311 0 311 311 0 8 0 anonpl 24 134165 0 131191 43 0 43 43 0 187 15 amapchunkpl 152 21094 0 20722 24 0 24 24 0 158 4 amappl16 200 1639 0 1628 14 3 11 14 0 8 8 amappl15 192 13 0 13 1 0 1 1 0 8 1 amappl14 184 841 0 837 1 0 1 1 0 8 0 amappl13 176 186 0 176 1 0 1 1 0 8 0 amappl12 168 1458 0 1433 2 0 2 2 0 8 0 amappl11 160 4 0 4 1 0 1 1 0 8 1 amappl10 152 64 0 56 1 0 1 1 0 8 0 amappl9 144 291 0 291 1 0 1 1 0 8 1 amappl8 136 232 0 228 1 0 1 1 0 8 0 amappl7 128 232 0 222 1 0 1 1 0 8 0 amappl6 120 324 0 320 1 0 1 1 0 8 0 amappl5 112 288 0 278 1 0 1 1 0 8 0 amappl4 104 370 0 356 1 0 1 1 0 8 0 amappl3 96 4401 0 4306 4 0 4 4 0 8 1 amappl2 88 577 0 528 2 0 2 2 0 8 0 amappl1 80 15420 0 14879 13 0 13 13 0 8 1 amappl 88 6363 0 6231 5 0 5 5 0 92 1 uvmvnodes 80 103 0 0 3 0 3 3 0 8 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 7 0 7 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 72 0 1 2 0 2 2 0 8 0 uaddrrnd 24 1080 0 1051 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1080 0 1051 1 0 1 1 0 8 0 vmmpekpl 168 9829 0 9777 3 0 3 3 0 8 0 vmmpepl 168 77244 0 75681 82 0 82 82 0 357 4 vmsppl 368 1079 0 1051 4 0 4 4 0 8 1 rwobjpl 40 23771 0 22779 13 0 13 13 0 8 0 pdppl 4096 2168 0 2104 116 50 66 78 0 8 2 pvpl 32 404544 0 397015 96 0 96 96 0 265 14 pmappl 216 1080 0 1052 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 713 0 57 19 0 19 19 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bdfe1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f7f80,ffffffff834343de,13f,ffffffff8343dd9c) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff8000015cb800) at tun_clone_destroy+0x32d if_clone_destroy(ffff800038d65430) at if_clone_destroy+0x1d5 sys/net/if.c:1464 sys_ioctl(ffff80002a795240,ffff800038d65600,ffff800038d65550) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff800038d65600) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038d65600) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7597e7218d20, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bdfe1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f7f80,ffffffff834343de,13f,ffffffff8343dd9c) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff8000015cb800) at tun_clone_destroy+0x32d if_clone_destroy(ffff800038d65430) at if_clone_destroy+0x1d5 sys/net/if.c:1464 sys_ioctl(ffff80002a795240,ffff800038d65600,ffff800038d65550) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff800038d65600) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038d65600) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7597e7218d20, count: -8