panic: kernel diagnostic assertion "ps->ps_uvncount == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_unveil.c", line 196 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 248698 51020 0 0x14000 0x200 1 reaper db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 __assert(ffffffff81fa52c8,ffffffff81f5c820,c4,ffffffff81f67061) at __assert+0x2e sys/kern/subr_prf.c:159 unveil_destroy(ffff800020b3b510) at unveil_destroy+0x19f sys/kern/kern_unveil.c:196 exit1(ffff800020b38508,0,1) at exit1+0x38f sys/kern/kern_exit.c:218 sys_exit(ffff800020b38508,ffff800024e1fd60,ffff800024e1fdd0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800024e1fe40) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800024e1fe40) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(0,1,0,1,0,7f7fffff1f74) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1f40, count: 7 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 kernel diagnostic assertion "ps->ps_uvncount == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_unveil.c", line 196 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 __assert(ffffffff81fa52c8,ffffffff81f5c820,c4,ffffffff81f67061) at __assert+0x2e sys/kern/subr_prf.c:159 unveil_destroy(ffff800020b3b510) at unveil_destroy+0x19f sys/kern/kern_unveil.c:196 exit1(ffff800020b38508,0,1) at exit1+0x38f sys/kern/kern_exit.c:218 sys_exit(ffff800020b38508,ffff800024e1fd60,ffff800024e1fdd0) at sys_exit+0x17 sys/kern/kern_exit.c:94 syscall(ffff800024e1fe40) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800024e1fe40) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(0,1,0,1,0,7f7fffff1f74) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1f40, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800024e1fb70 rbx 0xffff800024e1fc20 rdx 0xffff800020b38508 rcx 0 rax 0 r8 0xffffffff81cb67b3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x3a2c356cc01f7050 r12 0x3000000008 r13 0xffff800024e1fb80 r14 0x100 r15 0x1 rip 0xffffffff81a019d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800024e1fb60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=305878 stat=onproc flags process=1018 proc=2000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b38290,0xffffffff8238a1a0 process=0xffff800020b3b510 user=0xffff800024e1a000, vmspace=0xfffffd807effd5c0 estcpu=36, cpticks=26, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 33423 131496 11122 32767 2 0x490 syz-executor.1 11122 37388 66234 0 3 0x82 wait syz-executor.1 46910 493645 0 0 3 0x14200 bored sosplice 66234 173857 2777 0 3 0x82 thrsleep syz-fuzzer 66234 89689 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 273981 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 322282 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 55987 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 405932 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 451665 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 266153 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 365708 2777 0 3 0x4000082 thrsleep syz-fuzzer 66234 140232 2777 0 3 0x4000082 kqread syz-fuzzer 2777 435151 28390 0 3 0x10008a pause ksh 28390 156058 24739 0 3 0x92 select sshd 20706 157026 1 0 3 0x100083 ttyin getty 24739 449739 1 0 3 0x80 select sshd 21730 454578 64989 73 3 0x100090 kqread syslogd 64989 11626 1 0 3 0x100082 netio syslogd 98753 363151 1 77 3 0x100090 poll dhclient 14715 342421 1 0 3 0x80 poll dhclient 91779 216697 0 0 3 0x14200 pgzero zerothread 84701 446794 0 0 3 0x14200 aiodoned aiodoned 83301 350846 0 0 3 0x14200 syncer update 89091 350636 0 0 3 0x14200 cleaner cleaner 51020 248698 0 0 7 0x14200 reaper 14425 89433 0 0 3 0x14200 pgdaemon pagedaemon 93782 296516 0 0 3 0x14200 bored crynlk 9298 246286 0 0 3 0x14200 bored crypto 93482 99851 0 0 3 0x40014200 acpi0 acpi0 5136 36699 0 0 3 0x40014200 idle1 10366 391793 0 0 3 0x14200 bored softnet 98397 238200 0 0 3 0x14200 bored systqmp 49828 401648 0 0 3 0x14200 bored systq 36797 252453 0 0 3 0x40014200 bored softclock 91917 315342 0 0 3 0x40014200 idle0 87893 24884 0 0 3 0x14200 bored smr 1 214166 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9459 6319K 6322K 78643K 11001 0 0 pcb 23 9K 11K 78643K 2130 0 0 rtable 83 2K 3K 78643K 4200 0 0 ifaddr 29 10K 11K 78643K 587 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 208 0 0 iov 0 0K 48K 78643K 385 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 76K 78643K 3405 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 66 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 378 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 4 9K 33K 78643K 4572 0 0 sigio 0 0K 0K 78643K 53 0 0 proc 44 50K 70K 78643K 4384 0 0 subproc 17 1K 2K 78643K 1564 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 467 0 0 in_multi 22 1K 2K 78643K 1141 0 0 ether_multi 1 0K 0K 78643K 23 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 1671 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 98 13K 30K 78643K 16133 0 0 UVM aobj 130 4K 4K 78643K 145 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 243 0 0 NDP 6 0K 0K 78643K 279 0 0 temp 97 2741K 2810K 78643K 22838 0 0 kqueue 0 0K 0K 78643K 37 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 186 0 182 1 0 1 1 0 8 0 inpcbpl 280 2284 0 2277 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 1035 0 1002 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 62 0 62 1 1 0 1 0 8 0 tcpcb 544 880 0 876 1 0 1 1 0 8 0 nd6 48 276 0 273 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 4237 0 4090 16 4 12 13 0 8 0 art_table 32 4238 0 4090 2 0 2 2 0 8 0 art_node 16 1034 0 1004 1 0 1 1 0 8 0 sysvmsgpl 40 33 0 8 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 376 0 366 1 0 1 1 0 8 0 shmpl 112 143 0 15 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5950 0 4463 49 0 49 49 0 8 0 ffsino 272 5950 0 4463 100 0 100 100 0 8 0 nchpl 144 11232 0 9611 61 0 61 61 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 45118 0 45118 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 31725 0 31725 24 23 1 6 0 8 1 plimitpl 152 666 0 659 1 0 1 1 0 8 0 sigapl 432 4473 0 4460 7 5 2 3 0 8 0 futexpl 56 36392 0 36392 2 1 1 1 0 8 1 knotepl 112 2687 0 2674 1 0 1 1 0 8 0 kqueuepl 104 901 0 899 1 0 1 1 0 8 0 pipepl 112 3018 0 3005 11 10 1 2 0 8 0 fdescpl 488 4474 0 4461 5 2 3 3 0 8 1 filepl 152 26192 0 26120 15 10 5 7 0 8 1 lockfpl 104 774 0 774 8 7 1 1 0 8 1 lockfspl 48 255 0 255 8 7 1 1 0 8 1 sessionpl 112 107 0 98 1 0 1 1 0 8 0 pgrppl 48 163 0 154 1 0 1 1 0 8 0 ucredpl 96 7120 0 7112 1 0 1 1 0 8 0 zombiepl 144 4461 0 4460 4 3 1 1 0 8 0 processpl 896 4490 0 4460 4 0 4 4 0 8 0 procpl 632 11594 0 11554 17 12 5 5 0 8 1 srpgc 64 182 0 182 12 11 1 1 0 8 1 sosppl 128 66 0 66 16 15 1 1 0 8 1 sockpl 384 4475 0 4458 10 7 3 4 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 13 0 0 1 0 1 1 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 0 8 0 mcl4k 4096 13 0 0 2 0 2 2 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 150 0 0 17 3 14 17 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 421 0 0 13 1 12 12 0 8 0 bufpl 256 13886 0 6861 440 0 440 440 0 8 0 anonpl 16 486211 0 480511 139 103 36 48 0 125 0 amapchunkpl 152 39034 0 38938 90 72 18 18 0 158 13 amappl16 192 18487 0 18115 140 120 20 31 0 8 0 amappl15 184 739 0 736 12 11 1 1 0 8 0 amappl14 176 1280 0 1273 1 0 1 1 0 8 0 amappl13 168 812 0 812 9 8 1 1 0 8 1 amappl12 160 472 0 470 1 0 1 1 0 8 0 amappl11 152 744 0 733 1 0 1 1 0 8 0 amappl10 144 634 0 632 2 1 1 1 0 8 0 amappl9 136 2122 0 2120 1 0 1 1 0 8 0 amappl8 128 1468 0 1439 2 0 2 2 0 8 0 amappl7 120 786 0 774 1 0 1 1 0 8 0 amappl6 112 542 0 532 1 0 1 1 0 8 0 amappl5 104 1133 0 1122 1 0 1 1 0 8 0 amappl4 96 5002 0 4971 2 1 1 2 0 8 0 amappl3 88 1047 0 1037 1 0 1 1 0 8 0 amappl2 80 28480 0 28413 4 2 2 3 0 8 0 amappl1 72 129311 0 128887 23 13 10 19 0 8 0 amappl 80 13302 0 13265 1 0 1 1 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 144 0 15 3 0 3 3 0 8 0 uaddrrnd 24 4474 0 4460 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4474 0 4460 1 0 1 1 0 8 0 vmmpekpl 168 40927 0 40887 2 0 2 2 0 8 0 vmmpepl 168 573965 0 572508 185 103 82 88 0 357 6 vmsppl 368 4473 0 4460 2 0 2 2 0 8 0 pdppl 4096 8956 0 8920 6 0 6 6 0 8 0 pvpl 32 1344949 0 1335649 311 217 94 128 0 265 2 pmappl 232 4473 0 4460 12 10 2 2 0 8 1 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 610 0 12 19 1 18 18 0 8 0