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 396659 70377 32767 0x10 0 0 syz-executor.0 *453568 70377 32767 0x10 0x4000000 1K 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(ffffffff81f7bdfb,ffffffff81f325a7,36f,ffffffff81f8b7f3) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b744c8,ffff800020bfb2b8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bfb2b8) at namei+0x88b sys/kern/vfs_lookup.c:232 domknodat(ffff800020b744c8,ffffff9c,200000c0,40,701) at domknodat+0xa1 sys/kern/vfs_syscalls.c:1405 syscall(ffff800020bfb580) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bfb580) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff97,0,3,1a4f5cee010) at Xsyscall+0x128 end of kernel end trace frame: 0x1a710fc2be0, 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(ffffffff81f7bdfb,ffffffff81f325a7,36f,ffffffff81f8b7f3) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b744c8,ffff800020bfb2b8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bfb2b8) at namei+0x88b sys/kern/vfs_lookup.c:232 domknodat(ffff800020b744c8,ffffff9c,200000c0,40,701) at domknodat+0xa1 sys/kern/vfs_syscalls.c:1405 syscall(ffff800020bfb580) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bfb580) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff97,0,3,1a4f5cee010) at Xsyscall+0x128 end of kernel end trace frame: 0x1a710fc2be0, count: -8 ddb{1}> show registers rdi 0xffffffff8188e157 db_enter+0x17 rsi 0x397a __ALIGN_SIZE+0x297a rbp 0xffff800020bfb050 rbx 0xffff800020bfb100 rdx 0x397b __ALIGN_SIZE+0x297b rcx 0xffff80000214b000 rax 0xffff80000214b000 r8 0xffffffff81e2f083 kprintf+0x183 r9 0x1 r10 0x25 r11 0x662058cdcc7216cf r12 0x3000000008 r13 0xffff800020bfb060 r14 0x100 r15 0x1 rip 0xffffffff8188e158 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bfb040 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=453568 stat=onproc flags process=10 proc=4000000 pri=73, usrpri=73, nice=20 forw=0xffffffffffffffff, list=0xffff800020b75530,0xffffffff82352f38 process=0xffff800020b3ba50 user=0xffff800020bf6000, vmspace=0xfffffd807effdca8 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 70377 396659 51132 32767 7 0x10 syz-executor.0 *70377 453568 51132 32767 7 0x4000010 syz-executor.0 51132 127167 51252 32767 3 0x90 nanosleep syz-executor.0 51252 234360 30524 0 3 0x82 wait syz-executor.0 38986 371292 0 0 3 0x14200 bored sosplice 30524 320916 8289 0 3 0x82 kqread syz-fuzzer 30524 232054 8289 0 3 0x4000082 nanosleep syz-fuzzer 30524 464970 8289 0 3 0x4000082 thrsleep syz-fuzzer 30524 253164 8289 0 3 0x4000082 thrsleep syz-fuzzer 30524 438973 8289 0 3 0x4000082 thrsleep syz-fuzzer 30524 165727 8289 0 3 0x4000082 thrsleep syz-fuzzer 30524 436452 8289 0 3 0x4000082 thrsleep syz-fuzzer 30524 476255 8289 0 3 0x4000082 thrsleep syz-fuzzer 30524 385871 8289 0 3 0x4000082 thrsleep syz-fuzzer 30524 357003 8289 0 3 0x4000082 nanosleep syz-fuzzer 8289 497753 59212 0 3 0x10008a pause ksh 59212 38143 1614 0 3 0x92 select sshd 38245 137394 1 0 3 0x100083 ttyin getty 1614 82497 1 0 3 0x80 select sshd 59692 279457 8967 73 3 0x100090 kqread syslogd 8967 14398 1 0 3 0x100082 netio syslogd 15749 324395 1 77 3 0x100090 poll dhclient 89341 228291 1 0 3 0x80 poll dhclient 83066 200386 0 0 3 0x14200 pgzero zerothread 59056 220772 0 0 3 0x14200 aiodoned aiodoned 38855 93209 0 0 3 0x14200 syncer update 65938 363549 0 0 3 0x14200 cleaner cleaner 93629 440556 0 0 3 0x14200 reaper reaper 32100 411114 0 0 3 0x14200 pgdaemon pagedaemon 99209 185160 0 0 3 0x14200 bored crynlk 17778 72549 0 0 3 0x14200 bored crypto 80715 1393 0 0 3 0x40014200 acpi0 acpi0 38892 237763 0 0 3 0x40014200 idle1 86864 427641 0 0 3 0x14200 bored softnet 11213 382664 0 0 3 0x14200 bored systqmp 82380 429570 0 0 3 0x14200 bored systq 38254 249928 0 0 3 0x40014200 bored softclock 36194 129475 0 0 3 0x40014200 idle0 44793 169589 0 0 3 0x14200 bored smr 1 410017 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 70377 (syz-executor.0) thread 0xffff800020b744c8 (453568) exclusive rrwlock inode r = 0 (0xfffffd8067922f88) 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 (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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9455 6318K 6321K 78643K 10792 0 0 pcb 23 9K 11K 78643K 857 0 0 rtable 79 2K 3K 78643K 1765 0 0 ifaddr 30 10K 11K 78643K 344 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 70 0 0 iov 0 0K 32K 78643K 193 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 2413 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 31 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 266 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 33K 78643K 1735 0 0 sigio 0 0K 0K 78643K 19 0 0 proc 48 50K 70K 78643K 1477 0 0 subproc 34 34817K 69634K 78643K 1734 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 246 0 0 in_multi 22 1K 2K 78643K 637 0 0 ether_multi 1 0K 0K 78643K 16 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 527 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 13K 30K 78643K 6253 0 0 UVM aobj 105 5K 5K 78643K 117 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 129 0 0 NDP 4 0K 0K 78643K 156 0 0 temp 97 2377K 2446K 78643K 9869 0 0 kqueue 0 0K 0K 78643K 21 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 53 0 50 1 0 1 1 0 8 0 inpcbpl 280 921 0 914 2 1 1 2 0 8 0 plimitpl 152 185 0 178 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 482 0 451 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 353 0 349 1 0 1 1 0 8 0 nd6 48 102 0 100 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2295 0 2148 12 0 12 12 0 8 1 art_table 32 2296 0 2148 2 0 2 2 0 8 0 art_node 16 481 0 453 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 0 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 260 0 250 1 0 1 1 0 8 0 shmpl 112 115 0 12 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3434 0 1967 48 0 48 48 0 8 0 ffsino 272 3434 0 1967 99 0 99 99 0 8 0 nchpl 144 5914 0 4286 62 1 61 61 0 8 0 uvmvnodes 72 4310 0 0 79 0 79 79 0 8 0 vnodes 200 4310 0 0 227 0 227 227 0 8 0 namei 1024 20903 0 20902 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 16264 0 16264 14 13 1 6 0 8 1 sigapl 432 1758 0 1745 5 3 2 3 0 8 0 futexpl 56 16952 0 16952 1 0 1 1 0 8 1 knotepl 112 1444 0 1431 1 0 1 1 0 8 0 kqueuepl 104 428 0 426 1 0 1 1 0 8 0 pipepl 112 1470 0 1457 5 4 1 2 0 8 0 fdescpl 488 1759 0 1745 3 0 3 3 0 8 1 filepl 152 12093 0 12021 8 3 5 7 0 8 1 lockfpl 104 449 0 449 3 2 1 1 0 8 1 lockfspl 32 920 0 920 2 1 1 1 0 8 1 sessionpl 112 66 0 57 1 0 1 1 0 8 0 pgrppl 48 90 0 81 1 0 1 1 0 8 0 ucredpl 96 3751 0 3743 1 0 1 1 0 8 0 zombiepl 144 1745 0 1745 2 1 1 1 0 8 1 processpl 840 1775 0 1745 4 0 4 4 0 8 0 procpl 600 4713 0 4673 4 0 4 4 0 8 0 srpgc 64 278 0 278 4 3 1 1 0 8 1 sosppl 128 34 0 34 5 5 0 1 0 8 0 sockpl 384 1795 0 1778 5 2 3 4 0 8 1 mcl64k 65536 6 0 0 1 0 1 1 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 13 0 0 2 0 2 2 0 8 0 mcl9k 9216 9 0 0 1 0 1 1 0 8 0 mcl8k 8192 9 0 0 2 0 2 2 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 112 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 248 0 0 11 0 11 11 0 8 0 bufpl 256 8584 0 1565 439 0 439 439 0 8 0 anonpl 16 211321 0 205766 75 31 44 44 0 125 13 amapchunkpl 152 12793 0 12712 27 18 9 11 0 158 4 amappl16 192 7878 0 7530 69 42 27 31 0 8 8 amappl15 184 585 0 579 1 0 1 1 0 8 0 amappl14 176 394 0 391 2 1 1 1 0 8 0 amappl13 168 220 0 217 1 0 1 1 0 8 0 amappl12 160 456 0 455 2 1 1 1 0 8 0 amappl11 152 324 0 310 1 0 1 1 0 8 0 amappl10 144 183 0 179 2 1 1 1 0 8 0 amappl9 136 946 0 944 1 0 1 1 0 8 0 amappl8 128 587 0 561 2 1 1 2 0 8 0 amappl7 120 198 0 192 1 0 1 1 0 8 0 amappl6 112 239 0 230 1 0 1 1 0 8 0 amappl5 104 462 0 450 1 0 1 1 0 8 0 amappl4 96 1685 0 1655 2 1 1 2 0 8 0 amappl3 88 643 0 637 1 0 1 1 0 8 0 amappl2 80 13087 0 13034 2 0 2 2 0 8 0 amappl1 72 52039 0 51621 23 13 10 19 0 8 0 amappl 72 5312 0 5281 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 116 0 12 2 0 2 2 0 8 0 uaddrrnd 24 1759 0 1745 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1759 0 1745 1 0 1 1 0 8 0 vmmpekpl 168 17850 0 17826 2 0 2 2 0 8 0 vmmpepl 168 209229 0 207928 118 40 78 79 0 357 16 vmsppl 360 1758 0 1745 2 0 2 2 0 8 0 pdppl 4096 3526 0 3490 6 0 6 6 0 8 1 pvpl 32 584439 0 575766 193 74 119 119 0 265 30 pmappl 224 1758 0 1745 9 7 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 595 0 3 17 0 17 17 0 8 0