]}L#ڧY>]}L#ڧY>]}L#ڧY>panic: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/main/kernel/sys/net/if_tun.c", line 315 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *508747 82156 0 0x2 0 0 ifconfig db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82722f34) at panic+0x161 sys/kern/subr_prf.c:198 __assert(ffffffff827a0c78,ffffffff827d347f,13b,ffffffff827b3ae6) at __assert+0x25 sys/kern/subr_prf.c:157 tun_clone_destroy(ffff800000cf4000) at tun_clone_destroy+0x234 sys/net/if_tun.c:315 if_clone_destroy(ffff8000265b9200) at if_clone_destroy+0x132 sys/net/if.c:1247 sys_ioctl(ffff800027813608,ffff8000265b9310,ffff8000265b9360) at sys_ioctl+0x49e syscall(ffff8000265b93e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:625 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffbc80, 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 315 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82722f34) at panic+0x161 sys/kern/subr_prf.c:198 __assert(ffffffff827a0c78,ffffffff827d347f,13b,ffffffff827b3ae6) at __assert+0x25 sys/kern/subr_prf.c:157 tun_clone_destroy(ffff800000cf4000) at tun_clone_destroy+0x234 sys/net/if_tun.c:315 if_clone_destroy(ffff8000265b9200) at if_clone_destroy+0x132 sys/net/if.c:1247 sys_ioctl(ffff800027813608,ffff8000265b9310,ffff8000265b9360) at sys_ioctl+0x49e syscall(ffff8000265b93e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:625 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffbc80, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000265b9090 rbx 0x80206979 __kernel_virt_to_phys+0x206979 rdx 0 rcx 0 rax 0xffff800027813608 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6b96e69cf9b1186c r11 0x563c6a59e7716c90 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81a69eb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000265b9080 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=508747 stat=onproc flags process=2 proc=0 pri=85, usrpri=85, nice=20 forw=0xffffffffffffffff, list=0xffff8000278138c0,0xffffffff82cf3498 process=0xffff8000216fefc0 user=0xffff8000265b4000, vmspace=0xfffffd8069b56570 estcpu=35, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *82156 508747 78437 0 7 0x2 ifconfig 78437 396855 60780 0 3 0x10008a sigsusp sh 60780 355935 48498 0 3 0x82 wait syz-executor.0 93427 353494 48498 0 3 0x82 piperd syz-executor.3 43079 59505 48498 0 3 0x82 piperd syz-executor.1 32018 227740 48498 0 3 0x82 piperd syz-executor.6 91745 487345 48498 0 3 0x82 piperd syz-executor.2 83399 471977 0 0 3 0x14200 acct acct 9978 395870 48498 0 3 0x82 piperd syz-executor.4 65062 5949 48498 0 3 0x82 piperd syz-executor.7 77290 202851 48498 0 3 0x82 piperd syz-executor.5 4636 248302 1 0 3 0x100083 ttyopn getty 81066 436199 0 0 3 0x14200 bored sosplice 48498 219520 26746 0 3 0x82 thrsleep syz-fuzzer 48498 140642 26746 0 2 0x4000482 syz-fuzzer 48498 424901 26746 0 3 0x4000082 wait syz-fuzzer 48498 322104 26746 0 3 0x4000082 wait syz-fuzzer 48498 326577 26746 0 3 0x4000082 wait syz-fuzzer 48498 396919 26746 0 3 0x4000082 wait syz-fuzzer 48498 158508 26746 0 3 0x4000082 thrsleep syz-fuzzer 48498 65892 26746 0 3 0x4000082 wait syz-fuzzer 48498 137107 26746 0 3 0x4000082 thrsleep syz-fuzzer 48498 49790 26746 0 3 0x4000082 wait syz-fuzzer 48498 63979 26746 0 3 0x4000082 thrsleep syz-fuzzer 48498 339681 26746 0 3 0x4000082 wait syz-fuzzer 48498 28328 26746 0 3 0x4000082 wait syz-fuzzer 48498 132738 26746 0 3 0x4000082 thrsleep syz-fuzzer 48498 246975 26746 0 3 0x4000082 thrsleep syz-fuzzer 26746 152898 84117 0 3 0x10008a sigsusp ksh 84117 262407 23472 0 3 0x9a kqread sshd 23472 387130 1 0 3 0x88 kqread sshd 94879 438633 68064 73 3 0x1100090 kqread syslogd 68064 336690 1 0 3 0x100082 netio syslogd 39349 511115 1 0 3 0x100080 kqread resolvd 73877 227489 0 0 3 0x14200 bored smr 23509 425919 0 0 2 0x14200 zerothread 92543 143870 0 0 3 0x14200 aiodoned aiodoned 3968 372626 0 0 3 0x14200 syncer update 94046 283070 0 0 3 0x14200 cleaner cleaner 85474 238704 0 0 3 0x14200 reaper reaper 48776 462079 0 0 3 0x14200 pgdaemon pagedaemon 30605 33897 0 0 3 0x14200 bored viomb 75735 216865 0 0 3 0x40014200 acpi0 acpi0 37382 502936 0 0 3 0x14200 bored softnet 80426 394346 0 0 3 0x14200 bored softnet 89060 89584 0 0 3 0x14200 bored softnet 14399 358248 0 0 3 0x14200 bored softnet 14219 293923 0 0 3 0x14200 bored systqmp 87795 295418 0 0 3 0x14200 bored systq 77586 247353 0 0 3 0x40014200 bored softclock 28479 211607 0 0 3 0x40014200 idle0 1 495132 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10218 6443K 7121K 78643K 19927 0 pcb 13 22K 27K 78643K 28865 0 rtable 179 15K 17K 78643K 10936 0 ifaddr 336 90K 94K 78643K 2683 0 sysctl 3 1K 3K 78643K 74 0 counters 26 17K 17K 78643K 806 0 ioctlops 0 0K 4K 78643K 7421 0 iov 0 0K 40K 78643K 3929 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1475 92K 93K 78643K 20244 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 266 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 5835 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 12 41K 85K 78643K 24555 0 sigio 0 0K 0K 78643K 834 0 proc 71 51K 75K 78643K 5981 0 subproc 104 6K 6K 78643K 2366 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 1722 0 in_multi 63 4K 6K 78643K 3315 0 ether_multi 1 0K 0K 78643K 174 0 mrt 2 0K 0K 78643K 103 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 247 1102K 1102K 78643K 247 0 exec 0 0K 1K 78643K 5479 0 pfkey data 0 0K 0K 78643K 167 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 299 93K 110K 78643K 155064 0 UVM aobj 131 4K 4K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 834 0 NDP 11 0K 2K 78643K 968 0 temp 124 5770K 6798K 78643K 225065 0 kqueue 6 10K 28K 78643K 3919 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 4666 0 4665 42 41 1 5 0 8 0 rtentry 112 3183 0 3111 4 1 3 4 0 8 0 unpcb 144 28231 0 28225 279 275 4 11 0 8 3 syncache 296 98 0 98 25 25 0 1 0 8 0 tcpqe 32 209 0 209 19 19 0 1 0 8 0 tcpcb 776 9188 0 9184 298 294 4 11 0 8 3 arp 88 468 0 456 1 0 1 1 0 8 0 ipq 40 18 0 16 9 8 1 1 0 8 0 ipqe 40 121 0 116 9 8 1 1 0 8 0 inpcb 336 57417 0 57412 600 591 9 21 0 8 8 nd6 48 708 0 692 1 0 1 1 0 8 0 pkpcb 40 330 0 330 18 18 0 1 0 8 0 kcovpl 48 182 0 174 1 0 1 1 0 8 0 mppekey 1024 82 0 82 8 8 0 1 0 8 0 ppxss 1160 459 0 459 51 50 1 1 0 8 1 pppxif 1360 202 0 202 32 31 1 1 0 8 1 pfstscr 40 2093 0 1887 4 1 3 3 0 8 0 pfosfp 40 82 0 79 1 0 1 1 0 8 0 pfosfpen 112 82 0 76 1 0 1 1 0 8 0 pfanchor 1280 1114 190 602 48 5 43 43 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 264 64 0 64 11 11 0 3 0 8 0 pfstitem 24 1751 0 1344 3 0 3 3 0 8 0 pfstkey 128 3009 0 2471 19 1 18 18 0 8 0 pfstate 352 1507 0 1302 20 1 19 19 0 8 0 rttmr 136 13 0 13 4 4 0 1 0 8 0 art_heap8 4096 21 0 20 14 13 1 3 0 8 0 art_heap4 256 14794 0 14508 101 82 19 31 0 8 1 art_table 32 14815 0 14528 5 1 4 4 0 8 0 art_node 16 3159 0 3100 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semapl 112 5830 0 5820 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 35428 0 33935 94 0 94 94 0 8 0 ffsino 240 35428 0 33935 89 0 89 89 0 8 0 nchpl 144 67280 0 65660 63 1 62 63 0 8 0 rtmask 32 9 0 9 4 4 0 1 0 8 0 uvmvnodes 80 8053 0 0 165 0 165 165 0 8 0 vnodes 216 8053 0 0 448 0 448 448 0 8 0 namei 1024 267474 0 267474 25 24 1 3 0 8 1 vmpool 664 161 0 161 20 20 0 1 0 8 0 kstatmem 264 926 0 904 4 2 2 3 0 8 0 scsiplug 72 24 0 24 9 8 1 1 0 8 1 scxspl 216 204440 0 204440 60 56 4 8 0 8 4 plimitpl 152 3541 0 3527 1 0 1 1 0 8 0 sigapl 424 24612 0 24574 11 4 7 8 0 8 0 futexpl 64 299271 0 299271 18 17 1 1 0 8 1 knotepl 120 454242 0 454176 227 224 3 16 0 8 0 kqueuepl 184 7184 0 7179 69 68 1 8 0 8 0 pipepl 288 9971 0 9943 160 157 3 9 0 8 0 fdescpl 432 24468 0 24448 4 1 3 4 0 8 0 filepl 120 240599 0 240384 402 392 10 22 0 8 3 lockfpl 104 5401 0 5390 15 14 1 3 0 8 0 lockfspl 48 1398 0 1388 1 0 1 1 0 8 0 sessionpl 144 198 0 183 1 0 1 1 0 8 0 pgrppl 48 536 0 521 1 0 1 1 0 8 0 ucredpl 104 37361 0 37353 1 0 1 1 0 8 0 zombiepl 144 24574 0 24574 7 6 1 1 0 8 1 processpl 1008 24612 0 24574 17 10 7 9 0 8 0 procpl 696 60075 0 60023 57 48 9 10 0 8 0 sosppl 168 198 0 198 37 37 0 1 0 8 0 sockpl 456 90872 0 90860 2065 2055 10 36 0 8 8 mcl64k 65536 804 0 800 74 73 1 1 0 8 0 mcl16k 16384 433 0 433 64 64 0 1 0 8 0 mcl12k 12288 864 0 864 68 67 1 1 0 8 1 mcl9k 9216 344 0 344 68 67 1 1 0 8 1 mcl8k 8192 1296 0 1296 74 73 1 5 0 8 1 mcl4k 4096 3578 0 3578 37 36 1 1 0 8 1 mcl2k2 2112 182 0 182 80 79 1 1 0 8 1 mcl2k 2048 123643 0 123599 83 76 7 28 0 8 0 mtagpl 96 372 0 372 11 11 0 7 0 8 0 mbufpl 256 526189 0 526059 3360 3338 22 598 0 8 8 bufpl 288 42511 0 34458 576 0 576 576 0 8 0 anonpl 24 4733617 0 4719604 372 254 118 153 0 188 0 amapchunkpl 152 448310 0 447726 128 95 33 49 0 158 0 amappl16 200 50366 0 49816 372 341 31 55 0 8 0 amappl15 192 9 0 8 1 0 1 1 0 8 0 amappl14 184 850 0 838 2 0 2 2 0 8 0 amappl13 176 3 0 3 1 1 0 1 0 8 0 amappl12 168 2480 0 2477 1 0 1 1 0 8 0 amappl11 160 44 0 40 1 0 1 1 0 8 0 amappl10 152 296 0 286 1 0 1 1 0 8 0 amappl9 144 1091 0 1090 1 0 1 1 0 8 0 amappl8 136 1175 0 1065 4 0 4 4 0 8 0 amappl7 128 556 0 533 2 0 2 2 0 8 0 amappl6 120 1006 0 992 2 1 1 2 0 8 0 amappl5 112 1129 0 1125 1 0 1 1 0 8 0 amappl4 104 2424 0 2392 2 1 1 2 0 8 0 amappl3 96 67990 0 67961 2 0 2 2 0 8 0 amappl2 88 26658 0 26606 3 1 2 3 0 8 0 amappl1 80 543853 0 543353 27 13 14 26 0 8 0 amappl 88 152530 0 152377 5 0 5 5 0 92 0 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 24629 0 24609 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 24629 0 24609 1 0 1 1 0 8 0 vmmpekpl 168 196009 0 195964 3 0 3 3 0 8 0 vmmpepl 168 2286665 0 2284611 585 458 127 183 0 357 0 vmsppl 344 24628 0 24609 4 1 3 4 0 8 0 rwobjpl 24 577548 0 567910 71 11 60 60 0 8 0 pdppl 4096 49264 0 49218 1684 1630 54 74 0 8 8 pvpl 32 9499383 0 9480830 834 636 198 360 0 265 0 pmappl 216 24628 0 24609 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 7081 0 6198 51 24 27 39 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82722f34) at panic+0x161 sys/kern/subr_prf.c:198 __assert(ffffffff827a0c78,ffffffff827d347f,13b,ffffffff827b3ae6) at __assert+0x25 sys/kern/subr_prf.c:157 tun_clone_destroy(ffff800000cf4000) at tun_clone_destroy+0x234 sys/net/if_tun.c:315 if_clone_destroy(ffff8000265b9200) at if_clone_destroy+0x132 sys/net/if.c:1247 sys_ioctl(ffff800027813608,ffff8000265b9310,ffff8000265b9360) at sys_ioctl+0x49e syscall(ffff8000265b93e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:625 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffbc80, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82722f34) at panic+0x161 sys/kern/subr_prf.c:198 __assert(ffffffff827a0c78,ffffffff827d347f,13b,ffffffff827b3ae6) at __assert+0x25 sys/kern/subr_prf.c:157 tun_clone_destroy(ffff800000cf4000) at tun_clone_destroy+0x234 sys/net/if_tun.c:315 if_clone_destroy(ffff8000265b9200) at if_clone_destroy+0x132 sys/net/if.c:1247 sys_ioctl(ffff800027813608,ffff8000265b9310,ffff8000265b9360) at sys_ioctl+0x49e syscall(ffff8000265b93e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:625 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffbc80, count: -8