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 *351701 96531 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ba82d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83073521,ffffffff83070991,307,ffffffff8302b956) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001260e08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001260e08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a6200) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001295800) at bpfdetach+0x76 if_detach(ffff800001295800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001295800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376451b0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800030dea7c0,ffff800037645390,ffff8000376452e0) at sys_ioctl+0x678 syscall(ffff800037645390) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff800037645410, 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(ffffffff830ba82d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83073521,ffffffff83070991,307,ffffffff8302b956) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001260e08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001260e08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a6200) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001295800) at bpfdetach+0x76 if_detach(ffff800001295800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001295800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376451b0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800030dea7c0,ffff800037645390,ffff8000376452e0) at sys_ioctl+0x678 syscall(ffff800037645390) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd1f473d8870, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037644e50 rbx 0xffffffff834b90f0 cdevsw+0x730 rdx 0xffff8000012a64c0 rcx 0 rax 0xffff800030dea7c0 r8 0 r9 0x8080808080808080 r10 0x4e7bf8a1a6c1820a r11 0x883f1039707bcee2 r12 0 r13 0xffff800001260ea8 r14 0 r15 0x1 rip 0xffffffff82b7c605 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037644e40 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=351701 pid=96531 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=79, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff800030deacd0,0xffff80003761d980 process=0xffff8000327f7378 user=0xffff800037640000, vmspace=0xfffffd806c210430 estcpu=29, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 9714 66239 54944 0 2 0 syz-executor 9714 71949 54944 0 3 0x4000000 inode syz-executor 9714 146258 54944 0 3 0x4000080 fsleep syz-executor 9714 264734 54944 0 3 0x4000080 fsleep syz-executor 64628 83048 90237 0 3 0x80 nanoslp syz-executor 64628 115354 90237 0 3 0x4000080 fsleep syz-executor 64628 103468 90237 0 2 0x4000000 syz-executor 64628 343945 90237 0 3 0x4000080 fsleep syz-executor 48837 352048 95852 0 2 0 syz-executor 48837 330237 95852 0 2 0x4000000 syz-executor 48837 231987 95852 0 3 0x4000000 inode syz-executor 48837 456699 95852 0 3 0x4000080 fsleep syz-executor 96531 168673 41588 0 3 0x80 nanoslp syz-executor *96531 351701 41588 0 7 0x4000000 syz-executor 7111 513645 0 0 3 0x14200 bored sosplice 41588 239475 58999 0 2 0x482 syz-executor 90237 132924 58999 0 2 0x482 syz-executor 13613 38865 58999 0 2 0x2 syz-executor 95852 321316 58999 0 3 0x82 nanoslp syz-executor 54944 419677 58999 0 3 0x82 nanoslp syz-executor 91685 411004 58999 0 2 0x2 syz-executor 97932 53107 58999 0 3 0x82 wait syz-executor 48719 294087 58999 0 3 0x82 nanoslp syz-executor 58999 494255 21759 0 3 0x82 kqread syz-executor 21759 187118 84073 0 3 0x10008a sigsusp ksh 84073 298532 21006 0 3 0x98 kqread sshd-session 21006 484850 83247 0 3 0x92 kqread sshd-session 61406 368834 1 0 3 0x100083 ttyin getty 83247 196349 1 0 3 0x88 kqread sshd 9949 433907 85975 73 3 0x1100090 kqread syslogd 85975 234408 1 0 3 0x100082 sbwait syslogd 79487 314708 1 0 3 0x100080 kqread resolvd 344 287244 20189 77 3 0x100092 kqread dhcpleased 21543 518799 20189 77 3 0x100092 kqread dhcpleased 20189 371400 1 0 3 0x80 kqread dhcpleased 18515 80858 0 0 3 0x14200 bored smr 72317 73317 0 0 2 0x14200 zerothread 93769 188293 0 0 3 0x14200 aiodoned aiodoned 35074 10115 0 0 3 0x14200 syncer update 80015 151838 0 0 3 0x14200 cleaner cleaner 498 177210 0 0 2 0x14200 reaper 18903 326199 0 0 3 0x14200 pgdaemon pagedaemon 50077 409235 0 0 3 0x14200 bored viomb 23131 409273 0 0 3 0x40014200 acpi0 acpi0 983 139858 0 0 3 0x14200 bored softnet3 18689 18909 0 0 3 0x14200 bored softnet2 33747 480851 0 0 3 0x14200 bored softnet1 38067 29551 0 0 3 0x14200 bored softnet0 26961 419901 0 0 3 0x14200 bored systqmp 12564 417958 0 0 3 0x14200 bored systq 67380 228254 0 0 3 0x40014200 tmoslp softclock 930 463306 0 0 3 0x40014200 idle0 1 164221 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 10177 11107K 11440K 166960K 11509 0 pcb 17 14K 16K 166960K 209 0 rtable 213 7K 8K 166960K 439 0 pf 30 13K 17K 166960K 111 0 ifaddr 37 6K 7K 166960K 50 0 ifgroup 46 2K 2K 166960K 59 0 sysctl 1 1K 1K 166960K 1 0 counters 29 17K 17K 166960K 32 0 ioctlops 0 0K 4K 166960K 172 0 iov 0 0K 20K 166960K 21 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1365 86K 86K 166960K 1545 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 88 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 15 53K 97K 166960K 401 0 sigio 0 0K 0K 166960K 6 0 proc 60 59K 124K 166960K 522 0 subproc 104 6K 6K 166960K 119 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 18 0 in_multi 87 6K 7K 166960K 118 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 61 281K 281K 166960K 61 0 exec 0 0K 1K 166960K 455 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 227 72K 86K 166960K 5293 0 UVM aobj 12 2K 2K 166960K 13 0 pinsyscall 36 72K 96K 166960K 1450 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 13 0 NDP 10 0K 2K 166960K 32 0 temp 41 6807K 6878K 166960K 5490 0 kqueue 13 20K 28K 166960K 58 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 62 0 59 1 0 1 1 0 8 0 rtentry 112 124 0 28 4 0 4 4 0 8 0 unpcb 144 440 0 423 9 5 4 6 0 8 3 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 197 0 193 12 4 8 8 0 8 7 arp 88 20 0 6 1 0 1 1 0 8 0 ipq 40 2 0 1 2 1 1 1 0 8 0 ipqe 40 3 0 2 2 1 1 1 0 8 0 inpcb 336 587 0 579 7 0 7 7 0 8 6 nd6 104 28 0 7 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 pfrktable 1344 4 0 1 1 0 1 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 264 1 0 0 1 0 1 1 0 8 0 pfrule 1344 1 0 0 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 499 0 94 31 2 29 29 0 8 2 art_table 32 501 0 94 4 0 4 4 0 8 0 art_node 16 123 0 36 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 3 1 0 1 1 0 8 0 semapl 112 84 0 74 1 0 1 1 0 8 0 shmpl 112 10 0 1 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 2002 0 507 95 0 95 95 0 8 0 ffsino 240 2002 0 507 89 0 89 89 0 8 0 nchpl 144 2587 0 905 63 0 63 63 0 8 0 uvmvnodes 80 2210 0 0 46 0 46 46 0 8 0 vnodes 216 2210 0 0 123 0 123 123 0 8 0 namei 1024 8751 0 8749 5 3 2 2 0 8 1 pfiaddrpl 120 1 0 0 1 0 1 1 0 8 0 kstatmem 264 26 0 6 2 0 2 2 0 8 0 scsiplug 72 3 0 3 2 1 1 1 0 8 1 scxspl 216 7548 0 7548 10 2 8 8 1 8 8 plimitpl 152 157 0 139 1 0 1 1 0 8 0 sigapl 424 680 0 635 7 1 6 7 0 8 0 futexpl 64 4111 0 4106 1 0 1 1 0 8 0 knotepl 120 14367 0 14319 18 8 10 10 0 8 8 kqueuepl 184 79 0 70 1 0 1 1 0 8 0 pipepl 288 124 0 97 4 1 3 3 0 8 0 fdescpl 432 663 0 636 5 1 4 5 0 8 0 filepl 120 3580 0 3331 18 4 14 14 0 8 5 lockfpl 104 267 0 265 2 0 2 2 0 8 1 lockfspl 48 31 0 29 1 0 1 1 0 8 0 sessionpl 144 22 0 14 1 0 1 1 0 8 0 pgrppl 48 34 0 18 1 0 1 1 0 8 0 ucredpl 104 372 0 361 1 0 1 1 0 8 0 zombiepl 144 769 0 767 2 1 1 1 0 8 0 processpl 1096 680 0 635 4 0 4 4 0 8 0 procpl 648 1128 0 1073 6 0 6 6 0 8 0 sosppl 168 1 0 1 1 0 1 1 0 8 1 sockpl 504 1093 0 1065 41 29 12 22 0 8 7 mcl64k 65536 3 0 3 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 77 0 77 3 2 1 1 0 8 1 mcl4k 4096 3020 0 2967 15 7 8 15 0 8 1 mcl2k 2048 619 0 613 3 1 2 2 0 8 1 mtagpl 96 19 0 4 1 0 1 1 0 8 0 mbufpl 256 9005 0 8835 47 31 16 41 0 8 1 bufpl 280 2542 0 96 175 0 175 175 0 8 0 anonpl 24 202359 0 199187 48 3 45 45 0 187 20 amapchunkpl 152 18189 0 17701 35 7 28 28 0 158 7 amappl16 200 5725 0 5701 17 7 10 14 0 8 8 amappl15 192 15 0 14 1 0 1 1 0 8 0 amappl14 184 113 0 102 1 0 1 1 0 8 0 amappl13 176 49 0 48 1 0 1 1 0 8 0 amappl12 168 1304 0 1276 3 1 2 3 0 8 0 amappl11 160 51 0 41 1 0 1 1 0 8 0 amappl10 152 13 0 13 2 1 1 1 0 8 1 amappl9 144 132 0 132 1 1 0 1 0 8 0 amappl8 136 25 0 24 1 0 1 1 0 8 0 amappl7 128 105 0 94 1 0 1 1 0 8 0 amappl6 120 170 0 169 1 0 1 1 0 8 0 amappl5 112 139 0 130 1 0 1 1 0 8 0 amappl4 104 279 0 265 1 0 1 1 0 8 0 amappl3 96 3294 0 3198 3 0 3 3 0 8 0 amappl2 88 932 0 856 2 0 2 2 0 8 0 amappl1 80 8138 0 7618 13 1 12 13 0 8 0 amappl 88 4917 0 4747 5 0 5 5 0 92 0 dma65536 65536 1 0 1 1 0 1 1 0 8 1 dma32768 32768 1 0 1 1 0 1 1 0 8 1 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma2048 2048 1 0 1 1 0 1 1 0 8 1 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 255 0 255 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 12 0 1 1 0 1 1 0 8 0 uaddrrnd 24 663 0 635 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 663 0 635 1 0 1 1 0 8 0 vmmpekpl 168 6480 0 6436 3 0 3 3 0 8 0 vmmpepl 168 50355 0 48651 90 1 89 89 0 357 10 vmsppl 352 662 0 635 4 1 3 4 0 8 0 rwobjpl 24 21348 0 18269 19 0 19 19 0 8 0 pdppl 4096 1332 0 1270 100 34 66 82 0 8 4 pvpl 32 380693 0 372504 112 5 107 107 0 265 30 pmappl 216 662 0 635 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 465 0 117 12 1 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(ffffffff830ba82d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83073521,ffffffff83070991,307,ffffffff8302b956) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001260e08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001260e08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a6200) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001295800) at bpfdetach+0x76 if_detach(ffff800001295800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001295800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376451b0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800030dea7c0,ffff800037645390,ffff8000376452e0) at sys_ioctl+0x678 syscall(ffff800037645390) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd1f473d8870, 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(ffffffff830ba82d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83073521,ffffffff83070991,307,ffffffff8302b956) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff800001260e08) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff800001260e08) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff800001260ea8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a6200) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001295800) at bpfdetach+0x76 if_detach(ffff800001295800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001295800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376451b0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff800030dea7c0,ffff800037645390,ffff8000376452e0) at sys_ioctl+0x678 syscall(ffff800037645390) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd1f473d8870, count: -15