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 *206145 31976 0 0x2 0 0 ifconfig db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834ad6b3) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f03d9,ffffffff8342c767,13f,ffffffff834361cf) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff8000015d0800) at tun_clone_destroy+0x32d if_clone_destroy(ffff80002a7db860) at if_clone_destroy+0x1d5 sys/net/if.c:1464 sys_ioctl(ffff80002a7847e0,ffff80002a7dba30,ffff80002a7db980) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80002a7dba30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7dba30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74c8dd618ae0, 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(ffffffff834ad6b3) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f03d9,ffffffff8342c767,13f,ffffffff834361cf) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff8000015d0800) at tun_clone_destroy+0x32d if_clone_destroy(ffff80002a7db860) at if_clone_destroy+0x1d5 sys/net/if.c:1464 sys_ioctl(ffff80002a7847e0,ffff80002a7dba30,ffff80002a7db980) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80002a7dba30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7dba30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74c8dd618ae0, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a7db6f0 rbx 0 rdx 0 rcx 0 rax 0xffff80002a7847e0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3e5057ac314435da r11 0x261d8bdcf2de3ae4 r12 0 r13 0xffffffff83994c50 tap_cloner r14 0 r15 0x1 rip 0xffffffff81029985 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a7db6e0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (ifconfig) tid=206145 pid=31976 tcnt=1 stat=onproc flags process=2 proc=0 runpri=32, usrpri=79, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a784a78,0xffff80002a7842c0 process=0xffff8000380cb1f0 user=0xffff80002a7d6000, vmspace=0xfffff2006fca3b88 estcpu=29, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 25664 491835 42838 0 3 0x2 0 clonelk ifconfig 42838 109565 53469 0 3 0x100002 0x88 sigsusp sh 53469 358370 55758 0 3 0x2 0x80 wait syz-executor *31976 206145 83284 0 7 0x2 0 ifconfig 83284 230683 25451 0 3 0x100002 0x88 sigsusp sh 25451 93505 55758 0 3 0x2 0x80 wait syz-executor 81955 14163 55758 0 3 0x2 0 clonelk syz-executor 38870 200083 1 0 3 0x100003 0x80 ttyin getty 56565 402476 55758 0 3 0x2 0x80 piperd syz-executor 55758 24109 1 0 3 0x2 0x80 nanoslp syz-executor 61091 450873 1 73 3 0x1100010 0x80 kqread syslogd 93135 162678 0 0 3 0x14000 0x200 bored smr 36331 500357 0 0 3 0x14000 0x200 pgzero zerothread 84221 33145 0 0 3 0x14000 0x200 aiodoned aiodoned 11933 283873 0 0 3 0x14000 0x200 syncer update 11279 489482 0 0 3 0x14000 0x200 cleaner cleaner 50131 219378 0 0 3 0x14000 0x200 reaper reaper 21224 57894 0 0 3 0x14000 0x200 pgdaemon pagedaemon 34219 166401 0 0 3 0x14000 0x200 bored viomb 80517 329870 0 0 3 0x14000 0x40000200 acpi0 acpi0 1927 254624 0 0 3 0x14000 0x200 bored softnet0 29510 274678 0 0 3 0x14000 0x200 smrbar systqmp 55159 114361 0 0 3 0x14000 0x200 bored systq 12985 265883 0 0 3 0x14000 0x40000200 tmoslp softclock 79648 173228 0 0 3 0x14000 0x40000200 idle0 1 61795 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10010000 0x200 scheduler swapper ddb> show all locks No such command ddb>