panic: kernel diagnostic assertion "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_unveil.c", line 879 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 408741 35528 0 0 0 0 syz-executor.1 *139587 35528 0 0 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(ffffffff81f7eb2c,ffffffff81f800b9,36f,ffffffff81f8afb5) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b9b530,ffff800020c597e8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c597e8) at namei+0x88b sys/kern/vfs_lookup.c:232 sys_lchown(ffff800020b9b530,ffff800020c59a08,ffff800020c599f0) at sys_lchown+0x84 sys/kern/vfs_syscalls.c:2322 syscall(ffff800020c59aa0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c59aa0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(0,0,ffffffffffffff8c,0,3,9c004e32010) at Xsyscall+0x128 end of kernel end trace frame: 0x9c2e5b93370, 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/multicore/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(ffffffff81f7eb2c,ffffffff81f800b9,36f,ffffffff81f8afb5) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b9b530,ffff800020c597e8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c597e8) at namei+0x88b sys/kern/vfs_lookup.c:232 sys_lchown(ffff800020b9b530,ffff800020c59a08,ffff800020c599f0) at sys_lchown+0x84 sys/kern/vfs_syscalls.c:2322 syscall(ffff800020c59aa0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c59aa0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(0,0,ffffffffffffff8c,0,3,9c004e32010) at Xsyscall+0x128 end of kernel end trace frame: 0x9c2e5b93370, count: -8 ddb{1}> show registers rdi 0xffffffff81e2e757 db_enter+0x17 rsi 0x3878 __ALIGN_SIZE+0x2878 rbp 0xffff800020c59580 rbx 0xffff800020c59630 rdx 0x3879 __ALIGN_SIZE+0x2879 rcx 0xffff800002b66000 rax 0xffff800002b66000 r8 0xffffffff811c43a3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xc2c4ac229c9cf1e0 r12 0x3000000008 r13 0xffff800020c59590 r14 0x100 r15 0x1 rip 0xffffffff81e2e758 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c59570 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=139587 stat=onproc flags process=0 proc=4000000 pri=80, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff800020b9b2d8,0xffffffff82394e00 process=0xffff800020b8c360 user=0xffff800020c54000, vmspace=0xfffffd807effeb40 estcpu=30, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 35528 408741 53418 0 7 0 syz-executor.1 *35528 139587 53418 0 7 0x4000000 syz-executor.1 53270 63807 27571 0 2 0 syz-executor.0 53270 373024 27571 0 3 0x4000000 biowait syz-executor.0 53270 516821 27571 0 3 0x4000000 inode syz-executor.0 27571 291598 54228 0 3 0x82 nanosleep syz-executor.0 83699 442160 0 0 3 0x14200 bored sosplice 53418 373306 54228 0 3 0x82 nanosleep syz-executor.1 54228 161554 81563 0 3 0x82 kqread syz-fuzzer 54228 501220 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 400519 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 142044 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 254872 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 447713 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 72155 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 385667 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 105897 81563 0 3 0x4000082 thrsleep syz-fuzzer 54228 344591 81563 0 3 0x4000082 thrsleep syz-fuzzer 81563 270983 64349 0 3 0x10008a pause ksh 64349 264577 33395 0 3 0x92 select sshd 97472 356668 1 0 3 0x100083 ttyin getty 33395 417202 1 0 3 0x80 select sshd 60146 195444 96936 74 3 0x100092 bpf pflogd 96936 369043 1 0 3 0x80 netio pflogd 28332 480163 47242 73 3 0x100090 kqread syslogd 47242 204569 1 0 3 0x100082 netio syslogd 78375 389541 1 77 3 0x100090 poll dhclient 88894 25929 1 0 3 0x80 poll dhclient 11507 10653 0 0 2 0x14200 zerothread 35015 321230 0 0 3 0x14200 aiodoned aiodoned 57410 138062 0 0 3 0x14200 syncer update 98388 79511 0 0 3 0x14200 cleaner cleaner 63551 135453 0 0 3 0x14200 reaper reaper 40070 189589 0 0 3 0x14200 pgdaemon pagedaemon 98537 494804 0 0 3 0x14200 bored crynlk 86945 145112 0 0 3 0x14200 bored crypto 64472 499769 0 0 3 0x40014200 acpi0 acpi0 82817 469215 0 0 3 0x40014200 idle1 19672 436789 0 0 3 0x14200 bored softnet 28929 356488 0 0 3 0x14200 bored systqmp 82638 458642 0 0 3 0x14200 bored systq 74698 281919 0 0 3 0x40014200 bored softclock 78604 20354 0 0 3 0x40014200 idle0 66403 102232 0 0 3 0x14200 bored smr 1 46438 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 35528 (syz-executor.1) thread 0xffff800020b9b530 (139587) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8234a3d0) locked @ /syzkaller/managers/multicore/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 53270 (syz-executor.0) thread 0xffff800020b9ae28 (373024) exclusive rrwlock inode r = 0 (0xfffffd806fad91b0) locked @ /syzkaller/managers/multicore/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_write+0x169 vn_lock sys/kern/vfs_vnops.c:549 [inline] #4 vn_write+0x169 sys/kern/vfs_vnops.c:393 #5 dofilewritev+0x1b0 sys/kern/sys_generic.c:364 #6 sys_pwritev+0xd9 sys/kern/vfs_syscalls.c:3161 #7 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #7 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #8 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9512 6426K 6429K 78643K 10709 0 0 pcb 27 9K 10K 78643K 231 0 0 rtable 103 4K 4K 78643K 356 0 0 ifaddr 56 13K 13K 78643K 105 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1479 0 0 iov 1 8K 12K 78643K 36 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 76K 78643K 1406 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 32 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 25K 78643K 339 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 56 63K 71K 78643K 443 0 0 subproc 64 65538K 67586K 78643K 170 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 40 0 0 in_multi 33 2K 2K 78643K 80 0 0 ether_multi 1 0K 0K 78643K 2 0 0 mrt 0 0K 0K 78643K 1 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 224 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 88 21K 29K 78643K 1959 0 0 UVM aobj 14 2K 2K 78643K 17 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 21 0 0 NDP 11 0K 0K 78643K 32 0 0 temp 133 2371K 2438K 78643K 4265 0 0 kqueue 0 0K 0K 78643K 2 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 7 0 3 1 0 1 1 0 8 0 inpcbpl 280 236 0 229 1 0 1 1 0 8 0 plimitpl 152 27 0 19 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 70 0 30 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpcb 544 94 0 90 1 0 1 1 0 8 0 nd6 48 10 0 6 1 0 1 1 0 8 0 ppxss 1128 6 0 6 2 2 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 16 0 7 1 0 1 1 0 8 0 pfstkey 112 16 0 7 1 0 1 1 0 8 0 pfstate 328 16 0 7 1 0 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 310 0 122 12 0 12 12 0 8 0 art_table 32 311 0 122 2 0 2 2 0 8 0 art_node 16 67 0 33 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semapl 112 30 0 20 1 0 1 1 0 8 0 shmpl 112 15 0 3 2 1 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1994 0 563 47 0 47 47 0 8 0 ffsino 272 1994 0 563 96 0 96 96 0 8 0 nchpl 144 2680 0 1037 61 0 61 61 0 8 0 uvmvnodes 72 2111 0 0 39 0 39 39 0 8 0 vnodes 200 2111 0 0 112 0 112 112 0 8 0 namei 1024 7519 0 7518 3 2 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 1 1 0 1 0 8 0 scxspl 192 7178 0 7177 12 10 2 6 0 8 1 sigapl 432 529 0 513 3 1 2 3 0 8 0 futexpl 56 3559 0 3559 1 0 1 1 0 8 1 knotepl 112 205 0 186 1 0 1 1 0 8 0 kqueuepl 104 131 0 129 1 0 1 1 0 8 0 pipepl 112 364 0 345 3 2 1 1 0 8 0 fdescpl 488 530 0 513 3 0 3 3 0 8 0 filepl 152 3145 0 3040 5 0 5 5 0 8 0 lockfpl 104 88 0 87 2 1 1 1 0 8 0 lockfspl 32 109 0 108 2 1 1 1 0 8 0 sessionpl 112 21 0 10 1 0 1 1 0 8 0 pgrppl 48 29 0 18 1 0 1 1 0 8 0 ucredpl 96 584 0 575 1 0 1 1 0 8 0 zombiepl 144 513 0 513 3 2 1 1 0 8 1 processpl 840 546 0 513 4 0 4 4 0 8 0 procpl 600 1244 0 1199 4 0 4 4 0 8 0 srpgc 64 18 0 18 2 2 0 1 0 8 0 sosppl 128 6 0 6 1 1 0 1 0 8 0 sockpl 384 428 0 407 3 0 3 3 0 8 0 mcl64k 65536 229 0 0 29 0 29 29 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 4 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 132 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 347 0 0 18 0 18 18 0 8 0 bufpl 256 6434 0 1143 331 0 331 331 0 8 0 anonpl 16 75404 0 66684 64 12 52 53 0 125 16 amapchunkpl 152 2849 0 2757 9 4 5 9 0 158 0 amappl16 192 2904 0 2431 52 20 32 36 0 8 8 amappl15 184 183 0 178 1 0 1 1 0 8 0 amappl14 176 165 0 161 3 2 1 1 0 8 0 amappl13 168 27 0 23 1 0 1 1 0 8 0 amappl12 160 16 0 13 2 1 1 1 0 8 0 amappl11 152 87 0 72 1 0 1 1 0 8 0 amappl10 144 104 0 102 1 0 1 1 0 8 0 amappl9 136 593 0 590 1 0 1 1 0 8 0 amappl8 128 158 0 143 1 0 1 1 0 8 0 amappl7 120 40 0 33 1 0 1 1 0 8 0 amappl6 112 116 0 111 1 0 1 1 0 8 0 amappl5 104 125 0 111 1 0 1 1 0 8 0 amappl4 96 751 0 719 2 1 1 2 0 8 0 amappl3 88 266 0 260 1 0 1 1 0 8 0 amappl2 80 3483 0 3420 2 0 2 2 0 8 0 amappl1 72 21314 0 20848 25 15 10 20 0 8 0 amappl 72 1504 0 1466 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 16 0 3 1 0 1 1 0 8 0 uaddrrnd 24 530 0 513 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 530 0 513 1 0 1 1 0 8 0 vmmpekpl 168 8670 0 8648 2 0 2 2 0 8 0 vmmpepl 168 64854 0 63286 99 20 79 80 0 357 10 vmsppl 360 529 0 513 2 0 2 2 0 8 0 pdppl 4096 1068 0 1026 6 0 6 6 0 8 0 pvpl 32 215873 0 203812 153 19 134 137 0 265 35 pmappl 224 529 0 513 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 521 0 5 15 0 15 15 0 8 0