panic: kernel diagnostic assertion "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_unveil.c", line 879 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 246869 72163 32767 0x10 0 1 syz-executor.0 *302211 72163 32767 0x10 0x4000000 0K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 __assert(ffffffff81f7c61c,ffffffff81f2d7dd,36f,ffffffff81f8730a) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b75c38,ffff800020c250f8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c250f8) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b75c38,ffffff9c,20000000,0) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020c253b0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c253b0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,f6cc49860d8) at Xsyscall+0x128 end of kernel end trace frame: 0xf6f9cb022b0, 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 "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_unveil.c", line 879 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 __assert(ffffffff81f7c61c,ffffffff81f2d7dd,36f,ffffffff81f8730a) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b75c38,ffff800020c250f8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c250f8) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b75c38,ffffff9c,20000000,0) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020c253b0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c253b0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,f6cc49860d8) at Xsyscall+0x128 end of kernel end trace frame: 0xf6f9cb022b0, count: -8 ddb{0}> show registers rdi 0xffffffff81266357 db_enter+0x17 rsi 0x3e22 __ALIGN_SIZE+0x2e22 rbp 0xffff800020c24ea0 rbx 0xffff800020c24f50 rdx 0x3e23 __ALIGN_SIZE+0x2e23 rcx 0xffff80000254c000 rax 0xffff80000254c000 r8 0xffffffff813481d3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x3f0dbc08e88f4a02 r12 0x3000000008 r13 0xffff800020c24eb0 r14 0x100 r15 0x1 rip 0xffffffff81266358 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c24e90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=302211 stat=onproc flags process=10 proc=4000000 pri=59, usrpri=59, nice=20 forw=0xffffffffffffffff, list=0xffff800020b74bd0,0xffffffff8235ec20 process=0xffff800020b8c9f0 user=0xffff800020c20000, vmspace=0xfffffd807effe708 estcpu=9, cpticks=0, pctcpu=0.2 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 72163 246869 46893 32767 7 0x10 syz-executor.0 72163 162906 46893 32767 3 0x4000090 fsleep syz-executor.0 *72163 302211 46893 32767 7 0x4000010 syz-executor.0 29544 289173 85754 32767 2 0x10 syz-executor.1 85754 4308 44313 0 3 0x82 wait syz-executor.1 46893 179133 35688 32767 2 0x490 syz-executor.0 35688 37031 44313 0 3 0x82 wait syz-executor.0 44605 418409 0 0 3 0x14200 bored sosplice 44313 23217 23368 0 3 0x82 thrsleep syz-fuzzer 44313 62429 23368 0 2 0x4000482 syz-fuzzer 44313 23522 23368 0 3 0x4000082 thrsleep syz-fuzzer 44313 260317 23368 0 2 0x4000482 syz-fuzzer 44313 204072 23368 0 3 0x4000082 thrsleep syz-fuzzer 44313 374339 23368 0 3 0x4000082 thrsleep syz-fuzzer 44313 382366 23368 0 3 0x4000082 kqread syz-fuzzer 44313 157450 23368 0 3 0x4000082 thrsleep syz-fuzzer 44313 367024 23368 0 3 0x4000082 thrsleep syz-fuzzer 44313 69711 23368 0 3 0x4000082 thrsleep syz-fuzzer 23368 74502 38959 0 3 0x10008a pause ksh 38959 418327 18686 0 3 0x92 select sshd 49613 446866 1 0 3 0x100083 ttyin getty 18686 518657 1 0 3 0x80 select sshd 72478 297338 72866 73 3 0x100090 kqread syslogd 72866 136988 1 0 3 0x100082 netio syslogd 71938 318251 1 77 3 0x100090 poll dhclient 77051 1520 1 0 3 0x80 poll dhclient 52573 249457 0 0 3 0x14200 pgzero zerothread 65572 217784 0 0 3 0x14200 aiodoned aiodoned 84725 291104 0 0 2 0x14200 update 78436 476111 0 0 3 0x14200 cleaner cleaner 39143 41879 0 0 3 0x14200 reaper reaper 30920 500824 0 0 3 0x14200 pgdaemon pagedaemon 68522 490780 0 0 3 0x14200 bored crynlk 9709 374468 0 0 3 0x14200 bored crypto 3517 170526 0 0 3 0x40014200 acpi0 acpi0 13337 340837 0 0 3 0x40014200 idle1 23072 286230 0 0 3 0x14200 bored softnet 85321 135693 0 0 3 0x14200 bored systqmp 32488 140684 0 0 3 0x14200 bored systq 14714 404811 0 0 2 0x40014200 softclock 82126 499578 0 0 3 0x40014200 idle0 34626 114429 0 0 3 0x14200 bored smr 1 386393 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 72163 (syz-executor.0) thread 0xffff800020b75c38 (302211) exclusive rrwlock inode r = 0 (0xfffffd8068fa0b38) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xf5 sys/kern/vfs_lookup.c:387 #6 namei+0x4b2 sys/kern/vfs_lookup.c:224 #7 domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 #8 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82397440) locked @ /syzkaller/managers/setuid/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 Process 29544 (syz-executor.1) thread 0xffff800020b74720 (289173) exclusive rrwlock inode r = 0 (0xfffffd8068fa0098) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 ufs_ihashget+0x151 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x84 sys/ufs/ffs/ffs_vfsops.c:1323 #8 ufs_lookup+0x15d3 sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x67 sys/kern/vfs_vops.c:90 #10 vfs_lookup+0x556 sys/kern/vfs_lookup.c:523 #11 namei+0x4b2 sys/kern/vfs_lookup.c:224 #12 dounlinkat+0xa5 sys/kern/vfs_syscalls.c:1673 #13 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #13 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8068fa0f78) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xf5 sys/kern/vfs_lookup.c:387 #6 namei+0x4b2 sys/kern/vfs_lookup.c:224 #7 dounlinkat+0xa5 sys/kern/vfs_syscalls.c:1673 #8 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9460 6321K 6321K 78643K 10667 0 0 pcb 23 9K 11K 78643K 389 0 0 rtable 97 3K 3K 78643K 938 0 0 ifaddr 35 10K 10K 78643K 182 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 41 0 0 iov 0 0K 12K 78643K 59 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1820 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 20 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 153 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 33K 78643K 821 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 46 50K 70K 78643K 809 0 0 subproc 68 69634K 69634K 78643K 884 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 131 0 0 in_multi 33 2K 2K 78643K 328 0 0 ether_multi 1 0K 0K 78643K 8 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 327 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 80 20K 29K 78643K 3322 0 0 UVM aobj 42 2K 3K 78643K 52 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 44 0 0 NDP 7 0K 0K 78643K 81 0 0 temp 121 2378K 2444K 78643K 6225 0 0 kqueue 0 0K 0K 78643K 12 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 28 0 24 1 0 1 1 0 8 0 inpcbpl 280 466 0 459 1 0 1 1 0 8 0 plimitpl 152 99 0 90 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 257 0 217 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpcb 544 187 0 183 1 0 1 1 0 8 0 nd6 48 52 0 48 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1183 0 994 12 0 12 12 0 8 0 art_table 32 1184 0 994 2 0 2 2 0 8 0 art_node 16 256 0 222 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 4 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 151 0 141 1 0 1 1 0 8 0 shmpl 112 50 0 10 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2399 0 953 47 0 47 47 0 8 0 ffsino 272 2399 0 953 97 0 97 97 0 8 0 nchpl 144 3697 0 2065 61 0 61 61 0 8 0 uvmvnodes 72 2850 0 0 52 0 52 52 0 8 0 vnodes 200 2850 0 0 150 0 150 150 0 8 0 namei 1024 11987 0 11986 3 2 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 10038 0 10038 12 11 1 6 0 8 1 sigapl 432 919 0 904 3 1 2 3 0 8 0 futexpl 56 7922 0 7921 1 0 1 1 0 8 0 knotepl 112 719 0 700 1 0 1 1 0 8 0 kqueuepl 104 168 0 166 1 0 1 1 0 8 0 pipepl 112 760 0 741 5 4 1 2 0 8 0 fdescpl 488 920 0 904 3 0 3 3 0 8 0 filepl 152 6209 0 6113 6 1 5 6 0 8 1 lockfpl 104 183 0 183 2 1 1 1 0 8 1 lockfspl 32 270 0 270 2 1 1 1 0 8 1 sessionpl 112 41 0 31 1 0 1 1 0 8 0 pgrppl 48 59 0 49 1 0 1 1 0 8 0 ucredpl 96 1909 0 1900 1 0 1 1 0 8 0 zombiepl 144 904 0 904 3 2 1 1 0 8 1 processpl 840 936 0 904 4 0 4 4 0 8 0 procpl 600 2275 0 2232 4 0 4 4 0 8 0 srpgc 64 142 0 142 2 1 1 1 0 8 1 sosppl 128 17 0 17 5 4 1 1 0 8 1 sockpl 384 862 0 845 5 2 3 4 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 8 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 135 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 196 0 0 10 0 10 10 0 8 0 bufpl 256 7193 0 1122 380 0 380 380 0 8 0 anonpl 16 109947 0 104166 48 20 28 44 0 125 0 amapchunkpl 152 6271 0 6187 18 13 5 11 0 158 1 amappl16 192 4130 0 3776 44 26 18 30 0 8 0 amappl15 184 246 0 242 1 0 1 1 0 8 0 amappl14 176 135 0 133 3 2 1 1 0 8 0 amappl13 168 78 0 75 1 0 1 1 0 8 0 amappl12 160 141 0 136 2 1 1 1 0 8 0 amappl11 152 172 0 161 1 0 1 1 0 8 0 amappl10 144 252 0 245 3 2 1 1 0 8 0 amappl9 136 788 0 785 1 0 1 1 0 8 0 amappl8 128 375 0 359 1 0 1 1 0 8 0 amappl7 120 207 0 198 1 0 1 1 0 8 0 amappl6 112 206 0 200 1 0 1 1 0 8 0 amappl5 104 191 0 181 1 0 1 1 0 8 0 amappl4 96 1034 0 1009 2 1 1 2 0 8 0 amappl3 88 273 0 264 1 0 1 1 0 8 0 amappl2 80 6201 0 6144 2 0 2 2 0 8 0 amappl1 72 30700 0 30255 23 13 10 19 0 8 0 amappl 72 2690 0 2655 1 0 1 1 0 75 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 51 0 10 1 0 1 1 0 8 0 uaddrrnd 24 920 0 904 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 920 0 904 1 0 1 1 0 8 0 vmmpekpl 168 11068 0 11045 2 0 2 2 0 8 0 vmmpepl 168 112285 0 110889 104 34 70 76 0 357 9 vmsppl 360 919 0 904 2 0 2 2 0 8 0 pdppl 4096 1848 0 1808 6 0 6 6 0 8 0 pvpl 32 325303 0 316263 130 47 83 117 0 265 0 pmappl 224 919 0 904 5 4 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 534 0 4 16 0 16 16 0 8 0