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 *346143 34326 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b682f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b53c,ffffffff830662f1,307,ffffffff83020d45) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c8408) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c8408) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129cb80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001276800) at bpfdetach+0x76 if_detach(ffff800001276800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001276800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002a59fa80) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a487c10,ffff80002a59fc60,ffff80002a59fbb0) at sys_ioctl+0x678 syscall(ffff80002a59fc60) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff80002a59fce0, 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(ffffffff830b682f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b53c,ffffffff830662f1,307,ffffffff83020d45) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c8408) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c8408) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129cb80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001276800) at bpfdetach+0x76 if_detach(ffff800001276800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001276800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002a59fa80) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a487c10,ffff80002a59fc60,ffff80002a59fbb0) at sys_ioctl+0x678 syscall(ffff80002a59fc60) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5eff4174650, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a59f720 rbx 0xffffffff8342c970 cdevsw+0x730 rdx 0xffff800001280600 rcx 0 rax 0xffff80002a487c10 r8 0x101010101010101 r9 0x8080808080808080 r10 0x4c026deaeab26fe8 r11 0xf9b0e805b8888bb7 r12 0 r13 0xffff8000012c84a8 r14 0 r15 0x1 rip 0xffffffff82f90c55 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a59f710 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=346143 pid=34326 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=82, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4871f0,0xffff80002a4867e0 process=0xffff8000327f6258 user=0xffff80002a59a000, vmspace=0xfffffd806bb10c30 estcpu=32, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 12314 308481 50036 0 2 0 syz-executor 12314 444554 50036 0 2 0x4000000 syz-executor 270 130588 49862 0 2 0x10 syz-executor 270 513938 49862 0 3 0x4000090 fsleep syz-executor 270 120765 49862 0 2 0x4000010 syz-executor 50129 313153 9146 0 2 0 syz-executor 50129 254344 9146 0 3 0x4000000 clonelk syz-executor 50129 156131 9146 0 2 0x4000000 syz-executor 50129 137925 9146 0 2 0x4000000 syz-executor 34326 317024 58021 0 2 0 syz-executor *34326 346143 58021 0 7 0x4000000 syz-executor 34326 268081 58021 0 3 0x4000080 fsleep syz-executor 34326 504510 58021 0 3 0x4000080 fsleep syz-executor 22928 122858 29198 0 3 0x80 nanoslp syz-executor 22928 370184 29198 0 3 0x4000080 fsleep syz-executor 22928 22507 29198 0 3 0x4000080 ttyout syz-executor 22928 331711 29198 0 3 0x4000080 msgwait syz-executor 22928 131720 29198 0 3 0x4000080 ttyout syz-executor 22928 318491 29198 0 2 0x4000000 syz-executor 22928 53854 29198 0 3 0x4000000 futex syz-executor 97790 467370 0 0 3 0x14200 acct acct 70020 237680 11799 0 2 0x3 syz-executor 47777 6789 11799 0 2 0x3 syz-executor 4944 222821 0 0 3 0x14200 bored sosplice 83917 383095 0 0 3 0x14280 nfsidl nfsio 82962 223499 0 0 3 0x14280 nfsidl nfsio 95089 317482 0 0 3 0x14280 nfsidl nfsio 56405 206474 0 0 3 0x14280 nfsidl nfsio 94983 204533 0 0 3 0x14280 nfsidl nfsio 55681 114719 0 0 3 0x14280 nfsidl nfsio 61220 283100 0 0 3 0x14280 nfsidl nfsio 33862 19614 0 0 3 0x14280 nfsidl nfsio 1719 122212 0 0 3 0x14280 nfsidl nfsio 87656 332485 0 0 3 0x14280 nfsidl nfsio 22169 339385 0 0 3 0x14280 nfsidl nfsio 68644 212457 0 0 3 0x14280 nfsidl nfsio 98485 124627 0 0 3 0x14280 nfsidl nfsio 87166 306997 0 0 3 0x14280 nfsidl nfsio 4293 365324 0 0 3 0x14280 nfsidl nfsio 49543 516251 0 0 3 0x14280 nfsidl nfsio 85505 345037 0 0 3 0x14280 nfsidl nfsio 9584 37689 0 0 3 0x14280 nfsidl nfsio 83430 493349 0 0 3 0x14280 nfsidl nfsio 73989 87660 0 0 3 0x14280 nfsidl nfsio 70923 113788 1 0 3 0x100083 ttyin getty 58021 91357 11799 0 2 0x3 syz-executor 37164 333711 11799 0 3 0x82 nanoslp syz-executor 50036 49110 11799 0 2 0x3 syz-executor 9146 507983 11799 0 2 0x3 syz-executor 49862 114391 11799 0 2 0x3 syz-executor 29198 125873 11799 0 3 0x82 nanoslp syz-executor 11799 145321 57644 0 3 0x82 kqread syz-executor 57644 372294 28055 0 3 0x10008a sigsusp ksh 28055 154775 52407 0 3 0x98 kqread sshd-session 52407 315474 30329 0 3 0x92 kqread sshd-session 30329 354071 1 0 3 0x88 kqread sshd 15648 49172 19294 73 3 0x1100090 kqread syslogd 19294 210104 1 0 3 0x100082 sbwait syslogd 7409 7857 1 0 3 0x100080 kqread resolvd 88612 456997 9177 77 3 0x100092 kqread dhcpleased 71987 226359 9177 77 3 0x100092 kqread dhcpleased 9177 152162 1 0 3 0x80 kqread dhcpleased 69688 411217 0 0 3 0x14200 bored smr 40545 210551 0 0 2 0x14200 zerothread 63728 357889 0 0 3 0x14200 aiodoned aiodoned 10417 272783 0 0 3 0x14200 syncer update 98294 230702 0 0 3 0x14200 cleaner cleaner 18279 167330 0 0 2 0x14200 reaper 4038 153343 0 0 3 0x14200 pgdaemon pagedaemon 74096 299031 0 0 3 0x14200 bored viomb 36717 136874 0 0 3 0x40014200 acpi0 acpi0 88128 154794 0 0 3 0x14200 bored softnet3 96087 32054 0 0 3 0x14200 bored softnet2 27935 353795 0 0 3 0x14200 bored softnet1 39587 42405 0 0 3 0x14200 bored softnet0 7950 363814 0 0 3 0x14200 bored systqmp 47751 61749 0 0 3 0x14200 bored systq 70297 80973 0 0 2 0x40014200 softclock 43303 209155 0 0 3 0x40014200 idle0 1 70618 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 10171 11037K 11370K 166960K 11833 0 pcb 19 14K 16K 166960K 218 0 rtable 220 7K 8K 166960K 533 0 pf 31 13K 15K 166960K 67 0 ifaddr 38 6K 7K 166960K 62 0 ifgroup 46 2K 2K 166960K 79 0 sysctl 3 1K 1K 166960K 4 0 counters 29 17K 17K 166960K 38 0 ioctlops 0 0K 4K 166960K 80 0 iov 0 0K 16K 166960K 90 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1435 90K 91K 166960K 1859 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 2K 6K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 18 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 16 57K 97K 166960K 602 0 sigio 0 0K 0K 166960K 10 0 proc 60 59K 116K 166960K 597 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 1 0K 0K 166960K 40 0 in_multi 84 6K 7K 166960K 138 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 491 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 234 72K 76K 166960K 7135 0 UVM aobj 13 4K 4K 166960K 15 0 pinsyscall 37 74K 98K 166960K 1671 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 28 0 NDP 10 0K 1K 166960K 40 0 temp 57 6810K 6937K 166960K 27464 0 kqueue 14 22K 32K 166960K 108 0 SYN cache 2 2352K 2360K 166960K 3 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 80 0 77 1 0 1 1 0 8 0 rtentry 112 145 0 45 4 0 4 4 0 8 0 unpcb 144 312 0 292 2 0 2 2 0 8 0 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 808 136 0 130 5 3 2 4 0 8 1 arp 88 23 0 6 1 0 1 1 0 8 0 ipq 40 2 0 1 1 0 1 1 0 8 0 ipqe 40 47 0 45 1 0 1 1 0 8 0 inpcb 336 662 0 650 14 5 9 12 0 8 7 nd6 104 32 0 12 1 0 1 1 0 8 0 pkpcb 40 7 0 6 1 0 1 1 0 8 0 kcovpl 48 10 0 2 1 0 1 1 0 8 0 ppxss 1072 4 0 4 1 0 1 1 0 8 1 pfstscr 40 2 0 1 2 1 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 3 0 1 2 1 1 1 0 8 0 pfstate 344 2 0 1 2 1 1 1 0 8 0 pfrule 1344 6 0 6 1 0 1 1 0 8 1 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 557 0 150 29 0 29 29 0 8 0 art_table 32 561 0 150 4 0 4 4 0 8 0 art_node 16 139 0 48 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 3 1 0 1 1 0 8 0 semapl 112 16 0 6 1 0 1 1 0 8 0 shmpl 112 12 0 2 1 0 1 1 0 8 0 dirhash 1024 26 0 9 3 0 3 3 0 8 0 dino2pl 256 2370 0 867 95 0 95 95 0 8 0 ffsino 240 2370 0 867 89 0 89 89 0 8 0 nchpl 144 3202 0 1519 63 0 63 63 0 8 0 uvmvnodes 80 2814 0 0 58 0 58 58 0 8 0 vnodes 216 2814 0 0 157 0 157 157 0 8 0 namei 1024 10938 0 10938 4 2 2 2 0 8 2 kstatmem 264 38 0 18 2 0 2 2 0 8 0 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 9358 0 9358 10 2 8 8 1 8 8 plimitpl 152 226 0 209 1 0 1 1 0 8 0 sigapl 424 898 0 831 9 1 8 8 0 8 0 futexpl 64 7238 0 7233 1 0 1 1 0 8 0 knotepl 120 27811 0 27759 17 7 10 10 0 8 8 kqueuepl 184 173 0 163 3 2 1 3 0 8 0 pipepl 288 154 0 126 4 1 3 3 0 8 0 fdescpl 432 860 0 832 5 1 4 5 0 8 0 filepl 120 5051 0 4795 15 1 14 14 0 8 3 lockfpl 104 254 0 252 2 0 2 2 0 8 1 lockfspl 48 74 0 72 1 0 1 1 0 8 0 sessionpl 144 24 0 16 1 0 1 1 0 8 0 pgrppl 48 49 0 33 1 0 1 1 0 8 0 ucredpl 104 606 0 592 1 0 1 1 0 8 0 zombiepl 144 1091 0 1089 2 1 1 1 0 8 0 processpl 1096 898 0 831 5 0 5 5 0 8 0 procpl 648 1681 0 1599 9 0 9 9 0 8 1 sockpl 504 1069 0 1033 25 13 12 21 0 8 6 mcl64k 65536 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 14 0 14 2 1 1 1 0 8 1 mcl4k 4096 3254 0 3202 18 8 10 15 0 8 2 mcl2k 2048 648 0 646 1 0 1 1 0 8 0 mtagpl 96 18 0 7 1 0 1 1 0 8 0 mbufpl 256 10378 0 10221 36 14 22 23 0 8 8 bufpl 280 3149 0 99 218 0 218 218 0 8 0 anonpl 24 166860 0 163393 58 12 46 46 0 187 20 amapchunkpl 152 23005 0 22485 28 5 23 26 0 158 1 amappl16 200 3858 0 3831 21 10 11 15 0 8 8 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 115 0 105 1 0 1 1 0 8 0 amappl13 176 14 0 14 2 1 1 1 0 8 1 amappl12 168 1505 0 1475 3 1 2 3 0 8 0 amappl11 160 86 0 76 1 0 1 1 0 8 0 amappl10 152 9 0 9 2 1 1 1 0 8 1 amappl9 144 129 0 129 1 1 0 1 0 8 0 amappl8 136 90 0 88 1 0 1 1 0 8 0 amappl7 128 109 0 99 1 0 1 1 0 8 0 amappl6 120 183 0 182 1 0 1 1 0 8 0 amappl5 112 132 0 123 1 0 1 1 0 8 0 amappl4 104 299 0 286 1 0 1 1 0 8 0 amappl3 96 4282 0 4187 3 0 3 3 0 8 0 amappl2 88 1125 0 1047 2 0 2 2 0 8 0 amappl1 80 8742 0 8227 13 1 12 13 0 8 0 amappl 88 6730 0 6549 5 0 5 5 0 92 0 dma65536 65536 1 0 1 1 0 1 1 0 8 1 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 2 0 2 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 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 14 0 2 1 0 1 1 0 8 0 uaddrrnd 24 860 0 831 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 860 0 831 1 0 1 1 0 8 0 vmmpekpl 168 8238 0 8191 3 0 3 3 0 8 0 vmmpepl 168 59202 0 57443 90 1 89 89 0 357 10 vmsppl 344 859 0 831 4 1 3 4 0 8 0 rwobjpl 24 21944 0 18255 23 0 23 23 0 8 0 pdppl 4096 1726 0 1662 104 38 66 82 0 8 2 pvpl 32 397506 0 388583 133 18 115 115 0 265 33 pmappl 216 859 0 831 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 441 0 89 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(ffffffff830b682f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b53c,ffffffff830662f1,307,ffffffff83020d45) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c8408) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c8408) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129cb80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001276800) at bpfdetach+0x76 if_detach(ffff800001276800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001276800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002a59fa80) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a487c10,ffff80002a59fc60,ffff80002a59fbb0) at sys_ioctl+0x678 syscall(ffff80002a59fc60) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5eff4174650, 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(ffffffff830b682f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b53c,ffffffff830662f1,307,ffffffff83020d45) at __assert+0x29 splraise(deadbeef) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012c8408) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012c8408) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012c84a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000129cb80) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001276800) at bpfdetach+0x76 if_detach(ffff800001276800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001276800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80002a59fa80) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a487c10,ffff80002a59fc60,ffff80002a59fbb0) at sys_ioctl+0x678 syscall(ffff80002a59fc60) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5eff4174650, count: -15