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 343651 29287 32767 0x10 0 0 syz-executor.1 * 28049 29287 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(ffffffff81f7c61c,ffffffff81f2d7dd,36f,ffffffff81f8730a) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b38bd0,ffff800020c236f0) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c236f0) at namei+0x88b sys/kern/vfs_lookup.c:232 vn_open(ffff800020c236f0,1,0) at vn_open+0xc7 sys/kern/vfs_vnops.c:137 doopenat(ffff800020b38bd0,4,20000280,0,0,ffff800020c23930) at doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 syscall(ffff800020c239e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c239e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffaa,0,4,1a921ae1010) at Xsyscall+0x128 end of kernel end trace frame: 0x1ab3641e9e0, 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{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(ffffffff81f7c61c,ffffffff81f2d7dd,36f,ffffffff81f8730a) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b38bd0,ffff800020c236f0) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c236f0) at namei+0x88b sys/kern/vfs_lookup.c:232 vn_open(ffff800020c236f0,1,0) at vn_open+0xc7 sys/kern/vfs_vnops.c:137 doopenat(ffff800020b38bd0,4,20000280,0,0,ffff800020c23930) at doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 syscall(ffff800020c239e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c239e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffaa,0,4,1a921ae1010) at Xsyscall+0x128 end of kernel end trace frame: 0x1ab3641e9e0, count: -9 ddb{1}> show registers rdi 0xffffffff81266357 db_enter+0x17 rsi 0x3a39 __ALIGN_SIZE+0x2a39 rbp 0xffff800020c23330 rbx 0xffff800020c233e0 rdx 0x3a3a __ALIGN_SIZE+0x2a3a rcx 0xffff800003d58000 rax 0xffff800003d58000 r8 0xffffffff813481d3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x4ce2b72e0667c635 r12 0x3000000008 r13 0xffff800020c23340 r14 0x100 r15 0x1 rip 0xffffffff81266358 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c23320 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=28049 stat=onproc flags process=10 proc=4000000 pri=58, usrpri=58, nice=20 forw=0xffffffffffffffff, list=0xffff800020b39530,0xffff800020b392e8 process=0xffff800020b3a6a0 user=0xffff800020c1e000, vmspace=0xfffffd807effeb40 estcpu=8, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 56734 521200 56477 32767 3 0x90 nanosleep syz-executor.0 56734 486872 56477 32767 3 0x4000090 fsleep syz-executor.0 56734 255949 56477 32767 3 0x4000090 fsleep syz-executor.0 29287 343651 47080 32767 7 0x10 syz-executor.1 *29287 28049 47080 32767 7 0x4000010 syz-executor.1 29287 515260 47080 32767 3 0x4000090 fsleep syz-executor.1 47080 326131 15060 32767 3 0x90 nanosleep syz-executor.1 15060 226777 88389 0 3 0x82 wait syz-executor.1 56477 256299 96577 32767 3 0x90 nanosleep syz-executor.0 96577 423152 88389 0 3 0x82 wait syz-executor.0 81673 446411 0 0 3 0x14200 bored sosplice 88389 22267 47169 0 3 0x82 thrsleep syz-fuzzer 88389 97281 47169 0 3 0x4000082 thrsleep syz-fuzzer 88389 145198 47169 0 3 0x4000082 thrsleep syz-fuzzer 88389 304393 47169 0 3 0x4000082 kqread syz-fuzzer 88389 41035 47169 0 3 0x4000082 thrsleep syz-fuzzer 88389 139756 47169 0 3 0x4000082 thrsleep syz-fuzzer 88389 468969 47169 0 3 0x4000082 thrsleep syz-fuzzer 88389 83702 47169 0 3 0x4000082 thrsleep syz-fuzzer 88389 485777 47169 0 3 0x4000082 thrsleep syz-fuzzer 88389 236471 47169 0 3 0x4000082 thrsleep syz-fuzzer 47169 376945 91366 0 3 0x10008a pause ksh 91366 254247 32783 0 3 0x92 select sshd 9358 276982 1 0 3 0x100083 ttyin getty 32783 47698 1 0 3 0x80 select sshd 5483 320641 63741 73 3 0x100090 kqread syslogd 63741 94141 1 0 3 0x100082 netio syslogd 77889 274955 1 77 3 0x100090 poll dhclient 4505 252647 1 0 3 0x80 poll dhclient 83016 392121 0 0 3 0x14200 pgzero zerothread 50524 38131 0 0 3 0x14200 aiodoned aiodoned 88482 386239 0 0 3 0x14200 syncer update 35142 128007 0 0 3 0x14200 cleaner cleaner 38228 181040 0 0 3 0x14200 reaper reaper 52433 13872 0 0 3 0x14200 pgdaemon pagedaemon 61656 501807 0 0 3 0x14200 bored crynlk 41700 307497 0 0 3 0x14200 bored crypto 23982 86294 0 0 3 0x40014200 acpi0 acpi0 30380 315101 0 0 3 0x40014200 idle1 7079 86541 0 0 3 0x14200 bored softnet 22092 156126 0 0 3 0x14200 bored systqmp 3721 252313 0 0 3 0x14200 bored systq 5036 74545 0 0 3 0x40014200 bored softclock 3495 83303 0 0 3 0x40014200 idle0 15909 370511 0 0 3 0x14200 bored smr 1 154128 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 29287 (syz-executor.1) thread 0xffff800020b38bd0 (28049) exclusive rrwlock inode r = 0 (0xfffffd8077525d68) 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+0xc7 sys/kern/vfs_vnops.c:137 #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 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9459 6321K 6321K 78643K 10581 0 0 pcb 23 9K 11K 78643K 273 0 0 rtable 97 3K 3K 78643K 395 0 0 ifaddr 34 9K 9K 78643K 77 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 24 0 0 iov 0 0K 16K 78643K 33 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1397 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 50 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 8 25K 33K 78643K 339 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 44 50K 70K 78643K 444 0 0 subproc 68 69634K 69634K 78643K 306 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 1 0K 0K 78643K 72 0 0 in_multi 33 2K 2K 78643K 123 0 0 ether_multi 1 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 218 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 1823 0 0 UVM aobj 23 2K 2K 78643K 32 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 28 0 0 NDP 7 0K 0K 78643K 30 0 0 temp 113 2376K 2440K 78643K 4083 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 11 0 7 1 0 1 1 0 8 0 inpcbpl 280 230 0 222 1 0 1 1 0 8 0 plimitpl 152 40 0 31 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 104 0 64 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpcb 544 87 0 82 1 0 1 1 0 8 0 nd6 48 18 0 14 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 472 0 287 12 0 12 12 0 8 0 art_table 32 473 0 287 2 0 2 2 0 8 0 art_node 16 103 0 69 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 46 0 36 1 0 1 1 0 8 0 shmpl 112 30 0 9 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1817 0 387 47 0 47 47 0 8 0 ffsino 272 1817 0 387 96 0 96 96 0 8 0 nchpl 144 2484 0 863 61 0 61 61 0 8 0 uvmvnodes 72 1979 0 0 36 0 36 36 0 8 0 vnodes 200 1979 0 0 105 0 105 105 0 8 0 namei 1024 6915 0 6914 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 6398 0 6398 11 10 1 6 0 8 1 sigapl 432 488 0 472 3 1 2 3 0 8 0 futexpl 56 3224 0 3221 1 0 1 1 0 8 0 knotepl 112 254 0 235 1 0 1 1 0 8 0 kqueuepl 104 67 0 65 1 0 1 1 0 8 0 pipepl 112 402 0 383 3 2 1 2 0 8 0 fdescpl 488 489 0 472 3 0 3 3 0 8 0 filepl 152 3008 0 2908 7 2 5 7 0 8 1 lockfpl 104 60 0 60 2 1 1 1 0 8 1 lockfspl 32 108 0 108 2 1 1 1 0 8 1 sessionpl 112 24 0 14 1 0 1 1 0 8 0 pgrppl 48 24 0 14 1 0 1 1 0 8 0 ucredpl 96 637 0 628 1 0 1 1 0 8 0 zombiepl 144 472 0 472 2 1 1 1 0 8 1 processpl 840 505 0 472 4 0 4 4 0 8 0 procpl 600 1098 0 1052 4 0 4 4 0 8 0 srpgc 64 42 0 42 1 0 1 1 0 8 1 sosppl 128 13 0 13 2 1 1 1 0 8 1 sockpl 384 495 0 477 4 1 3 4 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 139 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 182 0 0 10 0 10 10 0 8 0 bufpl 256 6107 0 1122 312 0 312 312 0 8 0 anonpl 16 65098 0 59248 41 2 39 39 0 125 10 amapchunkpl 152 3224 0 3136 13 4 9 9 0 158 5 amappl16 192 1788 0 1433 30 3 27 30 0 8 8 amappl15 184 211 0 205 1 0 1 1 0 8 0 amappl14 176 59 0 55 3 2 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 48 0 46 2 1 1 1 0 8 0 amappl11 152 111 0 100 1 0 1 1 0 8 0 amappl10 144 86 0 85 2 1 1 1 0 8 0 amappl9 136 612 0 607 1 0 1 1 0 8 0 amappl8 128 189 0 170 1 0 1 1 0 8 0 amappl7 120 55 0 47 1 0 1 1 0 8 0 amappl6 112 156 0 147 1 0 1 1 0 8 0 amappl5 104 140 0 129 1 0 1 1 0 8 0 amappl4 96 666 0 636 2 1 1 2 0 8 0 amappl3 88 148 0 143 1 0 1 1 0 8 0 amappl2 80 3111 0 3049 2 0 2 2 0 8 0 amappl1 72 20150 0 19692 23 13 10 19 0 8 0 amappl 72 1369 0 1332 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 31 0 9 1 0 1 1 0 8 0 uaddrrnd 24 489 0 472 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 489 0 472 1 0 1 1 0 8 0 vmmpekpl 168 7966 0 7942 2 0 2 2 0 8 0 vmmpepl 168 61215 0 59732 103 21 82 85 0 357 17 vmsppl 360 488 0 472 2 0 2 2 0 8 0 pdppl 4096 986 0 944 6 0 6 6 0 8 0 pvpl 32 197534 0 188334 120 12 108 108 0 265 26 pmappl 224 488 0 472 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