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 * 36713 1161 32767 0x10 0x4000000 0K syz-executor.1 136408 64701 32767 0x10 0 1 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(ffff800020b384c8,ffff800020c49320) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c49320) at namei+0x88b sys/kern/vfs_lookup.c:232 vn_open(ffff800020c49320,212,0) at vn_open+0x157 sys/kern/vfs_vnops.c:103 doopenat(ffff800020b384c8,ffffff9c,20000040,611,0,ffff800020c49560) at doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 syscall(ffff800020c49610) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c49610) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffa8,0,3,35e1d9f8010) at Xsyscall+0x128 end of kernel end trace frame: 0x3606b2dee40, count: 6 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(ffff800020b384c8,ffff800020c49320) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c49320) at namei+0x88b sys/kern/vfs_lookup.c:232 vn_open(ffff800020c49320,212,0) at vn_open+0x157 sys/kern/vfs_vnops.c:103 doopenat(ffff800020b384c8,ffffff9c,20000040,611,0,ffff800020c49560) at doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 syscall(ffff800020c49610) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c49610) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffa8,0,3,35e1d9f8010) at Xsyscall+0x128 end of kernel end trace frame: 0x3606b2dee40, count: -9 ddb{0}> show registers rdi 0xffffffff81266357 db_enter+0x17 rsi 0x3bfa __ALIGN_SIZE+0x2bfa rbp 0xffff800020c48f60 rbx 0xffff800020c49010 rdx 0x3bfb __ALIGN_SIZE+0x2bfb rcx 0xffff800004166000 rax 0xffff800004166000 r8 0xffffffff813481d3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x57ff62500a2fcc9b r12 0x3000000008 r13 0xffff800020c48f70 r14 0x100 r15 0x1 rip 0xffffffff81266358 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c48f50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=36713 stat=onproc flags process=10 proc=4000000 pri=61, usrpri=61, nice=20 forw=0xffffffffffffffff, list=0xffff800020b39530,0xffff800020b39c48 process=0xffff800020b3a358 user=0xffff800020c44000, vmspace=0xfffffd806e91b9e0 estcpu=36, cpticks=6, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 1161 250424 4581 32767 2 0x10 syz-executor.1 * 1161 36713 4581 32767 7 0x4000010 syz-executor.1 1161 272653 4581 32767 3 0x4000090 fsleep syz-executor.1 1161 144867 4581 32767 3 0x4000090 fsleep syz-executor.1 4581 15854 15684 32767 2 0x490 syz-executor.1 15684 480198 99367 0 3 0x82 wait syz-executor.1 75953 481106 0 0 3 0x14200 bored sosplice 64701 136408 61831 32767 7 0x10 syz-executor.0 61831 245495 99367 0 3 0x82 wait syz-executor.0 99367 111531 99360 0 3 0x82 thrsleep syz-fuzzer 99367 135688 99360 0 2 0x4000482 syz-fuzzer 99367 330870 99360 0 3 0x4000082 thrsleep syz-fuzzer 99367 494165 99360 0 2 0x4000482 syz-fuzzer 99367 471316 99360 0 3 0x4000082 thrsleep syz-fuzzer 99367 218126 99360 0 3 0x4000082 thrsleep syz-fuzzer 99367 362733 99360 0 3 0x4000082 thrsleep syz-fuzzer 99367 324985 99360 0 3 0x4000082 thrsleep syz-fuzzer 99367 27316 99360 0 3 0x4000082 thrsleep syz-fuzzer 99367 307848 99360 0 3 0x4000082 kqread syz-fuzzer 99360 140792 76041 0 3 0x10008a pause ksh 76041 522139 21603 0 3 0x92 select sshd 62647 154565 1 0 3 0x100083 ttyin getty 21603 281942 1 0 3 0x80 select sshd 64725 398161 36120 73 3 0x100090 kqread syslogd 36120 58267 1 0 3 0x100082 netio syslogd 75684 186733 1 77 3 0x100090 poll dhclient 28989 239865 1 0 3 0x80 poll dhclient 12323 81398 0 0 3 0x14200 pgzero zerothread 41298 4150 0 0 3 0x14200 aiodoned aiodoned 3620 406437 0 0 3 0x14200 syncer update 53192 55683 0 0 3 0x14200 cleaner cleaner 53656 89583 0 0 3 0x14200 reaper reaper 2563 327604 0 0 3 0x14200 pgdaemon pagedaemon 56508 485244 0 0 3 0x14200 bored crynlk 20292 257490 0 0 3 0x14200 bored crypto 13255 141510 0 0 3 0x40014200 acpi0 acpi0 3784 201067 0 0 3 0x40014200 idle1 94053 434398 0 0 3 0x14200 bored softnet 64247 422662 0 0 3 0x14200 bored systqmp 88003 54965 0 0 3 0x14200 bored systq 53587 263516 0 0 3 0x40014200 bored softclock 38340 180232 0 0 3 0x40014200 idle0 79890 55610 0 0 3 0x14200 bored smr 1 426186 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 1161 (syz-executor.1) thread 0xffff800020b384c8 (36713) exclusive rrwlock inode r = 0 (0xfffffd807c9151b8) 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 vn_open+0x157 sys/kern/vfs_vnops.c:103 #12 doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 #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 (0xfffffd807c915818) 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 vn_open+0x157 sys/kern/vfs_vnops.c:103 #8 doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 #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 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 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9458 6320K 6320K 78643K 10575 0 0 pcb 23 9K 10K 78643K 201 0 0 rtable 97 3K 3K 78643K 369 0 0 ifaddr 34 9K 9K 78643K 71 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 23 0 0 iov 0 0K 24K 78643K 31 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 1357 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 6 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 26 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 29K 78643K 312 0 0 sigio 0 0K 0K 78643K 7 0 0 proc 44 50K 58K 78643K 414 0 0 subproc 68 69634K 69634K 78643K 272 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 44 0 0 in_multi 33 2K 2K 78643K 108 0 0 ether_multi 1 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 212 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 78 20K 24K 78643K 1683 0 0 UVM aobj 10 2K 2K 78643K 18 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 15 0 0 NDP 5 0K 0K 78643K 27 0 0 temp 95 2367K 2434K 78643K 3924 0 0 kqueue 0 0K 0K 78643K 5 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 10 0 6 1 0 1 1 0 8 0 inpcbpl 280 195 0 188 1 0 1 1 0 8 0 plimitpl 152 41 0 32 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 95 0 55 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 62 0 58 1 0 1 1 0 8 0 nd6 48 16 0 12 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 431 0 246 12 0 12 12 0 8 0 art_table 32 432 0 246 2 0 2 2 0 8 0 art_node 16 94 0 60 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 0 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 24 0 14 1 0 1 1 0 8 0 shmpl 112 16 0 8 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1779 0 353 47 0 47 47 0 8 0 ffsino 272 1779 0 353 96 0 96 96 0 8 0 nchpl 144 2423 0 805 61 0 61 61 0 8 0 uvmvnodes 72 1924 0 0 35 0 35 35 0 8 0 vnodes 200 1924 0 0 102 0 102 102 0 8 0 namei 1024 6490 0 6489 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 6384 0 6384 9 8 1 6 0 8 1 sigapl 432 464 0 449 2 0 2 2 0 8 0 futexpl 56 2885 0 2883 1 0 1 1 0 8 0 knotepl 112 223 0 204 1 0 1 1 0 8 0 kqueuepl 104 72 0 70 1 0 1 1 0 8 0 pipepl 112 370 0 351 3 1 2 2 0 8 1 fdescpl 488 465 0 449 3 0 3 3 0 8 0 filepl 152 2675 0 2576 6 1 5 5 0 8 0 lockfpl 104 41 0 40 2 1 1 1 0 8 0 lockfspl 32 40 0 39 2 1 1 1 0 8 0 sessionpl 112 23 0 13 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 520 0 511 1 0 1 1 0 8 0 zombiepl 144 449 0 449 2 1 1 1 0 8 1 processpl 840 481 0 449 4 0 4 4 0 8 0 procpl 600 989 0 945 4 0 4 4 0 8 0 srpgc 64 36 0 36 1 0 1 1 0 8 1 sosppl 128 6 0 6 1 1 0 1 0 8 0 sockpl 384 385 0 368 3 0 3 3 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 121 0 0 15 0 15 15 0 8 1 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 147 0 0 9 0 9 9 0 8 0 bufpl 256 6145 0 1122 314 0 314 314 0 8 0 anonpl 16 58402 0 52063 46 2 44 45 0 125 14 amapchunkpl 152 3066 0 2980 13 4 9 9 0 158 5 amappl16 192 1638 0 1287 29 4 25 29 0 8 7 amappl15 184 56 0 52 1 0 1 1 0 8 0 amappl14 176 37 0 32 2 1 1 1 0 8 0 amappl13 168 42 0 38 1 0 1 1 0 8 0 amappl12 160 45 0 44 1 0 1 1 0 8 0 amappl11 152 159 0 143 1 0 1 1 0 8 0 amappl10 144 81 0 80 2 1 1 1 0 8 0 amappl9 136 651 0 646 1 0 1 1 0 8 0 amappl8 128 221 0 204 1 0 1 1 0 8 0 amappl7 120 47 0 42 1 0 1 1 0 8 0 amappl6 112 192 0 183 1 0 1 1 0 8 0 amappl5 104 140 0 130 1 0 1 1 0 8 0 amappl4 96 659 0 633 2 1 1 2 0 8 0 amappl3 88 125 0 119 1 0 1 1 0 8 0 amappl2 80 2848 0 2797 2 0 2 2 0 8 0 amappl1 72 19298 0 18858 25 15 10 19 0 8 1 amappl 72 1247 0 1211 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 17 0 8 1 0 1 1 0 8 0 uaddrrnd 24 465 0 449 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 465 0 449 1 0 1 1 0 8 0 vmmpekpl 168 7728 0 7703 2 0 2 2 0 8 0 vmmpepl 168 57965 0 56587 97 22 75 75 0 357 10 vmsppl 360 464 0 449 2 0 2 2 0 8 0 pdppl 4096 938 0 898 6 0 6 6 0 8 0 pvpl 32 187289 0 177176 137 18 119 120 0 265 34 pmappl 224 464 0 449 3 1 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 465 0 3 14 0 14 14 0 8 0