panic: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/main/kernel/sys/arch/amd64/amd64/intr.c", line 775 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *516100 75673 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b6578) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b12d,ffffffff83062bf6,307,ffffffff8301ddcd) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001333a08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001333a08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a2800) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001270800) at bpfdetach+0x76 if_detach(ffff800001270800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001270800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002f3e98d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c2a40,ffff80002f3e9ab0,ffff80002f3e9a00) at sys_ioctl+0x678 syscall(ffff80002f3e9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff80002f3e9b30, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "nlevel >= IPL_NONE" failed: file "/syzkaller/managers/main/kernel/sys/arch/amd64/amd64/intr.c", line 775 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b6578) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b12d,ffffffff83062bf6,307,ffffffff8301ddcd) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001333a08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001333a08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a2800) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001270800) at bpfdetach+0x76 if_detach(ffff800001270800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001270800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002f3e98d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c2a40,ffff80002f3e9ab0,ffff80002f3e9a00) at sys_ioctl+0x678 syscall(ffff80002f3e9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x845f0cecd90, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002f3e9570 rbx 0xffffffff833e7d10 cdevsw+0x730 rdx 0xffff800001281f40 rcx 0 rax 0xffff80002a4c2a40 r8 0 r9 0x8080808080808080 r10 0xa23c782a022a2319 r11 0xb6d1a9a09d676d8b r12 0 r13 0xffff800001333aa8 r14 0 r15 0x1 rip 0xffffffff82c46045 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002f3e9560 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=516100 pid=75673 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4c2020,0xffff80002a48d468 process=0xffff8000ffff4460 user=0xffff80002f3e4000, vmspace=0xfffffd80790dec68 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 59668 199279 33723 0 2 0x1 syz-executor 59668 89681 33723 0 3 0x4000080 fsleep syz-executor 59668 127135 33723 0 3 0x4000080 fsleep syz-executor 29455 9126 95732 0 2 0 syz-executor 81259 369954 56514 0 2 0 syz-executor 81259 374240 56514 0 3 0x4000000 inode syz-executor 81259 150672 56514 0 2 0x4000000 syz-executor 52854 472618 4880 0 2 0 syz-executor 52854 437931 4880 0 2 0x4000000 syz-executor 52854 203874 4880 0 3 0x4000000 inode syz-executor 52854 363020 4880 0 2 0x4000000 syz-executor 17928 411463 3866 0 3 0x80 nanoslp syz-executor 17928 399781 3866 0 2 0x4000000 syz-executor 17928 413521 3866 0 3 0x4000080 fsleep syz-executor 17928 437274 3866 0 3 0x4000000 inode syz-executor 75673 361223 15634 0 2 0x480 syz-executor *75673 516100 15634 0 7 0x4000000 syz-executor 75673 326871 15634 0 3 0x4000080 fsleep syz-executor 75673 431155 15634 0 3 0x4000080 fsleep syz-executor 16674 279322 17644 0 3 0x82 nanoslp syz-executor 4880 242503 17644 0 3 0x82 nanoslp syz-executor 96280 307898 0 0 3 0x14200 acct acct 17336 298257 1 0 3 0x100083 ttyin getty 99057 229733 0 0 3 0x14200 bored sosplice 56514 193410 17644 0 2 0x482 syz-executor 15634 2442 17644 0 2 0x482 syz-executor 3866 346916 17644 0 3 0x82 nanoslp syz-executor 95732 11237 17644 0 3 0x82 nanoslp syz-executor 73567 368616 17644 0 2 0x2 syz-executor 33723 501485 17644 0 3 0x82 nanoslp syz-executor 17644 188790 75200 0 3 0x82 kqread syz-executor 75200 434349 12881 0 3 0x10008a sigsusp ksh 12881 337501 27913 0 3 0x98 kqread sshd-session 27913 435448 5873 0 3 0x92 kqread sshd-session 5873 306437 1 0 3 0x88 kqread sshd 36325 209917 87142 73 3 0x1100090 kqread syslogd 87142 415048 1 0 3 0x100082 sbwait syslogd 44114 480738 1 0 3 0x100080 kqread resolvd 58235 16347 11646 77 3 0x100092 kqread dhcpleased 57479 247853 11646 77 3 0x100092 kqread dhcpleased 11646 444987 1 0 3 0x80 kqread dhcpleased 89621 64927 0 0 3 0x14200 bored smr 52314 297772 0 0 2 0x14200 zerothread 42689 342520 0 0 3 0x14200 aiodoned aiodoned 17826 414309 0 0 3 0x14200 syncer update 81162 489326 0 0 3 0x14200 cleaner cleaner 39832 441426 0 0 2 0x14200 reaper 27885 372563 0 0 3 0x14200 pgdaemon pagedaemon 93501 30385 0 0 3 0x14200 bored viomb 95526 69946 0 0 3 0x40014200 acpi0 acpi0 86117 263916 0 0 3 0x14200 bored softnet3 26433 229124 0 0 3 0x14200 bored softnet2 98543 190906 0 0 3 0x14200 bored softnet1 79654 469558 0 0 3 0x14200 bored softnet0 83647 59282 0 0 3 0x14200 bored systqmp 6422 328411 0 0 3 0x14200 bored systq 30197 184523 0 0 2 0x40014200 softclock 86583 93935 0 0 3 0x40014200 idle0 1 330907 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 10207 11058K 14213K 166960K 13125 0 pcb 17 13K 13K 166960K 146 0 rtable 214 7K 8K 166960K 577 0 pf 32 13K 269K 166960K 71 0 ifaddr 39 7K 8K 166960K 75 0 ifgroup 49 2K 2K 166960K 95 0 sysctl 2 0K 0K 166960K 2 0 counters 29 17K 17K 166960K 42 0 ioctlops 0 0K 4K 166960K 83 0 iov 0 0K 24K 166960K 107 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1681 106K 106K 166960K 2434 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 21 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 37 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 16 57K 97K 166960K 896 0 sigio 0 0K 0K 166960K 25 0 proc 60 59K 124K 166960K 636 0 subproc 104 6K 6K 166960K 143 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 75 0 in_multi 88 6K 7K 166960K 176 0 ether_multi 1 0K 0K 166960K 10 0 mrt 1 0K 0K 166960K 9 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 259 1155K 1155K 166960K 259 0 exec 0 0K 1K 166960K 620 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 228 76K 86K 166960K 9849 0 UVM aobj 21 2K 2K 166960K 25 0 pinsyscall 37 74K 104K 166960K 1991 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 75 0 NDP 10 0K 2K 166960K 49 0 temp 57 6811K 6882K 166960K 23119 0 kqueue 13 20K 32K 166960K 152 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 139 0 136 2 1 1 2 0 8 0 rtentry 112 182 0 85 4 0 4 4 0 8 0 unpcb 144 882 0 864 11 5 6 6 0 8 4 syncache 336 5 0 5 2 2 0 1 0 8 0 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 808 302 0 297 11 3 8 8 0 8 7 arp 88 34 0 18 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 0 1 0 1 1 0 8 0 inpcb 336 1125 0 1117 13 6 7 7 0 8 6 nd6 104 36 0 13 1 0 1 1 0 8 0 pkpcb 40 100 0 100 2 1 1 1 0 8 1 kcovpl 48 11 0 3 1 0 1 1 0 8 0 ppxss 1072 7 0 7 3 2 1 1 0 8 1 pfstitem 24 6 0 2 1 0 1 1 0 8 0 pfstkey 128 8 0 3 1 0 1 1 0 8 0 pfstate 344 4 0 2 1 0 1 1 0 8 0 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 701 0 282 32 3 29 30 0 8 0 art_table 32 705 0 282 4 0 4 4 0 8 0 art_node 16 180 0 96 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 2 1 0 1 1 0 8 0 semupl 112 3 0 3 2 1 1 1 0 8 1 semapl 112 32 0 22 1 0 1 1 0 8 0 shmpl 112 22 0 4 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2964 0 1466 95 0 95 95 0 8 0 ffsino 240 2964 0 1466 89 0 89 89 0 8 0 nchpl 144 4299 0 3764 63 41 22 63 0 8 0 uvmvnodes 80 3839 0 0 79 0 79 79 0 8 0 vnodes 216 3839 0 0 214 0 214 214 0 8 0 namei 1024 16172 0 16170 6 3 3 3 0 8 2 kstatmem 264 46 0 26 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 12317 0 12317 9 7 2 8 1 8 2 plimitpl 152 157 0 141 1 0 1 1 0 8 0 sigapl 424 1170 0 1123 7 1 6 7 0 8 0 futexpl 64 11578 0 11573 1 0 1 1 0 8 0 knotepl 120 31508 0 31461 35 25 10 16 0 8 7 kqueuepl 184 359 0 350 7 3 4 4 0 8 3 pipepl 288 239 0 211 7 4 3 7 0 8 0 fdescpl 432 1151 0 1123 5 1 4 5 0 8 0 filepl 120 8707 0 8461 28 13 15 19 0 8 3 lockfpl 104 429 0 427 2 0 2 2 0 8 1 lockfspl 48 114 0 112 1 0 1 1 0 8 0 sessionpl 144 27 0 19 1 0 1 1 0 8 0 pgrppl 48 123 0 107 1 0 1 1 0 8 0 ucredpl 104 1579 0 1567 1 0 1 1 0 8 0 zombiepl 144 1416 0 1415 2 1 1 1 0 8 0 processpl 1096 1170 0 1123 4 0 4 4 0 8 0 procpl 648 2449 0 2389 7 0 7 7 0 8 1 sosppl 168 6 0 6 2 1 1 1 0 8 1 sockpl 504 2290 0 2261 48 22 26 26 0 8 21 mcl64k 65536 12 0 12 2 1 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 85 0 85 3 2 1 1 0 8 1 mcl4k 4096 3562 0 3511 16 8 8 15 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 1258 0 1254 3 1 2 2 0 8 1 mtagpl 96 58 0 46 2 0 2 2 0 8 0 mbufpl 256 14071 0 13920 15 1 14 14 0 8 0 bufpl 280 3769 0 98 263 0 263 263 0 8 0 anonpl 24 216470 0 213231 79 34 45 45 0 187 21 amapchunkpl 152 32614 0 32123 44 17 27 32 0 158 6 amappl16 200 5379 0 5351 28 17 11 15 0 8 8 amappl15 192 12 0 12 1 1 0 1 0 8 0 amappl14 184 115 0 105 1 0 1 1 0 8 0 amappl13 176 10 0 10 1 1 0 1 0 8 0 amappl12 168 1815 0 1786 3 1 2 3 0 8 0 amappl11 160 50 0 40 1 0 1 1 0 8 0 amappl10 152 13 0 13 2 1 1 1 0 8 1 amappl9 144 119 0 119 1 1 0 1 0 8 0 amappl8 136 25 0 24 1 0 1 1 0 8 0 amappl7 128 101 0 90 1 0 1 1 0 8 0 amappl6 120 191 0 190 1 0 1 1 0 8 0 amappl5 112 141 0 132 1 0 1 1 0 8 0 amappl4 104 294 0 280 1 0 1 1 0 8 0 amappl3 96 6044 0 5949 3 0 3 3 0 8 0 amappl2 88 1441 0 1362 2 0 2 2 0 8 0 amappl1 80 10005 0 9487 14 2 12 14 0 8 0 amappl 88 9381 0 9207 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 254 0 254 2 1 1 1 0 8 1 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 24 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1151 0 1122 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1151 0 1122 1 0 1 1 0 8 0 vmmpekpl 168 10770 0 10730 3 0 3 3 0 8 0 vmmpepl 168 77324 0 75571 101 12 89 89 0 357 10 vmsppl 352 1150 0 1122 4 1 3 4 0 8 0 rwobjpl 24 27994 0 23275 29 0 29 29 0 8 0 pdppl 4096 2309 0 2244 107 40 67 83 0 8 2 pvpl 32 511910 0 503455 162 50 112 112 0 265 34 pmappl 216 1150 0 1122 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 459 0 98 11 0 11 11 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:437 panic(ffffffff830b6578) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b12d,ffffffff83062bf6,307,ffffffff8301ddcd) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001333a08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001333a08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a2800) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001270800) at bpfdetach+0x76 if_detach(ffff800001270800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001270800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002f3e98d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c2a40,ffff80002f3e9ab0,ffff80002f3e9a00) at sys_ioctl+0x678 syscall(ffff80002f3e9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x845f0cecd90, count: -15 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b6578) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b12d,ffffffff83062bf6,307,ffffffff8301ddcd) at __assert+0x29 splraise(deaf4152) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001333a08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001333a08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001333aa8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a2800) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001270800) at bpfdetach+0x76 if_detach(ffff800001270800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001270800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002f3e98d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c2a40,ffff80002f3e9ab0,ffff80002f3e9a00) at sys_ioctl+0x678 syscall(ffff80002f3e9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x845f0cecd90, count: -15