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 * 46321 17158 32767 0x10 0x4000000 0 syz-executor.1 146339 79354 0 0x2 0x4000000 1 syz-fuzzer 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(ffffffff81f7bdfb,ffffffff81f325a7,36f,ffffffff81f8b7f3) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b74018,ffff800020be8db8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020be8db8) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b74018,ffffff9c,20000000,2) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020be9070) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020be9070) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,c6db07b0010) at Xsyscall+0x128 end of kernel end trace frame: 0xc705c862750, 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(ffffffff81f7bdfb,ffffffff81f325a7,36f,ffffffff81f8b7f3) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b74018,ffff800020be8db8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020be8db8) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b74018,ffffff9c,20000000,2) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020be9070) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020be9070) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,c6db07b0010) at Xsyscall+0x128 end of kernel end trace frame: 0xc705c862750, count: -8 ddb{0}> show registers rdi 0xffffffff8188e157 db_enter+0x17 rsi 0x386e __ALIGN_SIZE+0x286e rbp 0xffff800020be8b60 rbx 0xffff800020be8c10 rdx 0x386f __ALIGN_SIZE+0x286f rcx 0xffff800004353000 rax 0xffff800004353000 r8 0xffffffff81e2f083 kprintf+0x183 r9 0x1 r10 0x25 r11 0x514712432ecd757 r12 0x3000000008 r13 0xffff800020be8b70 r14 0x100 r15 0x1 rip 0xffffffff8188e158 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020be8b50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=46321 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b74720,0xffffffff82352f38 process=0xffff800020b3a6a0 user=0xffff800020be4000, vmspace=0xfffffd807effdb40 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 17158 335534 15520 32767 2 0x10 syz-executor.1 *17158 46321 15520 32767 7 0x4000010 syz-executor.1 15520 478207 85976 32767 2 0x490 syz-executor.1 85976 11672 79354 0 3 0x82 wait syz-executor.1 49550 202741 0 0 3 0x14200 bored sosplice 79354 225375 80061 0 3 0x82 kqread syz-fuzzer 79354 146339 80061 0 7 0x4000002 syz-fuzzer 79354 384818 80061 0 3 0x4000082 thrsleep syz-fuzzer 79354 280506 80061 0 3 0x4000082 thrsleep syz-fuzzer 79354 28291 80061 0 3 0x4000082 thrsleep syz-fuzzer 79354 388245 80061 0 3 0x4000082 thrsleep syz-fuzzer 79354 13907 80061 0 3 0x4000082 thrsleep syz-fuzzer 79354 16514 80061 0 3 0x4000082 thrsleep syz-fuzzer 79354 479543 80061 0 3 0x4000082 thrsleep syz-fuzzer 79354 523773 80061 0 3 0x4000082 thrsleep syz-fuzzer 80061 390301 50859 0 3 0x10008a pause ksh 50859 313233 17016 0 3 0x92 select sshd 75455 309089 1 0 3 0x100083 ttyin getty 17016 248094 1 0 3 0x80 select sshd 63155 151870 25490 73 3 0x100090 kqread syslogd 25490 455267 1 0 3 0x100082 netio syslogd 18549 351794 1 77 3 0x100090 poll dhclient 97159 187470 1 0 3 0x80 poll dhclient 24705 58382 0 0 3 0x14200 pgzero zerothread 24283 108235 0 0 3 0x14200 aiodoned aiodoned 10997 379351 0 0 3 0x14200 syncer update 96332 436718 0 0 3 0x14200 cleaner cleaner 11761 351070 0 0 3 0x14200 reaper reaper 60567 203178 0 0 3 0x14200 pgdaemon pagedaemon 89585 43001 0 0 3 0x14200 bored crynlk 27670 199994 0 0 3 0x14200 bored crypto 14162 440342 0 0 3 0x40014200 acpi0 acpi0 59369 498184 0 0 3 0x40014200 idle1 21623 6990 0 0 3 0x14200 bored softnet 92081 117445 0 0 3 0x14200 bored systqmp 40146 439781 0 0 3 0x14200 bored systq 3655 203485 0 0 3 0x40014200 bored softclock 51562 460421 0 0 3 0x40014200 idle0 99323 13310 0 0 3 0x14200 bored smr 1 14183 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 17158 (syz-executor.1) thread 0xffff800020b74018 (46321) exclusive rrwlock inode r = 0 (0xfffffd8069258920) 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 cache_lookup+0x300 sys/kern/vfs_cache.c:224 #7 ufs_lookup+0x1d7 sys/ufs/ufs/ufs_lookup.c:162 #8 VOP_LOOKUP+0x67 sys/kern/vfs_vops.c:90 #9 vfs_lookup+0x556 sys/kern/vfs_lookup.c:523 #10 namei+0x4b2 sys/kern/vfs_lookup.c:224 #11 domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 #12 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #12 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #13 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82342968) 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 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9455 6318K 6321K 78643K 10842 0 0 pcb 23 9K 11K 78643K 1278 0 0 rtable 79 2K 3K 78643K 2091 0 0 ifaddr 30 11K 11K 78643K 407 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 87 0 0 iov 0 0K 24K 78643K 248 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 2765 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 43 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 371 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 33K 78643K 2349 0 0 sigio 0 0K 0K 78643K 30 0 0 proc 44 50K 70K 78643K 1735 0 0 subproc 34 34817K 69634K 78643K 2074 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 355 0 0 in_multi 22 1K 2K 78643K 778 0 0 ether_multi 1 0K 0K 78643K 22 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 591 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 86 13K 30K 78643K 8297 0 0 UVM aobj 130 6K 6K 78643K 149 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 181 0 0 NDP 6 0K 0K 78643K 186 0 0 temp 97 2377K 2450K 78643K 11955 0 0 kqueue 0 0K 0K 78643K 30 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 63 0 60 1 0 1 1 0 8 0 inpcbpl 280 1228 0 1221 1 0 1 1 0 8 0 plimitpl 152 236 0 229 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 572 0 541 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 443 0 439 1 0 1 1 0 8 0 nd6 48 122 0 120 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2731 0 2584 12 0 12 12 0 8 2 art_table 32 2732 0 2584 2 0 2 2 0 8 0 art_node 16 571 0 543 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 2 1 0 1 1 0 8 0 semapl 112 369 0 359 1 0 1 1 0 8 0 shmpl 112 147 0 19 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4370 0 2852 50 0 50 50 0 8 0 ffsino 272 4370 0 2852 102 0 102 102 0 8 0 nchpl 144 7676 0 6019 63 1 62 62 0 8 0 uvmvnodes 72 5416 0 0 99 0 99 99 0 8 0 vnodes 200 5416 0 0 286 0 286 286 0 8 0 namei 1024 27870 0 27869 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 23166 0 23166 18 17 1 6 0 8 1 sigapl 432 2342 0 2329 3 1 2 3 0 8 0 futexpl 56 23770 0 23770 1 0 1 1 0 8 1 knotepl 112 1846 0 1833 2 1 1 2 0 8 0 kqueuepl 104 641 0 639 1 0 1 1 0 8 0 pipepl 112 2024 0 2011 11 9 2 2 0 8 1 fdescpl 488 2343 0 2329 3 0 3 3 0 8 1 filepl 152 16349 0 16277 10 3 7 7 0 8 4 lockfpl 104 603 0 603 6 5 1 1 0 8 1 lockfspl 32 1060 0 1060 6 5 1 1 0 8 1 sessionpl 112 76 0 67 1 0 1 1 0 8 0 pgrppl 48 116 0 107 1 0 1 1 0 8 0 ucredpl 96 4978 0 4970 1 0 1 1 0 8 0 zombiepl 144 2329 0 2329 2 1 1 1 0 8 1 processpl 840 2359 0 2329 4 0 4 4 0 8 0 procpl 600 6510 0 6470 5 1 4 5 0 8 0 srpgc 64 334 0 334 11 10 1 1 0 8 1 sosppl 128 46 0 46 12 12 0 1 0 8 0 sockpl 384 2548 0 2531 7 3 4 4 0 8 2 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 9 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 132 0 0 16 2 14 16 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 268 0 0 11 0 11 11 0 8 0 bufpl 256 10440 0 3421 439 0 439 439 0 8 0 anonpl 16 290071 0 284599 110 71 39 45 0 125 6 amapchunkpl 152 16549 0 16471 39 32 7 11 0 158 3 amappl16 192 12306 0 11966 118 90 28 30 0 8 8 amappl15 184 359 0 355 1 0 1 1 0 8 0 amappl14 176 379 0 374 2 1 1 1 0 8 0 amappl13 168 210 0 207 1 0 1 1 0 8 0 amappl12 160 303 0 302 1 0 1 1 0 8 0 amappl11 152 331 0 320 1 0 1 1 0 8 0 amappl10 144 596 0 594 2 1 1 1 0 8 0 amappl9 136 1344 0 1342 1 0 1 1 0 8 0 amappl8 128 974 0 945 2 0 2 2 0 8 0 amappl7 120 318 0 309 1 0 1 1 0 8 0 amappl6 112 215 0 204 1 0 1 1 0 8 0 amappl5 104 421 0 411 1 0 1 1 0 8 0 amappl4 96 2348 0 2318 2 1 1 2 0 8 0 amappl3 88 458 0 452 1 0 1 1 0 8 0 amappl2 80 17792 0 17739 2 0 2 2 0 8 0 amappl1 72 66555 0 66136 23 13 10 19 0 8 0 amappl 72 7217 0 7187 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 148 0 19 3 0 3 3 0 8 0 uaddrrnd 24 2343 0 2329 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2343 0 2329 1 0 1 1 0 8 0 vmmpekpl 168 22669 0 22647 2 0 2 2 0 8 0 vmmpepl 168 276055 0 274757 150 64 86 86 0 357 20 vmsppl 360 2342 0 2329 2 0 2 2 0 8 0 pdppl 4096 4694 0 4658 6 0 6 6 0 8 1 pvpl 32 768949 0 760342 226 117 109 120 0 265 22 pmappl 224 2342 0 2329 5 4 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 603 0 5 18 0 18 18 0 8 0