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 123566 2643 32767 0x10 0 1 syz-executor.0 *332013 2643 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(ffffffff81f7f998,ffffffff81f30b1c,36f,ffffffff81f8a837) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b29530,ffff800020bf3288) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bf3288) at namei+0x88b sys/kern/vfs_lookup.c:232 domknodat(ffff800020b29530,ffffff9c,200000c0,1ffb,0) at domknodat+0xa1 sys/kern/vfs_syscalls.c:1405 syscall(ffff800020bf3550) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf3550) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff96,0,3,ed8e88b1010) at Xsyscall+0x128 end of kernel end trace frame: 0xedb1b426d20, 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(ffffffff81f7f998,ffffffff81f30b1c,36f,ffffffff81f8a837) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b29530,ffff800020bf3288) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bf3288) at namei+0x88b sys/kern/vfs_lookup.c:232 domknodat(ffff800020b29530,ffffff9c,200000c0,1ffb,0) at domknodat+0xa1 sys/kern/vfs_syscalls.c:1405 syscall(ffff800020bf3550) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf3550) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff96,0,3,ed8e88b1010) at Xsyscall+0x128 end of kernel end trace frame: 0xedb1b426d20, count: -8 ddb{0}> show registers rdi 0xffffffff815e48a7 db_enter+0x17 rsi 0x3770 __ALIGN_SIZE+0x2770 rbp 0xffff800020bf3020 rbx 0xffff800020bf30d0 rdx 0x3771 __ALIGN_SIZE+0x2771 rcx 0xffff800004354000 rax 0xffff800004354000 r8 0xffffffff81d729c3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xcea478992ed8c889 r12 0x3000000008 r13 0xffff800020bf3030 r14 0x100 r15 0x1 rip 0xffffffff815e48a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bf3010 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=332013 stat=onproc flags process=10 proc=4000000 pri=75, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28018,0xffffffff8235ded8 process=0xffff800020b7c018 user=0xffff800020bee000, vmspace=0xfffffd807effe000 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 2643 123566 52633 32767 7 0x10 syz-executor.0 * 2643 332013 52633 32767 7 0x4000010 syz-executor.0 94050 192257 70905 32767 2 0x10 syz-executor.1 70905 200153 92200 0 3 0x82 wait syz-executor.1 52633 376905 43336 32767 3 0x90 nanosleep syz-executor.0 43336 123612 92200 0 3 0x82 wait syz-executor.0 5332 125775 0 0 3 0x14200 bored sosplice 92200 251118 79568 0 3 0x82 thrsleep syz-fuzzer 92200 192207 79568 0 3 0x4000082 thrsleep syz-fuzzer 92200 23815 79568 0 3 0x4000082 thrsleep syz-fuzzer 92200 173158 79568 0 3 0x4000082 kqread syz-fuzzer 92200 68692 79568 0 3 0x4000082 thrsleep syz-fuzzer 92200 509856 79568 0 3 0x4000082 thrsleep syz-fuzzer 92200 193355 79568 0 3 0x4000082 thrsleep syz-fuzzer 92200 478901 79568 0 3 0x4000082 thrsleep syz-fuzzer 92200 395097 79568 0 3 0x4000082 thrsleep syz-fuzzer 92200 310448 79568 0 3 0x4000082 thrsleep syz-fuzzer 79568 248858 89333 0 3 0x10008a pause ksh 89333 79213 9429 0 3 0x92 select sshd 37513 41981 1 0 3 0x100083 ttyin getty 9429 63581 1 0 3 0x80 select sshd 74211 443524 71424 73 3 0x100090 kqread syslogd 71424 488152 1 0 3 0x100082 netio syslogd 79661 227414 1 77 3 0x100090 poll dhclient 45116 455893 1 0 3 0x80 poll dhclient 96540 175573 0 0 3 0x14200 pgzero zerothread 82148 288725 0 0 3 0x14200 aiodoned aiodoned 49511 503462 0 0 3 0x14200 syncer update 25481 402672 0 0 3 0x14200 cleaner cleaner 64325 505418 0 0 3 0x14200 reaper reaper 11040 91760 0 0 3 0x14200 pgdaemon pagedaemon 39905 383164 0 0 3 0x14200 bored crynlk 63778 409060 0 0 3 0x14200 bored crypto 35684 485135 0 0 3 0x40014200 acpi0 acpi0 66964 94564 0 0 3 0x40014200 idle1 23242 477076 0 0 3 0x14200 bored softnet 9795 258957 0 0 3 0x14200 bored systqmp 35843 328506 0 0 3 0x14200 bored systq 90452 119006 0 0 3 0x40014200 bored softclock 43515 410584 0 0 3 0x40014200 idle0 13702 92856 0 0 3 0x14200 bored smr 1 325304 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 2643 (syz-executor.0) thread 0xffff800020b29530 (332013) exclusive rrwlock inode r = 0 (0xfffffd806e610d68) 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 domknodat+0xa1 sys/kern/vfs_syscalls.c:1405 #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 94050 (syz-executor.1) thread 0xffff800020b28720 (192257) exclusive rrwlock inode r = 0 (0xfffffd8079eb65f8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_ihash.c:140 #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 ufs_ihashins+0x6d sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x143 sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0x10f sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0x76 sys/kern/vfs_vops.c:449 #8 domkdirat+0x12d sys/kern/vfs_syscalls.c:2881 #9 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8079eb6c58) 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 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9460 6321K 6321K 78643K 10627 0 0 pcb 24 9K 11K 78643K 365 0 0 rtable 97 3K 3K 78643K 687 0 0 ifaddr 36 10K 10K 78643K 136 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 31 0 0 iov 0 0K 16K 78643K 51 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 1676 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 16 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 67 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 33K 78643K 658 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 50 50K 58K 78643K 662 0 0 subproc 68 69634K 69634K 78643K 612 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 87 0 0 in_multi 33 2K 2K 78643K 229 0 0 ether_multi 1 0K 0K 78643K 4 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 289 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 81 20K 29K 78643K 2844 0 0 UVM aobj 43 3K 3K 78643K 46 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 42 0 0 NDP 7 0K 0K 78643K 57 0 0 temp 113 2376K 2442K 78643K 5365 0 0 kqueue 0 0K 0K 78643K 4 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 20 0 16 1 0 1 1 0 8 0 inpcbpl 280 347 0 340 1 0 1 1 0 8 0 plimitpl 152 82 0 73 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 185 0 145 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 sackhl 24 2 0 2 2 2 0 1 0 8 0 tcpqe 32 12 0 12 1 1 0 1 0 8 0 tcpcb 544 139 0 135 1 0 1 1 0 8 0 nd6 48 36 0 32 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 861 0 672 12 0 12 12 0 8 0 art_table 32 862 0 672 2 0 2 2 0 8 0 art_node 16 184 0 150 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 2 1 0 1 1 0 8 0 semapl 112 65 0 55 1 0 1 1 0 8 0 shmpl 112 44 0 3 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2243 0 807 47 0 47 47 0 8 0 ffsino 272 2243 0 807 96 0 96 96 0 8 0 nchpl 144 3313 0 1690 61 0 61 61 0 8 0 uvmvnodes 72 2558 0 0 47 0 47 47 0 8 0 vnodes 200 2558 0 0 135 0 135 135 0 8 0 namei 1024 10506 0 10504 3 2 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 8419 0 8419 11 10 1 6 0 8 1 sigapl 432 780 0 765 4 2 2 3 0 8 0 futexpl 56 6478 0 6478 1 0 1 1 0 8 1 knotepl 112 544 0 525 1 0 1 1 0 8 0 kqueuepl 104 172 0 170 1 0 1 1 0 8 0 pipepl 112 750 0 731 4 2 2 2 0 8 1 fdescpl 488 781 0 765 3 0 3 3 0 8 0 filepl 152 5459 0 5362 7 0 7 7 0 8 3 lockfpl 104 152 0 152 2 1 1 1 0 8 1 lockfspl 32 340 0 340 2 1 1 1 0 8 1 sessionpl 112 33 0 23 1 0 1 1 0 8 0 pgrppl 48 37 0 27 1 0 1 1 0 8 0 ucredpl 96 1705 0 1696 1 0 1 1 0 8 0 zombiepl 144 765 0 765 3 2 1 1 0 8 1 processpl 840 797 0 765 4 0 4 4 0 8 0 procpl 600 1967 0 1925 4 0 4 4 0 8 0 srpgc 64 92 0 92 2 1 1 1 0 8 1 sosppl 128 20 0 20 4 3 1 1 0 8 1 sockpl 384 707 0 689 4 0 4 4 0 8 2 mcl64k 65536 6 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 140 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 173 0 0 10 1 9 10 0 8 0 bufpl 256 6492 0 1123 336 0 336 336 0 8 0 anonpl 16 81779 0 76148 38 9 29 33 0 125 0 amapchunkpl 152 5021 0 4936 13 7 6 9 0 158 1 amappl16 192 2619 0 2283 21 2 19 19 0 8 2 amappl15 184 159 0 153 1 0 1 1 0 8 0 amappl14 176 173 0 167 3 2 1 1 0 8 0 amappl13 168 76 0 73 1 0 1 1 0 8 0 amappl12 160 130 0 127 2 1 1 1 0 8 0 amappl11 152 64 0 53 1 0 1 1 0 8 0 amappl10 144 305 0 303 3 2 1 1 0 8 0 amappl9 136 632 0 629 1 0 1 1 0 8 0 amappl8 128 218 0 202 1 0 1 1 0 8 0 amappl7 120 288 0 279 1 0 1 1 0 8 0 amappl6 112 106 0 100 1 0 1 1 0 8 0 amappl5 104 224 0 214 1 0 1 1 0 8 0 amappl4 96 951 0 919 2 1 1 2 0 8 0 amappl3 88 275 0 265 1 0 1 1 0 8 0 amappl2 80 5285 0 5231 2 0 2 2 0 8 0 amappl1 72 27468 0 27035 24 15 9 19 0 8 0 amappl 72 2305 0 2270 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 45 0 3 1 0 1 1 0 8 0 uaddrrnd 24 781 0 765 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 781 0 765 1 0 1 1 0 8 0 vmmpekpl 168 10586 0 10563 2 0 2 2 0 8 0 vmmpepl 168 94460 0 93093 104 35 69 72 0 357 9 vmsppl 360 780 0 765 2 0 2 2 0 8 0 pdppl 4096 1570 0 1530 6 0 6 6 0 8 0 pvpl 32 266178 0 257289 128 38 90 102 0 265 7 pmappl 224 780 0 765 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 489 0 5 14 0 14 14 0 8 0