panic: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/kasan/kernel/sys/net/if_tun.c", line 319 Stopped at db_enter+0x17: popq %rbp TID PID UID PRFLAGS PFLAGS CPU COMMAND 102141 42760 0 0x2 0 0 syz-executor db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff848445e0) at panic+0x270 sys/kern/subr_prf.c:198 __assert(ffffffff84d1b9e0,ffffffff84d1ba00,13f,ffffffff84d1bb00) at __assert+0x48 tun_clone_destroy(ffff80000172e000) at tun_clone_destroy+0x4fa if_clone_destroy(ffff800029a58720) at if_clone_destroy+0x24d sys/net/if.c:1479 tun_dev_close(5dbb,81) at tun_dev_close+0x2c0 sys/net/if_tun.c:526 spec_close(ffff800029a58860) at spec_close+0x56b sys/kern/spec_vnops.c:538 VOP_CLOSE(ffff800001bdc718,81,ffff800000119340,ffff8000298947d0) at VOP_CLOSE+0x1e9 sys/kern/vfs_vops.c:156 vn_closefile(ffff800001c660d8,ffff8000298947d0) at vn_closefile+0x1cc vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffff800001c660d8,ffff8000298947d0) at vn_closefile+0x1cc sys/kern/vfs_vnops.c:621 fdrop(ffff800001c660d8,ffff8000298947d0) at fdrop+0x1c3 sys/kern/kern_descrip.c:1281 closef(ffff800001c660d8,ffff8000298947d0) at closef+0x263 sys/kern/kern_descrip.c:1265 fdfree(ffff8000298947d0) at fdfree+0x16d sys/kern/kern_descrip.c:1203 exit1(ffff8000298947d0,43,0,1) at exit1+0x81e sys/kern/kern_exit.c:217 sys_exit(ffff8000298947d0,ffff800029a58e00,ffff800029a58d60) at sys_exit+0x4a end trace frame: 0xffff800029a58df0, count: 0 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/kasan/kernel/sys/net/if_tun.c", line 319 ddb{1}> show kasan kasan: no report recorded this boot ddb{1}> trace db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff848445e0) at panic+0x270 sys/kern/subr_prf.c:198 __assert(ffffffff84d1b9e0,ffffffff84d1ba00,13f,ffffffff84d1bb00) at __assert+0x48 tun_clone_destroy(ffff80000172e000) at tun_clone_destroy+0x4fa if_clone_destroy(ffff800029a58720) at if_clone_destroy+0x24d sys/net/if.c:1479 tun_dev_close(5dbb,81) at tun_dev_close+0x2c0 sys/net/if_tun.c:526 spec_close(ffff800029a58860) at spec_close+0x56b sys/kern/spec_vnops.c:538 VOP_CLOSE(ffff800001bdc718,81,ffff800000119340,ffff8000298947d0) at VOP_CLOSE+0x1e9 sys/kern/vfs_vops.c:156 vn_closefile(ffff800001c660d8,ffff8000298947d0) at vn_closefile+0x1cc vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffff800001c660d8,ffff8000298947d0) at vn_closefile+0x1cc sys/kern/vfs_vnops.c:621 fdrop(ffff800001c660d8,ffff8000298947d0) at fdrop+0x1c3 sys/kern/kern_descrip.c:1281 closef(ffff800001c660d8,ffff8000298947d0) at closef+0x263 sys/kern/kern_descrip.c:1265 fdfree(ffff8000298947d0) at fdfree+0x16d sys/kern/kern_descrip.c:1203 exit1(ffff8000298947d0,43,0,1) at exit1+0x81e sys/kern/kern_exit.c:217 sys_exit(ffff8000298947d0,ffff800029a58e00,ffff800029a58d60) at sys_exit+0x4a syscall(ffff800029a58e00) at syscall+0x1089 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800029a58e00) at syscall+0x1089 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x78c7180069c0, count: -16 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800029a58450 rbx 0xffff800029a584c0 rdx 0 rcx 0xffff800028fe3ff0 rax 0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x19 r11 0xffffffff82673480 x86_bus_space_io_read_1 r12 0xffffffff848445e0 .str.2 r13 0xffff800028fe4c08 r14 0xffff800028fe4e07 r15 0x1 rip 0xffffffff83963de7 db_enter+0x17 cs 0x8 rflags 0x246 rsp 0xffff800029a58450 ss 0x10 db_enter+0x17: popq %rbp ddb{1}> show proc PROC (syz-executor) tid=454788 pid=30935 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=8, usrpri=79, slppri=8, nice=20 wchan=0x0, wmesg=, ps_single=0xffff8000298947d0 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff800029894008,0xffff8000299122b8 process=0xffff800045ff89b8 user=0xffff800029a4d000, vmspace=0xffff800001c4ab88 estcpu=29, cpticks=6, pctcpu=0.2, user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 25738 511985 56960 0 2 0x100002 0 ndp 56960 192063 31148 0 3 0x100002 0x88 sigsusp sh 31148 383353 10131 0 3 0x2 0x80 wait syz-executor 80054 267538 10131 0 3 0x2 0x80 nanoslp syz-executor 5548 507573 0 0 3 0x14000 0x200 acct acct 81682 178348 10131 0 3 0x2 0x80 piperd syz-executor 54388 315134 10131 0 2 0x2 0 syz-executor 27138 299356 1 0 3 0 0x80 nanoslp init 30669 198265 10131 0 3 0x2 0x80 piperd syz-executor 42760 102141 10131 0 7 0x2 0 syz-executor 10131 378452 1 0 3 0x2 0x80 wait syz-executor 55086 433107 1 74 3 0x1100012 0x80 bpf pflogd 18837 108514 0 0 3 0x14000 0x200 bored smr 22176 455885 0 0 3 0x14000 0x200 pgzero zerothread 93435 336554 0 0 3 0x14000 0x200 aiodoned aiodoned 8172 20541 0 0 3 0x14000 0x200 syncer update 67651 208615 0 0 3 0x14000 0x200 cleaner cleaner 39969 119956 0 0 3 0x14000 0x200 reaper reaper 94923 87426 0 0 3 0x14000 0x200 pgdaemon pagedaemon 65764 239665 0 0 3 0x14000 0x200 bored viomb 97056 442638 0 0 3 0x14000 0x40000200 acpi0 acpi0 73296 310404 0 0 3 0x14000 0x40000200 idle1 80901 83195 0 0 3 0x14000 0x200 bored softnet1 71286 356512 0 0 3 0x14000 0x200 bored softnet0 1594 500336 0 0 3 0x14000 0x200 smrbar systqmp 12997 35207 0 0 3 0x14000 0x200 bored systq 52991 133665 0 0 3 0x14000 0x200 tmoslp softclockmp 15242 26235 0 0 3 0x14000 0x40000200 tmoslp softclock 18384 454939 0 0 3 0x14000 0x40000200 idle0 1 63070 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{1}>