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 59582 60130 32767 0x10 0 0 syz-executor.1 *438470 60130 32767 0x10 0x4000000 1K syz-executor.1 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(ffffffff81f7f998,ffffffff81f30b1c,36f,ffffffff81f8a837) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b28bd0,ffff800020bed008) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bed008) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b28bd0,ffffff9c,20000000,0) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020bed2c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bed2c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,2a7a812a010) at Xsyscall+0x128 end of kernel end trace frame: 0x2aa8ab9a570, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic kernel diagnostic assertion "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_unveil.c", line 879 ddb{1}> 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(ffffffff81f7f998,ffffffff81f30b1c,36f,ffffffff81f8a837) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b28bd0,ffff800020bed008) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bed008) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b28bd0,ffffff9c,20000000,0) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020bed2c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bed2c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,2a7a812a010) at Xsyscall+0x128 end of kernel end trace frame: 0x2aa8ab9a570, count: -8 ddb{1}> show registers rdi 0xffffffff815e48a7 db_enter+0x17 rsi 0x380a __ALIGN_SIZE+0x280a rbp 0xffff800020becdb0 rbx 0xffff800020bece60 rdx 0x380b __ALIGN_SIZE+0x280b rcx 0xffff800004153000 rax 0xffff800004153000 r8 0xffffffff81d729c3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x74556ee2cb3b9a8 r12 0x3000000008 r13 0xffff800020becdc0 r14 0x100 r15 0x1 rip 0xffffffff815e48a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020becda0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=438470 stat=onproc flags process=10 proc=4000000 pri=75, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff800020b29788,0xffff800020b29090 process=0xffff800020b7da58 user=0xffff800020be8000, vmspace=0xfffffd807effeca8 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 60130 59582 14634 32767 7 0x10 syz-executor.1 *60130 438470 14634 32767 7 0x4000010 syz-executor.1 60130 427502 14634 32767 3 0x4000090 fsleep syz-executor.1 46538 160596 44051 32767 3 0x10 biowait syz-executor.0 44051 83012 98715 0 3 0x82 wait syz-executor.0 14634 190420 86713 32767 3 0x90 nanosleep syz-executor.1 86713 385594 98715 0 3 0x82 wait syz-executor.1 99507 418661 0 0 3 0x14200 bored sosplice 98715 413641 42786 0 3 0x82 thrsleep syz-fuzzer 98715 381414 42786 0 3 0x4000082 nanosleep syz-fuzzer 98715 70794 42786 0 3 0x4000082 thrsleep syz-fuzzer 98715 241127 42786 0 3 0x4000082 thrsleep syz-fuzzer 98715 492960 42786 0 3 0x4000082 thrsleep syz-fuzzer 98715 302023 42786 0 3 0x4000082 thrsleep syz-fuzzer 98715 164130 42786 0 3 0x4000082 thrsleep syz-fuzzer 98715 88805 42786 0 3 0x4000082 thrsleep syz-fuzzer 98715 307267 42786 0 3 0x4000082 kqread syz-fuzzer 98715 403380 42786 0 3 0x4000082 nanosleep syz-fuzzer 42786 1415 92212 0 3 0x10008a pause ksh 92212 348329 49951 0 3 0x92 select sshd 81755 182348 1 0 3 0x100083 ttyin getty 49951 249990 1 0 3 0x80 select sshd 55071 497756 76785 73 3 0x100090 kqread syslogd 76785 44512 1 0 3 0x100082 netio syslogd 17909 310844 1 77 3 0x100090 poll dhclient 62842 167582 1 0 3 0x80 poll dhclient 34766 62499 0 0 3 0x14200 pgzero zerothread 30154 101426 0 0 3 0x14200 aiodoned aiodoned 43351 51194 0 0 3 0x14200 syncer update 95442 273758 0 0 3 0x14200 cleaner cleaner 68704 19716 0 0 3 0x14200 reaper reaper 25695 274337 0 0 3 0x14200 pgdaemon pagedaemon 49742 119594 0 0 3 0x14200 bored crynlk 60631 224017 0 0 3 0x14200 bored crypto 3633 365218 0 0 3 0x40014200 acpi0 acpi0 61526 313808 0 0 3 0x40014200 idle1 86861 420681 0 0 3 0x14200 bored softnet 96847 32779 0 0 3 0x14200 bored systqmp 2507 100759 0 0 3 0x14200 bored systq 90748 298958 0 0 3 0x40014200 bored softclock 85848 7796 0 0 3 0x40014200 idle0 97452 187031 0 0 3 0x14200 bored smr 1 318508 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 60130 (syz-executor.1) thread 0xffff800020b28bd0 (438470) exclusive rrwlock inode r = 0 (0xfffffd806cdd01a8) 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 (0xffffffff8236d8b0) 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 46538 (syz-executor.0) thread 0xffff800020b292d8 (160596) exclusive rrwlock inode r = 0 (0xfffffd806cdd0808) 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 (0xfffffd806cdd05e8) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9460 6321K 6321K 78643K 10652 0 0 pcb 23 9K 10K 78643K 386 0 0 rtable 97 3K 3K 78643K 857 0 0 ifaddr 34 10K 10K 78643K 162 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 42 0 0 iov 0 0K 28K 78643K 78 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1761 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 19 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 144 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 29K 78643K 840 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 46 50K 58K 78643K 783 0 0 subproc 68 69634K 69634K 78643K 782 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 109 0 0 in_multi 33 2K 2K 78643K 298 0 0 ether_multi 1 0K 0K 78643K 9 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 311 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 87 21K 30K 78643K 3466 0 0 UVM aobj 64 3K 3K 78643K 75 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 52 0 0 NDP 7 0K 0K 78643K 72 0 0 temp 121 2378K 2443K 78643K 6103 0 0 kqueue 0 0K 0K 78643K 7 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 25 0 21 1 0 1 1 0 8 0 inpcbpl 280 506 0 499 1 0 1 1 0 8 0 plimitpl 152 96 0 87 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 230 0 190 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 180 0 176 1 0 1 1 0 8 0 nd6 48 46 0 42 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1049 0 860 12 0 12 12 0 8 0 art_table 32 1050 0 860 2 0 2 2 0 8 0 art_node 16 229 0 195 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 142 0 132 1 0 1 1 0 8 0 shmpl 112 73 0 11 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2453 0 1012 47 0 47 47 0 8 0 ffsino 272 2453 0 1012 97 0 97 97 0 8 0 nchpl 144 3792 0 2161 61 0 61 61 0 8 0 uvmvnodes 72 2853 0 0 52 0 52 52 0 8 0 vnodes 200 2853 0 0 151 0 151 151 0 8 0 namei 1024 12250 0 12249 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 10349 0 10348 8 7 1 6 0 8 0 sigapl 432 947 0 932 2 0 2 2 0 8 0 futexpl 56 8354 0 8353 1 0 1 1 0 8 0 knotepl 112 660 0 641 1 0 1 1 0 8 0 kqueuepl 104 205 0 203 1 0 1 1 0 8 0 pipepl 112 744 0 725 2 1 1 1 0 8 0 fdescpl 488 948 0 932 3 0 3 3 0 8 0 filepl 152 6268 0 6172 5 0 5 5 0 8 1 lockfpl 104 206 0 206 2 1 1 1 0 8 1 lockfspl 32 394 0 394 2 1 1 1 0 8 1 sessionpl 112 38 0 28 1 0 1 1 0 8 0 pgrppl 48 55 0 45 1 0 1 1 0 8 0 ucredpl 96 1810 0 1801 1 0 1 1 0 8 0 zombiepl 144 932 0 932 2 1 1 1 0 8 1 processpl 840 964 0 932 4 0 4 4 0 8 0 procpl 600 2466 0 2423 4 0 4 4 0 8 0 srpgc 64 126 0 126 2 1 1 1 0 8 1 sosppl 128 20 0 20 3 2 1 1 0 8 1 sockpl 384 885 0 868 3 0 3 3 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 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 111 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 179 0 0 9 0 9 9 0 8 0 bufpl 256 6996 0 1122 368 0 368 368 0 8 0 anonpl 16 121049 0 115430 58 25 33 42 0 125 2 amapchunkpl 152 6887 0 6802 22 13 9 9 0 158 5 amappl16 192 4289 0 3951 44 25 19 30 0 8 1 amappl15 184 69 0 61 1 0 1 1 0 8 0 amappl14 176 144 0 139 2 1 1 1 0 8 0 amappl13 168 160 0 157 1 0 1 1 0 8 0 amappl12 160 144 0 141 1 0 1 1 0 8 0 amappl11 152 69 0 56 1 0 1 1 0 8 0 amappl10 144 107 0 106 5 4 1 1 0 8 0 amappl9 136 821 0 818 1 0 1 1 0 8 0 amappl8 128 469 0 442 3 1 2 2 0 8 1 amappl7 120 105 0 99 1 0 1 1 0 8 0 amappl6 112 108 0 95 1 0 1 1 0 8 0 amappl5 104 242 0 231 1 0 1 1 0 8 0 amappl4 96 1093 0 1063 2 1 1 2 0 8 0 amappl3 88 233 0 228 1 0 1 1 0 8 0 amappl2 80 6602 0 6546 2 0 2 2 0 8 0 amappl1 72 31710 0 31266 23 13 10 19 0 8 0 amappl 72 2853 0 2818 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 74 0 11 2 0 2 2 0 8 0 uaddrrnd 24 948 0 932 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 948 0 932 1 0 1 1 0 8 0 vmmpekpl 168 11570 0 11548 2 0 2 2 0 8 0 vmmpepl 168 114515 0 113125 102 32 70 76 0 357 5 vmsppl 360 947 0 932 2 0 2 2 0 8 0 pdppl 4096 1904 0 1864 6 0 6 6 0 8 0 pvpl 32 340646 0 331766 142 46 96 116 0 265 14 pmappl 224 947 0 932 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 518 0 3 15 0 15 15 0 8 0