panic: kernel diagnostic assertion "uvn->u_obj.uo_refs == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/uvm/uvm_vnode.c", line 235 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 277422 64346 0 0 0 1 syz-executor.0 *380328 64346 0 0 0x4000000 0K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff825a55e6) at panic+0x177 sys/kern/subr_prf.c:198 __assert(ffffffff8261b443,ffffffff8263e6a2,eb,ffffffff82637043) at __assert+0x25 sys/kern/subr_prf.c:157 uvn_attach(fffffd806a6b11c8,6) at uvn_attach+0x454 sys/uvm/uvm_vnode.c:235 uvm_mmapfile(fffffd806f090008,ffff8000213189f8,10000,2,6,11,445f8279a03234d4,fffffd806f090008,0,11) at uvm_mmapfile+0x194 sys/uvm/uvm_mmap.c:1029 sys_mmap(ffff8000ffff4fc0,ffff800021318aa0,ffff800021318b70) at sys_mmap+0xb4a sys/uvm/uvm_mmap.c:395 sys_pad_mmap(ffff8000ffff4fc0,ffff800021318b28,ffff800021318b70) at sys_pad_mmap+0x68 sys/uvm/uvm_mmap.c:470 syscall(ffff800021318bf0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800021318bf0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9190dffa090, count: 6 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "uvn->u_obj.uo_refs == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/uvm/uvm_vnode.c", line 235 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff825a55e6) at panic+0x177 sys/kern/subr_prf.c:198 __assert(ffffffff8261b443,ffffffff8263e6a2,eb,ffffffff82637043) at __assert+0x25 sys/kern/subr_prf.c:157 uvn_attach(fffffd806a6b11c8,6) at uvn_attach+0x454 sys/uvm/uvm_vnode.c:235 uvm_mmapfile(fffffd806f090008,ffff8000213189f8,10000,2,6,11,445f8279a03234d4,fffffd806f090008,0,11) at uvm_mmapfile+0x194 sys/uvm/uvm_mmap.c:1029 sys_mmap(ffff8000ffff4fc0,ffff800021318aa0,ffff800021318b70) at sys_mmap+0xb4a sys/uvm/uvm_mmap.c:395 sys_pad_mmap(ffff8000ffff4fc0,ffff800021318b28,ffff800021318b70) at sys_pad_mmap+0x68 sys/uvm/uvm_mmap.c:470 syscall(ffff800021318bf0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800021318bf0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9190dffa090, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800021318690 rbx 0xffffffff8296db8f cpu_info_full_primary+0x2b8f rdx 0x3fd rcx 0 rax 0x8c r8 0x101010101010101 r9 0x8080808080808080 r10 0x1ca017bc31a6ac42 r11 0x39324836b7e5cadb r12 0xffffffff8296d990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff8228a448 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021318680 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=380328 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4d20,0xffff8000ffff5cf0 process=0xffff8000ffff8008 user=0xffff800021313000, vmspace=0xfffffd806f090008 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 64346 277422 69735 0 7 0 syz-executor.0 *64346 380328 69735 0 7 0x4000000 syz-executor.0 64346 145777 69735 0 2 0x4000000 syz-executor.0 69735 194909 72704 0 2 0x482 syz-executor.0 72704 220828 36184 0 3 0x82 thrsleep syz-execprog 72704 151884 36184 0 2 0x4000482 syz-execprog 72704 508581 36184 0 3 0x4000082 thrsleep syz-execprog 72704 43472 36184 0 3 0x4000082 wait syz-execprog 72704 61391 36184 0 3 0x4000082 kqread syz-execprog 72704 465187 36184 0 3 0x4000082 thrsleep syz-execprog 72704 366317 36184 0 3 0x4000082 thrsleep syz-execprog 72704 1164 36184 0 3 0x4000082 thrsleep syz-execprog 72704 394231 36184 0 3 0x4000082 thrsleep syz-execprog 36184 261147 82921 0 3 0x10008a sigsusp ksh 82921 56518 23031 0 3 0x9a kqread sshd 94567 156858 1 0 3 0x100083 ttyin getty 23031 54032 1 0 3 0x88 kqread sshd 63430 26484 77118 73 3 0x1100090 kqread syslogd 77118 373677 1 0 3 0x100082 netio syslogd 59131 508110 1 0 3 0x100080 kqread resolvd 77273 133465 79829 77 3 0x100092 kqread dhcpleased 27407 143588 79829 77 3 0x100092 kqread dhcpleased 79829 65990 1 0 3 0x80 kqread dhcpleased 39854 76154 0 0 3 0x14200 bored smr 8378 377605 0 0 3 0x14200 pgzero zerothread 82246 269044 0 0 3 0x14200 aiodoned aiodoned 37955 137228 0 0 3 0x14200 syncer update 93501 436937 0 0 3 0x14200 cleaner cleaner 5751 466781 0 0 3 0x14200 reaper reaper 78903 204130 0 0 3 0x14200 pgdaemon pagedaemon 85964 166911 0 0 3 0x14200 bored viomb 1023 263336 0 0 3 0x40014200 acpi0 acpi0 98723 196445 0 0 3 0x40014200 idle1 30470 329270 0 0 3 0x14200 bored softnet 43839 112708 0 0 3 0x14200 bored softnet 21365 305061 0 0 3 0x14200 bored softnet 13510 400119 0 0 3 0x14200 bored softnet 96389 289102 0 0 3 0x14200 bored systqmp 72206 341334 0 0 3 0x14200 bored systq 84552 398927 0 0 3 0x40014200 bored softclock 28369 65273 0 0 3 0x40014200 idle0 1 326184 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 64346 (syz-executor.0) thread 0xffff8000ffff4d20 (277422) exclusive rwlock uobjlk r = 0 (0xfffffd806a22cd38) #0 witness_lock+0x44d #1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310 #2 uvm_fault_lower+0x951 sys/uvm/uvm_fault.c:1324 #3 uvm_fault+0x238 #4 upageflttrap+0x82 sys/arch/amd64/amd64/trap.c:181 #5 usertrap+0x1aa sys/arch/amd64/amd64/trap.c:403 #6 recall_trap+0x8 Process 64346 (syz-executor.0) thread 0xffff8000ffff4fc0 (380328) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff82ba5240) #0 witness_lock+0x44d #1 syscall+0x41d mi_syscall sys/sys/syscall_mi.h:100 [inline] #1 syscall+0x41d sys/arch/amd64/amd64/trap.c:585 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10158 6391K 6420K 78643K 11248 0 pcb 13 8K 8K 78643K 13 0 rtable 80 2K 2K 78643K 133 0 ifaddr 33 8K 8K 78643K 33 0 counters 42 33K 33K 78643K 42 0 ioctlops 0 0K 2K 78643K 26 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1166 73K 73K 78643K 1179 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 4 9K 13K 78643K 263 0 proc 55 78K 91K 78643K 254 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 22 1K 1K 78643K 22 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 25 122K 122K 78643K 25 0 exec 0 0K 2K 78643K 440 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 8 62K 64K 78643K 10 0 UVM amap 122 27K 27K 78643K 3453 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 4 0K 0K 78643K 6 0 temp 23 4717K 4781K 78643K 3293 0 kqueue 12 18K 18K 78643K 25 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 19 0 16 1 0 1 1 0 8 0 rtentry 112 34 0 1 1 0 1 1 0 8 0 unpcb 144 33 0 20 1 0 1 1 0 8 0 syncache 296 5 0 5 2 2 0 1 0 8 0 tcpcb 768 8 0 5 1 0 1 1 0 8 0 arp 120 4 0 0 1 0 1 1 0 8 0 inpcb 368 29 0 23 1 0 1 1 0 8 0 nd6 48 3 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 144 0 0 9 0 9 9 0 8 0 art_table 32 145 0 0 2 0 2 2 0 8 0 art_node 16 33 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1927 0 531 88 0 88 88 0 8 0 ffsino 272 1927 0 531 94 0 94 94 0 8 0 nchpl 144 2645 0 1025 61 0 61 61 0 8 0 uvmvnodes 80 1936 0 0 40 0 40 40 0 8 0 vnodes 216 1936 0 0 108 0 108 108 0 8 0 namei 1024 6546 0 6546 3 1 2 2 0 8 2 percpumem 16 33 0 0 1 0 1 1 0 8 0 kstatmem 264 8 0 0 1 0 1 1 0 8 0 scxspl 216 8218 0 8218 20 19 1 8 0 8 1 plimitpl 152 17 0 9 1 0 1 1 0 8 0 sigapl 424 564 0 532 5 0 5 5 0 8 1 futexpl 64 1190 0 1190 1 0 1 1 0 8 1 knotepl 120 56 0 0 2 0 2 2 0 8 0 kqueuepl 216 21 0 13 1 0 1 1 0 8 0 pipepl 320 99 0 92 2 1 1 1 0 8 0 fdescpl 496 547 0 532 4 1 3 3 0 8 1 filepl 152 2007 0 1941 4 1 3 4 0 8 0 lockfpl 104 491 0 488 1 0 1 1 0 8 0 lockfspl 48 247 0 244 1 0 1 1 0 8 0 sessionpl 144 18 0 9 1 0 1 1 0 8 0 pgrppl 48 18 0 9 1 0 1 1 0 8 0 ucredpl 104 64 0 54 1 0 1 1 0 8 0 zombiepl 144 532 0 532 2 1 1 1 0 8 1 processpl 1064 564 0 532 3 0 3 3 0 8 0 procpl 672 1070 0 1028 4 0 4 4 0 8 0 sockpl 488 81 0 59 3 0 3 3 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 65 0 0 9 0 9 9 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 134 0 0 8 0 8 8 0 8 0 bufpl 288 4379 0 133 304 0 304 304 0 8 0 anonpl 24 94193 0 89977 49 4 45 45 0 186 19 amapchunkpl 152 51525 0 51054 20 1 19 19 0 158 0 amappl16 200 652 0 581 6 1 5 5 0 8 0 amappl15 192 79 0 71 1 0 1 1 0 8 0 amappl14 184 7 0 6 1 0 1 1 0 8 0 amappl13 176 39 0 37 2 1 1 1 0 8 0 amappl12 168 246 0 244 2 1 1 1 0 8 0 amappl11 160 42 0 29 1 0 1 1 0 8 0 amappl10 152 13 0 13 1 0 1 1 0 8 1 amappl9 144 907 0 905 2 1 1 1 0 8 0 amappl8 136 430 0 408 2 0 2 2 0 8 0 amappl7 128 85 0 74 1 0 1 1 0 8 0 amappl6 120 170 0 152 2 0 2 2 0 8 1 amappl5 112 328 0 320 1 0 1 1 0 8 0 amappl4 104 627 0 606 2 0 2 2 0 8 1 amappl3 96 1525 0 1492 2 0 2 2 0 8 1 amappl2 88 650 0 601 4 1 3 3 0 8 1 amappl1 80 16231 0 15696 23 2 21 21 0 8 8 amappl 88 3117 0 3038 4 1 3 3 0 92 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 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 547 0 532 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 547 0 532 1 0 1 1 0 8 0 vmmpekpl 168 9862 0 9844 2 0 2 2 0 8 1 vmmpepl 168 61237 0 59936 100 3 97 97 0 357 40 vmsppl 368 546 0 532 3 0 3 3 0 8 1 rwobjpl 56 17912 0 15135 42 0 42 42 0 8 2 pdppl 4096 1101 0 1064 71 28 43 53 0 8 6 pvpl 32 280224 0 271969 276 6 270 270 0 265 202 pmappl 248 546 0 532 3 1 2 2 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 599 0 31 17 0 17 17 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff825a55e6) at panic+0x177 sys/kern/subr_prf.c:198 __assert(ffffffff8261b443,ffffffff8263e6a2,eb,ffffffff82637043) at __assert+0x25 sys/kern/subr_prf.c:157 uvn_attach(fffffd806a6b11c8,6) at uvn_attach+0x454 sys/uvm/uvm_vnode.c:235 uvm_mmapfile(fffffd806f090008,ffff8000213189f8,10000,2,6,11,445f8279a03234d4,fffffd806f090008,0,11) at uvm_mmapfile+0x194 sys/uvm/uvm_mmap.c:1029 sys_mmap(ffff8000ffff4fc0,ffff800021318aa0,ffff800021318b70) at sys_mmap+0xb4a sys/uvm/uvm_mmap.c:395 sys_pad_mmap(ffff8000ffff4fc0,ffff800021318b28,ffff800021318b70) at sys_pad_mmap+0x68 sys/uvm/uvm_mmap.c:470 syscall(ffff800021318bf0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800021318bf0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9190dffa090, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff82ba5038) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82ba5038) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff80002130a350) at syscall+0x41d mi_syscall sys/sys/syscall_mi.h:100 [inline] syscall(ffff80002130a350) at syscall+0x41d sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbc140, count: 9 ddb{1}> trace x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff82ba5038) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82ba5038) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff80002130a350) at syscall+0x41d mi_syscall sys/sys/syscall_mi.h:100 [inline] syscall(ffff80002130a350) at syscall+0x41d sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbc140, count: -6