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 *308054 55941 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b508a) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c561,ffffffff8306bfaf,307,ffffffff83026ba7) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000013a9608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000013a9608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5300) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001284800) at bpfdetach+0x76 if_detach(ffff800001284800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001284800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376378d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c27c0,ffff800037637ab0,ffff800037637a00) at sys_ioctl+0x678 syscall(ffff800037637ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 end trace frame: 0xffff800037637b30, 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(ffffffff830b508a) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c561,ffffffff8306bfaf,307,ffffffff83026ba7) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000013a9608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000013a9608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5300) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001284800) at bpfdetach+0x76 if_detach(ffff800001284800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001284800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376378d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c27c0,ffff800037637ab0,ffff800037637a00) at sys_ioctl+0x678 syscall(ffff800037637ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb08fe04bba0, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037637570 rbx 0xffffffff8344af30 cdevsw+0x730 rdx 0xffff800001280ac0 rcx 0 rax 0xffff80002a4c27c0 r8 0 r9 0x8080808080808080 r10 0x496c8cd332dbcd4a r11 0xfc781627627047bc r12 0 r13 0xffff8000013a96a8 r14 0 r15 0x1 rip 0xffffffff82ba5725 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037637560 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=308054 pid=55941 tcnt=4 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=0xffff80002a4c2a48,0xffff80002a4c31f0 process=0xffff8000ffff4018 user=0xffff800037632000, vmspace=0xfffffd8068018c78 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 69956 359470 16974 0 2 0 syz-executor 69956 130096 16974 0 2 0x4000000 syz-executor 22123 302100 12978 0 2 0 syz-executor 22123 493475 12978 0 3 0x4000080 fsleep syz-executor 22123 1562 12978 0 3 0x4000080 fsleep syz-executor 24950 230789 58328 0 2 0 syz-executor 24950 26572 58328 0 3 0x4000080 fsleep syz-executor 39087 117380 73064 0 2 0x1 syz-executor 39087 187790 73064 0 3 0x4000080 kqread syz-executor 39087 387191 73064 0 2 0x4000001 syz-executor 55941 465851 85932 0 2 0x1 syz-executor *55941 308054 85932 0 7 0x4000000 syz-executor 55941 51881 85932 0 3 0x4000080 fsleep syz-executor 55941 202001 85932 0 3 0x4000080 fsleep syz-executor 19056 323168 85911 0 2 0x1 syz-executor 19056 64294 85911 0 2 0x4000000 syz-executor 82174 400445 0 0 3 0x14280 nfsidl nfsio 14382 14362 0 0 3 0x14280 nfsidl nfsio 80849 384928 0 0 3 0x14280 nfsidl nfsio 10950 425113 0 0 3 0x14280 nfsidl nfsio 12283 227883 0 0 3 0x14280 nfsidl nfsio 84629 112406 0 0 3 0x14280 nfsidl nfsio 18434 166834 0 0 3 0x14280 nfsidl nfsio 90464 117261 0 0 3 0x14280 nfsidl nfsio 62168 145084 0 0 3 0x14280 nfsidl nfsio 75031 379782 0 0 3 0x14280 nfsidl nfsio 65907 259233 0 0 3 0x14280 nfsidl nfsio 92855 180876 0 0 3 0x14280 nfsidl nfsio 41011 13737 0 0 3 0x14280 nfsidl nfsio 94681 282140 0 0 3 0x14280 nfsidl nfsio 59876 269802 0 0 3 0x14280 nfsidl nfsio 94254 95118 0 0 3 0x14280 nfsidl nfsio 92735 395130 0 0 3 0x14280 nfsidl nfsio 80852 502412 0 0 3 0x14280 nfsidl nfsio 20562 132006 0 0 3 0x14280 nfsidl nfsio 63937 2171 0 0 3 0x14280 nfsidl nfsio 76969 416088 1 0 3 0x100083 ttyin getty 63373 398912 0 0 3 0x14200 bored sosplice 85911 138995 43968 0 2 0x3 syz-executor 73064 207898 43968 0 2 0x482 syz-executor 85932 444554 43968 0 2 0x482 syz-executor 16974 194535 43968 0 2 0x482 syz-executor 58328 108282 43968 0 2 0x482 syz-executor 79962 342481 43968 0 2 0x3 syz-executor 12978 272715 43968 0 2 0x482 syz-executor 98516 184510 43968 0 3 0x82 wait syz-executor 43968 107030 21682 0 3 0x82 kqread syz-executor 21682 103731 3009 0 3 0x10008a sigsusp ksh 3009 319742 84689 0 3 0x98 kqread sshd-session 84689 503492 65903 0 3 0x92 kqread sshd-session 65903 510821 1 0 3 0x88 kqread sshd 69431 329548 38329 73 3 0x1100090 kqread syslogd 38329 22116 1 0 3 0x100082 sbwait syslogd 24581 432789 1 0 3 0x100080 kqread resolvd 86231 384454 29304 77 3 0x100092 kqread dhcpleased 2745 197240 29304 77 3 0x100092 kqread dhcpleased 29304 493381 1 0 3 0x80 kqread dhcpleased 93583 467774 0 0 3 0x14200 bored smr 80949 135924 0 0 2 0x14200 zerothread 64270 14474 0 0 3 0x14200 aiodoned aiodoned 12967 305776 0 0 3 0x14200 syncer update 62994 94477 0 0 3 0x14200 cleaner cleaner 22043 199964 0 0 3 0x14200 reaper reaper 62819 250179 0 0 3 0x14200 pgdaemon pagedaemon 14267 440301 0 0 3 0x14200 bored viomb 9775 319484 0 0 3 0x40014200 acpi0 acpi0 72583 242107 0 0 3 0x14200 bored softnet3 68722 206380 0 0 3 0x14200 bored softnet2 23935 11910 0 0 3 0x14200 bored softnet1 15072 382546 0 0 3 0x14200 bored softnet0 14093 217526 0 0 3 0x14200 bored systqmp 79130 24633 0 0 3 0x14200 bored systq 89612 117874 0 0 2 0x40014200 softclock 80661 377715 0 0 3 0x40014200 idle0 1 278086 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 10200 11068K 11498K 166960K 13020 0 pcb 17 15K 16K 166960K 416 0 rtable 142 7K 9K 166960K 544 0 pf 34 14K 17K 166960K 97 0 ifaddr 26 3K 7K 166960K 68 0 ifgroup 52 2K 2K 166960K 103 0 sysctl 3 0K 0K 166960K 3 0 counters 29 17K 17K 166960K 44 0 ioctlops 0 0K 4K 166960K 145 0 iov 0 0K 16K 166960K 100 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1360 85K 86K 166960K 2339 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 35 0 VM map 2 1K 1K 166960K 2 0 sem 20 140K 240K 166960K 91 0 dirhash 12 2K 2K 166960K 36 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 17 61K 97K 166960K 1353 0 sigio 0 0K 0K 166960K 19 0 proc 61 67K 124K 166960K 603 0 subproc 104 6K 6K 166960K 107 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 254 0 in_multi 40 3K 7K 166960K 159 0 ether_multi 1 0K 0K 166960K 12 0 mrt 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 223 996K 996K 166960K 223 0 exec 0 0K 1K 166960K 496 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 229 72K 87K 166960K 15118 0 UVM aobj 20 2K 2K 166960K 22 0 pinsyscall 38 76K 106K 166960K 2389 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 50 0 NDP 10 0K 2K 166960K 46 0 temp 79 6816K 6942K 166960K 59551 0 kqueue 14 22K 30K 166960K 260 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 145 0 142 1 0 1 1 0 8 0 rtentry 112 149 0 94 4 0 4 4 0 8 0 unpcb 144 1115 0 1098 4 0 4 4 0 8 3 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 808 428 0 424 8 0 8 8 0 8 7 arp 88 24 0 10 1 0 1 1 0 8 0 ipq 40 8 0 7 1 0 1 1 0 8 0 ipqe 40 59 0 58 1 0 1 1 0 8 0 inpcb 336 1776 0 1765 11 2 9 10 0 8 7 nd6 104 34 0 23 1 0 1 1 0 8 0 pkpcb 40 6 0 6 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 8 0 8 1 0 1 1 0 8 1 pfrktable 1344 6 0 3 1 0 1 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pftag 88 4 0 2 1 0 1 1 0 8 0 pfstitem 24 3 0 1 1 0 1 1 0 8 0 pfstkey 128 4 0 1 1 0 1 1 0 8 0 pfstate 344 2 0 1 1 0 1 1 0 8 0 pfrule 1344 16 0 13 1 0 1 1 0 8 0 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 621 0 401 29 4 25 29 0 8 8 art_table 32 625 0 401 4 0 4 4 0 8 0 art_node 16 141 0 94 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 11 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 83 0 65 1 0 1 1 0 8 0 shmpl 112 19 0 2 1 0 1 1 0 8 0 dirhash 1024 34 0 17 3 0 3 3 0 8 0 dino2pl 256 3946 0 2456 94 0 94 94 0 8 0 ffsino 240 3946 0 2456 89 0 89 89 0 8 0 nchpl 144 5956 0 4275 63 0 63 63 0 8 0 uvmvnodes 80 4503 0 0 92 0 92 92 0 8 0 vnodes 216 4503 0 0 251 0 251 251 0 8 0 namei 1024 19577 0 19576 3 2 1 2 0 8 0 pfiaddrpl 120 2 0 0 1 0 1 1 0 8 0 kstatmem 264 50 0 30 2 0 2 2 0 8 0 scsiplug 72 11 0 11 2 1 1 1 0 8 1 scxspl 216 17125 0 17125 10 2 8 8 1 8 8 plimitpl 152 289 0 273 1 0 1 1 0 8 0 sigapl 424 1658 0 1592 9 1 8 8 0 8 0 futexpl 64 18991 0 18986 1 0 1 1 0 8 0 knotepl 120 49998 0 49950 10 0 10 10 0 8 8 kqueuepl 184 426 0 416 4 0 4 4 0 8 3 pipepl 288 304 0 277 7 0 7 7 0 8 5 fdescpl 432 1620 0 1591 5 0 5 5 0 8 1 filepl 120 10875 0 10628 15 1 14 14 0 8 5 lockfpl 104 344 0 340 1 0 1 1 0 8 0 lockfspl 48 152 0 148 1 0 1 1 0 8 0 sessionpl 144 24 0 16 1 0 1 1 0 8 0 pgrppl 48 39 0 23 1 0 1 1 0 8 0 ucredpl 104 2050 0 2039 1 0 1 1 0 8 0 zombiepl 144 2559 0 2558 2 1 1 1 0 8 0 processpl 1096 1658 0 1592 5 0 5 5 0 8 0 procpl 648 4015 0 3939 8 0 8 8 0 8 0 sosppl 168 10 0 10 1 0 1 1 0 8 1 sockpl 504 3064 0 3034 36 24 12 21 0 8 8 mcl64k 65536 115 0 115 1 0 1 1 0 8 1 mcl16k 16384 3 0 3 1 0 1 1 0 8 1 mcl8k 8192 54 0 54 2 1 1 1 0 8 1 mcl4k 4096 4574 0 4520 15 6 9 15 0 8 2 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 1557 0 1554 2 0 2 2 0 8 1 mtagpl 96 143 0 87 5 1 4 4 0 8 1 mbufpl 256 22838 0 22667 87 61 26 78 0 8 8 bufpl 280 4902 0 100 343 0 343 343 0 8 0 anonpl 24 293333 0 290029 50 4 46 46 0 187 20 amapchunkpl 152 50209 0 49708 33 0 33 33 0 158 13 amappl16 200 7376 0 7345 34 23 11 15 0 8 8 amappl15 192 18 0 18 2 1 1 1 0 8 1 amappl14 184 110 0 100 1 0 1 1 0 8 0 amappl13 176 11 0 11 1 1 0 1 0 8 0 amappl12 168 2235 0 2206 3 0 3 3 0 8 1 amappl11 160 45 0 35 1 0 1 1 0 8 0 amappl10 152 15 0 14 1 0 1 1 0 8 0 amappl9 144 131 0 131 1 1 0 1 0 8 0 amappl8 136 30 0 29 1 0 1 1 0 8 0 amappl7 128 100 0 90 1 0 1 1 0 8 0 amappl6 120 160 0 159 1 0 1 1 0 8 0 amappl5 112 130 0 121 1 0 1 1 0 8 0 amappl4 104 297 0 282 1 0 1 1 0 8 0 amappl3 96 9179 0 9082 3 0 3 3 0 8 0 amappl2 88 1907 0 1829 2 0 2 2 0 8 0 amappl1 80 11172 0 10662 15 2 13 14 0 8 0 amappl 88 14603 0 14429 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 8 0 8 2 1 1 1 0 8 1 dma128 128 257 0 257 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 19 0 18 1 0 1 1 0 8 0 aobjpl 72 21 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1620 0 1591 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1620 0 1591 1 0 1 1 0 8 0 vmmpekpl 168 14969 0 14940 3 0 3 3 0 8 0 vmmpepl 168 105932 0 104193 95 6 89 89 0 357 11 vmsppl 352 1619 0 1591 4 1 3 4 0 8 0 rwobjpl 24 36182 0 30802 34 1 33 33 0 8 0 pdppl 4096 3246 0 3182 112 46 66 82 0 8 2 pvpl 32 723006 0 713993 121 7 114 114 0 265 36 pmappl 216 1619 0 1591 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 510 0 149 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(ffffffff830b508a) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c561,ffffffff8306bfaf,307,ffffffff83026ba7) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000013a9608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000013a9608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5300) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001284800) at bpfdetach+0x76 if_detach(ffff800001284800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001284800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376378d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c27c0,ffff800037637ab0,ffff800037637a00) at sys_ioctl+0x678 syscall(ffff800037637ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb08fe04bba0, 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(ffffffff830b508a) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8306c561,ffffffff8306bfaf,307,ffffffff83026ba7) at __assert+0x29 splraise(deafbead) at splraise+0xad sys/arch/amd64/amd64/intr.c:775 mtx_enter(ffff8000013a9608) at mtx_enter+0x9e sys/kern/kern_lock.c:308 klist_mutex_lock(ffff8000013a9608) at klist_mutex_lock+0x32 sys/kern/kern_event.c:2352 klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 klist_lock sys/kern/kern_event.c:2317 [inline] klist_invalidate(ffff8000013a96a8) at klist_invalidate+0xe6 sys/kern/kern_event.c:2283 bpfsdetach(ffff8000012a5300) at bpfsdetach+0xff sys/net/bpf.c:1800 bpfdetach(ffff800001284800) at bpfdetach+0x76 if_detach(ffff800001284800) at if_detach+0x14f sys/net/if.c:1193 tun_clone_destroy(ffff800001284800) at tun_clone_destroy+0x2aa sys/net/if_tun.c:338 if_clone_destroy(ffff8000376378d0) at if_clone_destroy+0x1d7 sys/net/if.c:1382 sys_ioctl(ffff80002a4c27c0,ffff800037637ab0,ffff800037637a00) at sys_ioctl+0x678 syscall(ffff800037637ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb08fe04bba0, count: -15