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 *312903 87857 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b7b0d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b914,ffffffff830629bf,307,ffffffff8301d90a) at __assert+0x29 splraise(dead4110) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012e6608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012e6608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000127f540) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001268800) at bpfdetach+0x76 if_detach(ffff800001268800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001268800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003770fc30) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff8000376b22c0,ffff80003770fe10,ffff80003770fd60) at sys_ioctl+0x678 syscall(ffff80003770fe10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff80003770fe90, 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(ffffffff830b7b0d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b914,ffffffff830629bf,307,ffffffff8301d90a) at __assert+0x29 splraise(dead4110) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012e6608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012e6608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000127f540) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001268800) at bpfdetach+0x76 if_detach(ffff800001268800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001268800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003770fc30) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff8000376b22c0,ffff80003770fe10,ffff80003770fd60) at sys_ioctl+0x678 syscall(ffff80003770fe10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x97107f80cb0, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003770f8d0 rbx 0xffffffff8340fd70 cdevsw+0x730 rdx 0xffff8000000459c0 rcx 0 rax 0xffff8000376b22c0 r8 0 r9 0x8080808080808080 r10 0xcaf6e693549c4f3a r11 0x66884b072969852e r12 0 r13 0xffff8000012e66a8 r14 0 r15 0x1 rip 0xffffffff81395ce5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003770f8c0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=312903 pid=87857 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4d0028,0xffff8000376fc2d8 process=0xffff8000376877c8 user=0xffff80003770a000, vmspace=0xfffffd806ea85818 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 29618 430986 37026 0 3 0 futex syz-executor 89407 148040 25011 0 3 0 futex syz-executor 89407 267792 25011 0 3 0x4000080 fsleep syz-executor 40294 11953 46095 0 2 0x480 syz-executor 40294 360081 46095 0 3 0x4000080 sbwait syz-executor 40294 36405 46095 0 3 0x4000080 fsleep syz-executor 40294 384365 46095 0 3 0x4000080 fsleep syz-executor 13506 398079 16322 0 2 0 syz-executor 13506 415161 16322 0 2 0x4000000 syz-executor 13506 7170 16322 0 3 0x4000080 fsleep syz-executor 13506 414726 16322 0 2 0x4000000 syz-executor 14438 236962 4234 0 2 0 syz-executor 14438 344219 4234 0 2 0x4000000 syz-executor 14438 347010 4234 0 3 0x4000080 fsleep syz-executor 14438 179501 4234 0 2 0x4000000 syz-executor 87857 96375 98112 0 3 0x80 nanoslp syz-executor *87857 312903 98112 0 7 0x4000000 syz-executor 16322 127753 15026 0 2 0x482 syz-executor 37026 150077 15026 0 3 0x82 nanoslp syz-executor 12656 64900 1 0 3 0x100083 ttyin getty 86862 3594 15026 0 2 0x2 syz-executor 4234 82374 15026 0 3 0x82 nanoslp syz-executor 47884 369436 0 0 3 0x14200 bored sosplice 61120 349347 0 0 3 0x14280 nfsidl nfsio 21478 261332 0 0 3 0x14280 nfsidl nfsio 22574 199209 0 0 3 0x14280 nfsidl nfsio 44763 256373 0 0 3 0x14280 nfsidl nfsio 84602 339631 0 0 3 0x14280 nfsidl nfsio 48744 166701 0 0 3 0x14280 nfsidl nfsio 2901 251154 0 0 3 0x14280 nfsidl nfsio 61085 249448 0 0 3 0x14280 nfsidl nfsio 43048 237093 0 0 3 0x14280 nfsidl nfsio 18582 338236 0 0 3 0x14280 nfsidl nfsio 78269 33221 0 0 3 0x14280 nfsidl nfsio 74968 355579 0 0 3 0x14280 nfsidl nfsio 66158 461113 0 0 3 0x14280 nfsidl nfsio 97030 420491 0 0 3 0x14280 nfsidl nfsio 8081 154713 0 0 3 0x14280 nfsidl nfsio 99720 239320 0 0 3 0x14280 nfsidl nfsio 53626 447275 0 0 3 0x14280 nfsidl nfsio 51643 478802 0 0 3 0x14280 nfsidl nfsio 79876 44014 0 0 3 0x14280 nfsidl nfsio 58357 517250 0 0 3 0x14280 nfsidl nfsio 25011 159750 15026 0 3 0x82 nanoslp syz-executor 28521 395092 15026 0 2 0x482 syz-executor 46095 332929 15026 0 3 0x82 nanoslp syz-executor 98112 207191 15026 0 2 0x482 syz-executor 15026 350229 40129 0 3 0x82 kqread syz-executor 40129 438748 8593 0 3 0x10008a sigsusp ksh 8593 219294 53879 0 3 0x98 kqread sshd-session 53879 345206 52591 0 3 0x92 kqread sshd-session 52591 234316 1 0 3 0x88 kqread sshd 68534 211491 58741 73 3 0x1100090 kqread syslogd 58741 400270 1 0 3 0x100082 sbwait syslogd 82443 25012 1 0 3 0x100080 kqread resolvd 23892 305916 86782 77 3 0x100092 kqread dhcpleased 37948 233788 86782 77 3 0x100092 kqread dhcpleased 86782 318077 1 0 3 0x80 kqread dhcpleased 94807 327840 0 0 3 0x14200 bored smr 4556 481122 0 0 2 0x14200 zerothread 6753 260896 0 0 3 0x14200 aiodoned aiodoned 53069 1729 0 0 3 0x14200 syncer update 62791 346052 0 0 3 0x14200 cleaner cleaner 47407 485530 0 0 2 0x14200 reaper 71650 148182 0 0 3 0x14200 pgdaemon pagedaemon 64892 436251 0 0 3 0x14200 bored viomb 2479 481694 0 0 3 0x40014200 acpi0 acpi0 76464 456180 0 0 3 0x14200 bored softnet3 39804 130574 0 0 3 0x14200 bored softnet2 28554 497462 0 0 3 0x14200 bored softnet1 88157 473954 0 0 3 0x14200 bored softnet0 45173 43316 0 0 3 0x14200 bored systqmp 28782 109313 0 0 3 0x14200 bored systq 61610 31933 0 0 3 0x40014200 tmoslp softclock 78976 123950 0 0 3 0x40014200 idle0 1 44816 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 10205 11126K 11380K 166960K 12079 0 pcb 18 13K 14K 166960K 263 0 rtable 225 6K 7K 166960K 548 0 pf 31 13K 14K 166960K 60 0 ifaddr 41 7K 8K 166960K 74 0 ifgroup 50 2K 2K 166960K 86 0 sysctl 1 1K 1K 166960K 1 0 counters 30 17K 17K 166960K 41 0 ioctlops 0 0K 4K 166960K 110 0 iov 0 0K 16K 166960K 247 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1491 94K 94K 166960K 2160 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 13K 166960K 14 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 64 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 16 57K 93K 166960K 850 0 sigio 0 0K 0K 166960K 14 0 proc 61 59K 108K 166960K 642 0 subproc 104 6K 6K 166960K 162 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 452 0 in_multi 95 7K 7K 166960K 170 0 ether_multi 1 0K 0K 166960K 3 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 235 1049K 1049K 166960K 235 0 exec 0 0K 1K 166960K 493 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 232 72K 88K 166960K 9515 0 UVM aobj 56 2K 4K 166960K 60 0 pinsyscall 37 74K 98K 166960K 1990 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 42 0 NDP 12 0K 2K 166960K 51 0 temp 58 6811K 6951K 166960K 33399 0 kqueue 16 26K 28K 166960K 136 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 160 0 157 3 0 3 3 0 8 2 rtentry 112 171 0 67 4 0 4 4 0 8 0 unpcb 144 720 0 702 4 0 4 4 0 8 3 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpcb 808 240 0 233 5 0 5 5 0 8 4 arp 88 28 0 10 1 0 1 1 0 8 0 ipq 40 2 0 2 1 0 1 1 0 8 1 ipqe 40 4 0 4 1 0 1 1 0 8 1 inpcb 336 1087 0 1072 10 1 9 9 0 8 7 nd6 104 39 0 19 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 12 0 4 1 0 1 1 0 8 0 ppxss 1072 6 0 6 1 0 1 1 0 8 1 pfrule 1344 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 688 0 265 31 0 31 31 0 8 4 art_table 32 692 0 265 4 0 4 4 0 8 0 art_node 16 168 0 73 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 3 1 0 1 1 0 8 0 semapl 112 62 0 52 1 0 1 1 0 8 0 shmpl 112 57 0 4 2 0 2 2 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2775 0 1277 95 0 95 95 0 8 0 ffsino 240 2775 0 1277 89 0 89 89 0 8 0 nchpl 144 4084 0 3487 63 33 30 63 0 8 7 uvmvnodes 80 3422 0 0 70 0 70 70 0 8 0 vnodes 216 3422 0 0 191 0 191 191 0 8 0 namei 1024 13782 0 13781 3 1 2 2 0 8 1 kstatmem 264 44 0 22 2 0 2 2 0 8 0 scsiplug 72 3 0 3 1 0 1 1 0 8 1 scxspl 216 11342 0 11342 9 1 8 8 1 8 8 plimitpl 152 186 0 170 1 0 1 1 0 8 0 sigapl 424 1151 0 1085 9 1 8 8 0 8 0 futexpl 64 10940 0 10934 2 1 1 1 0 8 0 knotepl 120 37986 0 37932 17 7 10 17 0 8 8 kqueuepl 184 225 0 213 1 0 1 1 0 8 0 pipepl 288 185 0 158 3 0 3 3 0 8 0 fdescpl 432 1109 0 1081 5 1 4 5 0 8 0 filepl 120 7369 0 7116 12 0 12 12 0 8 3 lockfpl 104 334 0 332 1 0 1 1 0 8 0 lockfspl 48 123 0 121 1 0 1 1 0 8 0 sessionpl 144 28 0 20 1 0 1 1 0 8 0 pgrppl 48 63 0 47 1 0 1 1 0 8 0 ucredpl 104 1159 0 1146 1 0 1 1 0 8 0 zombiepl 144 1514 0 1513 2 1 1 1 0 8 0 processpl 1096 1151 0 1085 5 0 5 5 0 8 0 procpl 648 2349 0 2272 9 1 8 8 0 8 0 sosppl 168 10 0 10 1 0 1 1 0 8 1 sockpl 504 1985 0 1949 22 10 12 17 0 8 6 mcl64k 65536 10 0 10 1 0 1 1 0 8 1 mcl8k 8192 13 0 13 2 1 1 1 0 8 1 mcl4k 4096 3607 0 3557 18 10 8 18 0 8 1 mcl2k 2048 1122 0 1122 5 1 4 4 0 8 4 mtagpl 96 19 0 10 2 1 1 1 0 8 0 mbufpl 256 13457 0 13304 51 27 24 49 0 8 8 bufpl 280 4610 0 98 323 0 323 323 0 8 0 anonpl 24 242278 0 239021 60 3 57 57 0 187 26 amapchunkpl 152 32332 0 31821 38 2 36 36 0 158 15 amappl16 200 6312 0 6287 26 14 12 15 0 8 8 amappl15 192 14 0 14 1 1 0 1 0 8 0 amappl14 184 120 0 110 1 0 1 1 0 8 0 amappl13 176 12 0 12 2 1 1 1 0 8 1 amappl12 168 1788 0 1759 3 1 2 3 0 8 0 amappl11 160 71 0 61 1 0 1 1 0 8 0 amappl10 152 19 0 19 2 1 1 1 0 8 1 amappl9 144 125 0 125 1 1 0 1 0 8 0 amappl8 136 24 0 23 1 0 1 1 0 8 0 amappl7 128 124 0 114 1 0 1 1 0 8 0 amappl6 120 222 0 221 1 0 1 1 0 8 0 amappl5 112 170 0 161 1 0 1 1 0 8 0 amappl4 104 313 0 296 1 0 1 1 0 8 0 amappl3 96 5764 0 5663 3 0 3 3 0 8 0 amappl2 88 1399 0 1322 2 0 2 2 0 8 0 amappl1 80 9936 0 9428 15 2 13 13 0 8 1 amappl 88 9063 0 8886 5 0 5 5 0 92 0 dma8192 8192 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 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 59 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1109 0 1080 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1109 0 1080 1 0 1 1 0 8 0 vmmpekpl 168 10057 0 10017 3 0 3 3 0 8 0 vmmpepl 168 76244 0 74506 96 7 89 89 0 357 10 vmsppl 344 1108 0 1080 4 1 3 4 0 8 0 rwobjpl 24 28425 0 24090 28 1 27 27 0 8 0 pdppl 4096 2224 0 2160 114 48 66 80 0 8 2 pvpl 32 530494 0 521791 141 10 131 131 0 265 38 pmappl 216 1108 0 1080 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 463 0 102 12 0 12 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(ffffffff830b7b0d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b914,ffffffff830629bf,307,ffffffff8301d90a) at __assert+0x29 splraise(dead4110) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012e6608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012e6608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000127f540) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001268800) at bpfdetach+0x76 if_detach(ffff800001268800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001268800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003770fc30) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff8000376b22c0,ffff80003770fe10,ffff80003770fd60) at sys_ioctl+0x678 syscall(ffff80003770fe10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x97107f80cb0, 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(ffffffff830b7b0d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306b914,ffffffff830629bf,307,ffffffff8301d90a) at __assert+0x29 splraise(dead4110) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000012e6608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000012e6608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000012e66a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff80000127f540) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001268800) at bpfdetach+0x76 if_detach(ffff800001268800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001268800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff80003770fc30) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff8000376b22c0,ffff80003770fe10,ffff80003770fd60) at sys_ioctl+0x678 syscall(ffff80003770fe10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x97107f80cb0, count: -15