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 *430042 427 0 0x1000 0x4080000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b2d20) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83067fbc,ffffffff830661bd,307,ffffffff8302092a) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012cc608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012cc608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff800001291880) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128d800) at bpfdetach+0x76 if_detach(ffff80000128d800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128d800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037677a70) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a48c528,ffff800037677c50,ffff800037677ba0) at sys_ioctl+0x678 syscall(ffff800037677c50) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff800037677cd0, 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(ffffffff830b2d20) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83067fbc,ffffffff830661bd,307,ffffffff8302092a) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012cc608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012cc608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff800001291880) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128d800) at bpfdetach+0x76 if_detach(ffff80000128d800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128d800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037677a70) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a48c528,ffff800037677c50,ffff800037677ba0) at sys_ioctl+0x678 syscall(ffff800037677c50) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcd06bbfaf50, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037677710 rbx 0xffffffff83480dd0 cdevsw+0x730 rdx 0xffff80000127e780 rcx 0 rax 0xffff80002a48c528 r8 0 r9 0x8080808080808080 r10 0xd41af4b6f0261e0b r11 0x1c3498e0ca6fcc8b r12 0 r13 0xffff8000012cc6a8 r14 0 r15 0x1 rip 0xffffffff81165065 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037677700 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=430042 pid=427 tcnt=2 stat=onproc flags process=1000 proc=4080000 runpri=32, usrpri=83, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002a48d968 scnt=1 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a48d968,0xffff80002a48ccd0 process=0xffff8000ffff48a8 user=0xffff800037672000, vmspace=0xfffffd806c215d80 estcpu=33, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 98619 282598 71818 0 2 0x480 syz-executor 98619 246155 71818 0 3 0x4000000 inode syz-executor 98619 420871 71818 0 3 0x4000080 fsleep syz-executor 427 204258 92666 0 3 0x3000 suspend syz-executor * 427 430042 92666 0 7 0x4081000 syz-executor 10379 158951 87981 0 2 0x3000 syz-executor 50591 304992 89108 0 2 0x480 syz-executor 50591 90784 89108 0 2 0x4000000 syz-executor 50591 332687 89108 0 3 0x4000000 inode syz-executor 50591 359848 89108 0 3 0x4000080 fsleep syz-executor 11445 123473 72677 0 3 0x80 nanoslp syz-executor 11445 304406 72677 0 2 0x4000000 syz-executor 11445 67548 72677 0 3 0x4000000 inode syz-executor 11445 375527 72677 0 3 0x4000000 inode syz-executor 11445 56003 72677 0 3 0x4000080 fsleep syz-executor 11445 379853 72677 0 3 0x4000080 fsleep syz-executor 13324 226776 14298 0 2 0x482 syz-executor 5170 381835 0 0 3 0x14200 acct acct 25797 203260 1 0 3 0x100083 ttyin getty 28802 41627 14298 0 2 0x2 syz-executor 1445 417535 0 0 3 0x14200 bored sosplice 92666 324231 14298 0 2 0x482 syz-executor 87981 462984 14298 0 2 0x482 syz-executor 89108 111120 14298 0 3 0x82 nanoslp syz-executor 71818 66481 14298 0 2 0x482 syz-executor 7057 406525 14298 0 2 0x2 syz-executor 72677 186420 14298 0 3 0x82 nanoslp syz-executor 14298 279883 87110 0 3 0x82 kqread syz-executor 87110 242686 90340 0 3 0x10008a sigsusp ksh 90340 34367 94501 0 3 0x98 kqread sshd-session 94501 362624 85300 0 3 0x92 kqread sshd-session 85300 392425 1 0 3 0x88 kqread sshd 99006 374022 74754 73 3 0x1100090 kqread syslogd 74754 482091 1 0 3 0x100082 sbwait syslogd 41815 418680 1 0 3 0x100080 kqread resolvd 49941 341960 11056 77 3 0x100092 kqread dhcpleased 17412 511974 11056 77 3 0x100092 kqread dhcpleased 11056 204193 1 0 3 0x80 kqread dhcpleased 638 451551 0 0 3 0x14200 bored smr 43289 119804 0 0 2 0x14200 zerothread 75196 448500 0 0 3 0x14200 aiodoned aiodoned 68585 239618 0 0 3 0x14200 syncer update 95991 473078 0 0 3 0x14200 cleaner cleaner 93091 503841 0 0 2 0x14200 reaper 93709 78708 0 0 3 0x14200 pgdaemon pagedaemon 4885 298152 0 0 3 0x14200 bored viomb 60116 104007 0 0 3 0x40014200 acpi0 acpi0 14635 54211 0 0 3 0x14200 bored softnet3 80463 73022 0 0 3 0x14200 bored softnet2 23373 35481 0 0 3 0x14200 bored softnet1 68459 449862 0 0 3 0x14200 bored softnet0 46665 201595 0 0 3 0x14200 bored systqmp 58183 274615 0 0 3 0x14200 bored systq 5848 196914 0 0 2 0x40014200 softclock 5617 162901 0 0 3 0x40014200 idle0 1 140680 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 10216 11267K 11454K 166960K 12920 0 pcb 17 22K 24K 166960K 618 0 rtable 189 5K 7K 166960K 605 0 pf 29 12K 14K 166960K 70 0 ifaddr 36 6K 7K 166960K 76 0 ifgroup 46 2K 2K 166960K 94 0 sysctl 3 0K 2K 166960K 8 0 counters 29 17K 17K 166960K 45 0 ioctlops 0 0K 4K 166960K 117 0 iov 0 0K 20K 166960K 98 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1479 93K 94K 166960K 2524 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 9K 166960K 28 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 49 0 dirhash 12 2K 2K 166960K 60 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 16 57K 89K 166960K 1416 0 sigio 0 0K 0K 166960K 72 0 proc 64 67K 91K 166960K 631 0 subproc 104 6K 6K 166960K 130 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 342 0 in_multi 81 6K 7K 166960K 198 0 ether_multi 1 0K 0K 166960K 12 0 mrt 0 0K 0K 166960K 6 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 229 1023K 1023K 166960K 229 0 exec 0 0K 1K 166960K 789 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 235 72K 101K 166960K 14569 0 UVM aobj 131 4K 4K 166960K 134 0 pinsyscall 38 76K 92K 166960K 2494 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 98 0 NDP 10 0K 2K 166960K 52 0 temp 78 6816K 6956K 166960K 55416 0 kqueue 13 20K 30K 166960K 263 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 353 0 350 4 3 1 3 0 8 0 rtentry 112 171 0 85 4 0 4 4 0 8 0 unpcb 144 1495 0 1474 12 8 4 6 0 8 3 syncache 336 7 0 7 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 808 576 0 568 18 13 5 8 0 8 2 arp 88 26 0 9 1 0 1 1 0 8 0 ipq 40 9 0 3 1 0 1 1 0 8 0 ipqe 40 46 0 40 1 0 1 1 0 8 0 inpcb 336 2560 0 2547 33 28 5 19 0 8 2 nd6 104 41 0 22 1 0 1 1 0 8 0 pkpcb 40 10 0 10 3 2 1 1 0 8 1 kcovpl 48 10 0 2 1 0 1 1 0 8 0 ppxss 1072 9 0 9 2 2 0 1 0 8 0 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 0 1 0 1 1 0 8 0 pfstate 344 1 0 0 1 0 1 1 0 8 0 pfrule 1344 2 0 2 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 772 0 386 29 2 27 29 0 8 1 art_table 32 773 0 386 4 0 4 4 0 8 0 art_node 16 168 0 90 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 46 0 36 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 50 0 33 3 0 3 3 0 8 0 dino2pl 256 3894 0 2408 95 0 95 95 0 8 0 ffsino 240 3894 0 2408 89 0 89 89 0 8 0 nchpl 144 5931 0 5407 63 41 22 63 0 8 0 uvmvnodes 80 4770 0 0 98 0 98 98 0 8 0 vnodes 216 4770 0 0 265 0 265 265 0 8 0 namei 1024 22726 0 22721 2 1 1 1 0 8 0 kstatmem 264 52 0 32 2 0 2 2 0 8 0 scsiplug 72 4 0 4 2 1 1 1 0 8 1 scxspl 216 18313 0 18313 15 14 1 8 1 8 1 plimitpl 152 517 0 501 1 0 1 1 0 8 0 sigapl 424 1695 0 1648 6 0 6 6 0 8 0 futexpl 64 21295 0 21291 1 0 1 1 0 8 0 knotepl 120 62169 0 62122 45 35 10 16 0 8 8 kqueuepl 184 398 0 389 1 0 1 1 0 8 0 pipepl 288 242 0 215 3 0 3 3 0 8 0 fdescpl 432 1676 0 1647 5 1 4 5 0 8 0 filepl 120 13326 0 13071 21 8 13 15 0 8 3 lockfpl 104 875 0 871 3 1 2 2 0 8 0 lockfspl 48 156 0 152 1 0 1 1 0 8 0 sessionpl 144 26 0 18 1 0 1 1 0 8 0 pgrppl 48 54 0 38 1 0 1 1 0 8 0 ucredpl 104 2077 0 2065 1 0 1 1 0 8 0 zombiepl 144 1791 0 1788 1 0 1 1 0 8 0 processpl 1096 1695 0 1648 4 0 4 4 0 8 0 procpl 648 3592 0 3533 6 0 6 6 0 8 0 sosppl 168 6 0 6 1 1 0 1 0 8 0 sockpl 504 4502 0 4466 78 66 12 30 0 8 7 mcl64k 65536 18 0 18 2 2 0 1 0 8 0 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl9k 9216 2 0 2 2 1 1 1 0 8 1 mcl8k 8192 54 0 54 3 2 1 1 0 8 1 mcl4k 4096 4348 0 4295 17 9 8 17 0 8 0 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 1935 0 1930 11 8 3 8 0 8 2 mtagpl 96 71 0 25 2 0 2 2 0 8 0 mbufpl 256 21644 0 21440 34 14 20 27 0 8 0 bufpl 280 6914 0 667 447 0 447 447 0 8 0 anonpl 24 295712 0 292143 71 46 25 48 0 187 0 amapchunkpl 152 49964 0 49443 49 26 23 35 0 158 2 amappl16 200 7965 0 7933 35 30 5 15 0 8 0 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 118 0 107 1 0 1 1 0 8 0 amappl13 176 15 0 15 1 1 0 1 0 8 0 amappl12 168 2319 0 2291 2 0 2 2 0 8 0 amappl11 160 55 0 44 1 0 1 1 0 8 0 amappl10 152 25 0 25 1 0 1 1 0 8 1 amappl9 144 182 0 182 1 1 0 1 0 8 0 amappl8 136 27 0 23 1 0 1 1 0 8 0 amappl7 128 109 0 98 1 0 1 1 0 8 0 amappl6 120 183 0 181 1 0 1 1 0 8 0 amappl5 112 145 0 136 1 0 1 1 0 8 0 amappl4 104 302 0 286 1 0 1 1 0 8 0 amappl3 96 8715 0 8618 3 0 3 3 0 8 0 amappl2 88 1961 0 1883 2 0 2 2 0 8 0 amappl1 80 11393 0 10878 13 1 12 13 0 8 0 amappl 88 14000 0 13820 5 0 5 5 0 92 0 dma32768 32768 1 0 1 1 1 0 1 0 8 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 dma512 512 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 254 0 254 2 2 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 8 0 8 2 2 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 1676 0 1647 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1676 0 1647 1 0 1 1 0 8 0 vmmpekpl 168 12820 0 12771 3 0 3 3 0 8 0 vmmpepl 168 108086 0 106328 101 20 81 90 0 357 0 vmsppl 344 1675 0 1647 4 1 3 4 0 8 0 rwobjpl 24 35953 0 30170 35 0 35 35 0 8 0 pdppl 4096 3358 0 3294 106 40 66 78 0 8 2 pvpl 32 729465 0 720247 147 58 89 118 0 265 1 pmappl 216 1675 0 1647 2 0 2 2 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 532 0 192 12 1 11 12 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(ffffffff830b2d20) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83067fbc,ffffffff830661bd,307,ffffffff8302092a) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012cc608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012cc608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff800001291880) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128d800) at bpfdetach+0x76 if_detach(ffff80000128d800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128d800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037677a70) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a48c528,ffff800037677c50,ffff800037677ba0) at sys_ioctl+0x678 syscall(ffff800037677c50) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcd06bbfaf50, 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(ffffffff830b2d20) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83067fbc,ffffffff830661bd,307,ffffffff8302092a) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012cc608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012cc608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012cc6a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff800001291880) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff80000128d800) at bpfdetach+0x76 if_detach(ffff80000128d800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff80000128d800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff800037677a70) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a48c528,ffff800037677c50,ffff800037677ba0) at sys_ioctl+0x678 syscall(ffff800037677c50) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcd06bbfaf50, count: -15