panic: kernel diagnostic assertion "suser(curproc) == 0" failed: file "/syzkaller/managers/main/kernel/sys/dev/dt/dt_dev.c", line 431 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824292db) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff8249abe3,ffffffff824b8dae,1af,ffffffff8246aab5) at __assert+0x25 sys/kern/subr_prf.c:161 dt_ioctl_record_stop(ffff800000cb9180) at dt_ioctl_record_stop+0x165 sys/dev/dt/dt_dev.c:431 dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 dt_pcb_purge sys/dev/dt/dt_dev.c:582 [inline] dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 sys/dev/dt/dt_dev.c:204 spec_close(ffff800022f39240) at spec_close+0x363 sys/kern/spec_vnops.c:572 VOP_CLOSE(fffffd8067249208,1,fffffd807f7d8360,ffff80002163e550) at VOP_CLOSE+0xde sys/kern/vfs_vops.c:156 vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:624 fdrop(fffffd806467eb40,ffff80002163e550) at fdrop+0xc7 sys/kern/kern_descrip.c:1279 closef(fffffd806467eb40,ffff80002163e550) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80002163e550) at fdfree+0xf3 sys/kern/kern_descrip.c:1195 exit1(ffff80002163e550,0,0,1) at exit1+0x35d sys/kern/kern_exit.c:202 sys_exit(ffff80002163e550,ffff800022f394d0,ffff800022f39530) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff800022f395a0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 end trace frame: 0xffff800022f39620, 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 "suser(curproc) == 0" failed: file "/syzkaller/managers/main/kernel/sys/dev/dt/dt_dev.c", line 431 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824292db) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff8249abe3,ffffffff824b8dae,1af,ffffffff8246aab5) at __assert+0x25 sys/kern/subr_prf.c:161 dt_ioctl_record_stop(ffff800000cb9180) at dt_ioctl_record_stop+0x165 sys/dev/dt/dt_dev.c:431 dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 dt_pcb_purge sys/dev/dt/dt_dev.c:582 [inline] dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 sys/dev/dt/dt_dev.c:204 spec_close(ffff800022f39240) at spec_close+0x363 sys/kern/spec_vnops.c:572 VOP_CLOSE(fffffd8067249208,1,fffffd807f7d8360,ffff80002163e550) at VOP_CLOSE+0xde sys/kern/vfs_vops.c:156 vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:624 fdrop(fffffd806467eb40,ffff80002163e550) at fdrop+0xc7 sys/kern/kern_descrip.c:1279 closef(fffffd806467eb40,ffff80002163e550) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80002163e550) at fdfree+0xf3 sys/kern/kern_descrip.c:1195 exit1(ffff80002163e550,0,0,1) at exit1+0x35d sys/kern/kern_exit.c:202 sys_exit(ffff80002163e550,ffff800022f394d0,ffff800022f39530) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff800022f395a0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffafc0, count: -15 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800022f39060 rbx 0 rdx 0 rcx 0 rax 0xffff80002163e550 r8 0x101010101010101 r9 0x8080808080808080 r10 0xc214af94c373989a r11 0x8bfa697db6125e71 r12 0 r13 0xffff800000cb9180 r14 0 r15 0x1 rip 0xffffffff8103e808 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022f39050 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=140965 stat=onproc flags process=1018 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff80002163ea90,0xffffffff828bf260 process=0xffff8000216713a0 user=0xffff800022f34000, vmspace=0xfffffd807039aaa0 estcpu=36, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 78935 350327 79117 0 3 0x82 nanoslp syz-executor.1 25251 259183 0 0 3 0x14200 acct acct 75459 398962 1 0 3 0x100083 ttyin getty 66738 42191 79117 0 3 0x82 nanoslp syz-executor.0 28268 94041 0 0 3 0x14200 bored sosplice 79117 173227 77182 0 3 0x82 thrsleep syz-fuzzer 79117 347285 77182 0 3 0x4000082 thrsleep syz-fuzzer 79117 308414 77182 0 3 0x4000082 thrsleep syz-fuzzer 79117 49513 77182 0 3 0x4000082 thrsleep syz-fuzzer 79117 324001 77182 0 3 0x4000082 thrsleep syz-fuzzer 79117 223840 77182 0 3 0x4000082 thrsleep syz-fuzzer 79117 89518 77182 0 3 0x4000082 kqread syz-fuzzer 77182 399985 72176 0 3 0x10008a sigsusp ksh 72176 245363 31447 0 3 0x9a poll sshd 31447 300354 1 0 3 0x88 poll sshd 28267 60693 460 73 3 0x100090 kqread syslogd 460 25554 1 0 3 0x100082 netio syslogd 67728 162608 1 0 3 0x100080 kqread resolvd 23521 377876 21529 77 3 0x100092 kqread dhcpleased 61327 287132 21529 77 3 0x100092 kqread dhcpleased 21529 39855 1 0 3 0x80 kqread dhcpleased 85641 339699 0 0 3 0x14200 bored smr 84956 90243 0 0 2 0x14200 zerothread 15555 397572 0 0 3 0x14200 aiodoned aiodoned 19439 476692 0 0 3 0x14200 syncer update 99826 190021 0 0 3 0x14200 cleaner cleaner 45004 194549 0 0 3 0x14200 reaper reaper 5325 41014 0 0 3 0x14200 pgdaemon pagedaemon 11774 184487 0 0 3 0x14200 bored viomb 15748 299197 0 0 3 0x40014200 acpi0 acpi0 97404 121135 0 0 3 0x14200 bored softnet 14550 328086 0 0 3 0x14200 bored systqmp 6065 401222 0 0 3 0x14200 bored systq 80517 477392 0 0 2 0x40014200 softclock 44050 155867 0 0 3 0x40014200 idle0 1 170309 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 10122 6422K 7999K 78643K 23701 0 pcb 13 11K 12K 78643K 343 0 rtable 135 13K 16K 78643K 8542 0 ifaddr 64 17K 18K 78643K 576 0 sysctl 3 1K 1K 78643K 3 0 counters 21 16K 17K 78643K 87 0 ioctlops 0 0K 4K 78643K 27559 0 iov 0 0K 24K 78643K 11540 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1399 88K 88K 78643K 8610 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 48 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 394 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 21817 0 sigio 0 0K 0K 78643K 188 0 proc 61 55K 71K 78643K 854 0 subproc 26 1K 1K 78643K 221 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 1 0K 0K 78643K 241 0 in_multi 32 2K 2K 78643K 431 0 ether_multi 2 0K 0K 78643K 97 0 mrt 2 0K 0K 78643K 23 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 61 281K 281K 78643K 61 0 exec 0 0K 2K 78643K 983 0 pfkey data 0 0K 1K 78643K 1 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 289 54K 69K 78643K 261329 0 UVM aobj 131 4K 4K 78643K 131 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 294 0 NDP 6 0K 0K 78643K 110 0 temp 95 4221K 4293K 78643K 103223 0 kqueue 10 14K 20K 78643K 826 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 8436 0 8433 62 61 1 5 0 8 0 rtentry 112 259 0 222 3 1 2 2 0 8 0 unpcb 128 12186 0 12173 96 95 1 7 0 8 0 syncache 296 24 0 24 6 6 0 1 0 8 0 tcpqe 32 12 0 12 6 6 0 1 0 8 0 tcpcb 736 8306 0 8301 224 223 1 21 0 8 0 arp 88 43 0 37 1 0 1 1 0 8 0 ipq 40 10 0 10 4 4 0 1 0 8 0 ipqe 40 20 0 20 4 4 0 1 0 8 0 inpcb 304 9646 0 9638 155 154 1 16 0 8 0 rttmr 72 7 0 7 3 3 0 1 0 8 0 ip6q 72 4 0 4 2 2 0 1 0 8 0 ip6af 40 6 0 6 2 2 0 1 0 8 0 nd6 48 61 0 52 2 1 1 1 0 8 0 pkpcb 40 13 0 13 5 5 0 1 0 8 0 kcovpl 48 17 0 15 2 1 1 1 0 8 0 ppxss 1152 24 0 24 9 9 0 1 0 8 0 pfstscr 40 39 0 39 3 3 0 1 0 8 0 pfosfp 40 8400 0 8393 5 4 1 1 0 8 0 pfosfpen 112 8400 0 8354 34 32 2 11 0 8 0 pfrktable 1344 332 0 314 3 1 2 3 0 8 0 pftag 88 46 0 38 2 1 1 1 0 8 0 pfqueue 264 604 0 97 35 1 34 34 0 8 0 pfstitem 24 32 0 32 2 2 0 1 0 8 0 pfstkey 112 78 0 78 3 3 0 1 0 8 0 pfstate 320 39 0 39 3 3 0 1 0 8 0 pfsrctr 152 304 0 304 13 13 0 1 0 8 0 pfrule 1360 6090 0 1535 381 1 380 380 0 8 0 art_heap8 4096 2 0 1 2 1 1 2 0 8 0 art_heap4 256 1182 0 991 25 13 12 13 0 8 0 art_table 32 1184 0 992 3 1 2 2 0 8 0 art_node 16 257 0 227 1 0 1 1 0 8 0 sysvmsgpl 40 50 0 27 1 0 1 1 0 8 0 semapl 112 392 0 382 1 0 1 1 0 8 0 shmpl 112 128 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 29580 0 28180 88 0 88 88 0 8 0 ffsino 240 29580 0 28180 83 0 83 83 0 8 0 nchpl 144 63948 0 62351 60 0 60 60 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 193559 0 193559 8 7 1 1 0 8 1 vcpupl 1984 2 0 1 1 0 1 1 0 8 0 vmpool 528 5 0 4 1 0 1 1 0 8 0 pfiaddrpl 120 104 0 82 2 1 1 1 0 8 0 scsiplug 72 3 0 3 2 2 0 1 0 8 0 scxspl 216 159055 0 159055 15 14 1 8 0 8 1 plimitpl 152 291 0 283 1 0 1 1 0 8 0 sigapl 424 22017 0 21986 6 2 4 6 0 8 0 futexpl 64 178360 0 178360 6 5 1 1 0 8 1 knotepl 112 2018 0 1980 2 0 2 2 0 8 0 kqueuepl 184 1991 0 1984 35 34 1 7 0 8 0 pipepl 304 3353 0 3343 65 64 1 6 0 8 0 fdescpl 432 21982 0 21966 4 2 2 3 0 8 0 filepl 120 143643 0 143540 195 189 6 11 0 8 2 lockfpl 104 23760 0 23758 45 44 1 4 0 8 0 lockfspl 48 4377 0 4375 1 0 1 1 0 8 0 sessionpl 144 34 0 24 1 0 1 1 0 8 0 pgrppl 48 71 0 61 1 0 1 1 0 8 0 ucredpl 96 7221 0 7210 1 0 1 1 0 8 0 zombiepl 144 21987 0 21985 1 0 1 1 0 8 0 processpl 1000 22017 0 21985 10 5 5 7 0 8 1 procpl 672 49665 0 49627 40 36 4 6 0 8 0 sosppl 168 26 0 26 9 9 0 1 0 8 0 sockpl 448 30286 0 30262 503 499 4 28 0 8 0 mcl64k 65536 1281 0 1281 53 52 1 1 0 8 1 mcl16k 16384 79 0 79 27 27 0 1 0 8 0 mcl12k 12288 396 0 396 50 50 0 1 0 8 0 mcl9k 9216 147 0 147 43 42 1 1 0 8 1 mcl8k 8192 608 0 608 60 59 1 1 0 8 1 mcl4k 4096 2148 0 2148 45 44 1 1 0 8 1 mcl2k2 2112 87 0 87 37 37 0 1 0 8 0 mcl2k 2048 76041 0 75989 122 114 8 12 0 8 0 mtagpl 96 412 0 399 9 8 1 5 0 8 0 mbufpl 256 271472 0 271231 57 34 23 40 0 8 0 bufpl 288 30658 0 24242 459 0 459 459 0 8 0 anonpl 24 6779968 0 6769211 230 160 70 97 0 188 0 amapchunkpl 152 626607 0 626161 73 54 19 38 0 158 0 amappl16 200 115412 0 115109 73 56 17 29 0 8 0 amappl15 192 692 0 685 1 0 1 1 0 8 0 amappl14 184 4 0 2 1 0 1 1 0 8 0 amappl13 176 248 0 245 1 0 1 1 0 8 0 amappl12 168 1014 0 1009 1 0 1 1 0 8 0 amappl11 160 19780 0 19767 1 0 1 1 0 8 0 amappl10 152 41 0 37 2 1 1 1 0 8 0 amappl9 144 467 0 465 1 0 1 1 0 8 0 amappl8 136 1094 0 945 8 2 6 6 0 8 0 amappl7 128 307 0 299 1 0 1 1 0 8 0 amappl6 120 230 0 210 1 0 1 1 0 8 0 amappl5 112 17939 0 17928 1 0 1 1 0 8 0 amappl4 104 24760 0 24727 1 0 1 1 0 8 0 amappl3 96 1726 0 1708 1 0 1 1 0 8 0 amappl2 88 2029 0 1984 2 0 2 2 0 8 0 amappl1 80 369025 0 368605 14 4 10 12 0 8 0 amappl 88 260673 0 260533 4 0 4 4 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 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 130 0 0 3 0 3 3 0 8 0 uaddrrnd 24 21987 0 21970 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 21987 0 21970 1 0 1 1 0 8 0 vmmpekpl 168 130474 0 130450 2 0 2 2 0 8 0 vmmpepl 168 1958227 0 1956620 190 115 75 87 0 357 1 vmsppl 272 21986 0 21970 4 2 2 2 0 8 0 rwobjpl 24 488850 0 481671 47 2 45 45 0 8 0 pdppl 4096 43980 0 43941 69 28 41 44 0 8 2 pvpl 32 10635881 0 10621801 456 338 118 229 0 265 1 pmappl 216 21986 0 21970 6 5 1 2 0 8 0 extentpl 40 57 0 38 1 0 1 1 0 8 0 phpool 112 2216 0 1106 33 0 33 33 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824292db) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff8249abe3,ffffffff824b8dae,1af,ffffffff8246aab5) at __assert+0x25 sys/kern/subr_prf.c:161 dt_ioctl_record_stop(ffff800000cb9180) at dt_ioctl_record_stop+0x165 sys/dev/dt/dt_dev.c:431 dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 dt_pcb_purge sys/dev/dt/dt_dev.c:582 [inline] dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 sys/dev/dt/dt_dev.c:204 spec_close(ffff800022f39240) at spec_close+0x363 sys/kern/spec_vnops.c:572 VOP_CLOSE(fffffd8067249208,1,fffffd807f7d8360,ffff80002163e550) at VOP_CLOSE+0xde sys/kern/vfs_vops.c:156 vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:624 fdrop(fffffd806467eb40,ffff80002163e550) at fdrop+0xc7 sys/kern/kern_descrip.c:1279 closef(fffffd806467eb40,ffff80002163e550) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80002163e550) at fdfree+0xf3 sys/kern/kern_descrip.c:1195 exit1(ffff80002163e550,0,0,1) at exit1+0x35d sys/kern/kern_exit.c:202 sys_exit(ffff80002163e550,ffff800022f394d0,ffff800022f39530) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff800022f395a0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffafc0, count: -15 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824292db) at panic+0x161 sys/kern/subr_prf.c:202 __assert(ffffffff8249abe3,ffffffff824b8dae,1af,ffffffff8246aab5) at __assert+0x25 sys/kern/subr_prf.c:161 dt_ioctl_record_stop(ffff800000cb9180) at dt_ioctl_record_stop+0x165 sys/dev/dt/dt_dev.c:431 dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 dt_pcb_purge sys/dev/dt/dt_dev.c:582 [inline] dtclose(11e6e,1,2000,ffff80002163e550) at dtclose+0xc2 sys/dev/dt/dt_dev.c:204 spec_close(ffff800022f39240) at spec_close+0x363 sys/kern/spec_vnops.c:572 VOP_CLOSE(fffffd8067249208,1,fffffd807f7d8360,ffff80002163e550) at VOP_CLOSE+0xde sys/kern/vfs_vops.c:156 vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806467eb40,ffff80002163e550) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:624 fdrop(fffffd806467eb40,ffff80002163e550) at fdrop+0xc7 sys/kern/kern_descrip.c:1279 closef(fffffd806467eb40,ffff80002163e550) at closef+0x117 sys/kern/kern_descrip.c:1263 fdfree(ffff80002163e550) at fdfree+0xf3 sys/kern/kern_descrip.c:1195 exit1(ffff80002163e550,0,0,1) at exit1+0x35d sys/kern/kern_exit.c:202 sys_exit(ffff80002163e550,ffff800022f394d0,ffff800022f39530) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff800022f395a0) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffafc0, count: -15