login: 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 165307 6908 32767 0x10 0 1 syz-executor.1 * 72882 6908 32767 0x10 0x4000000 0K 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(ffff800020b38978,ffff800020bf32c8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bf32c8) at namei+0x88b sys/kern/vfs_lookup.c:232 dofchownat(ffff800020b38978,ffffff9c,200000c0,0,0,0) at dofchownat+0xcd sys/kern/vfs_syscalls.c:2269 syscall(ffff800020bf3590) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf3590) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff05,0,3,4f22b4d0010) at Xsyscall+0x128 end of kernel end trace frame: 0x4f5230e2370, 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(ffffffff81f7c61c,ffffffff81f2d7dd,36f,ffffffff81f8730a) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b38978,ffff800020bf32c8) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bf32c8) at namei+0x88b sys/kern/vfs_lookup.c:232 dofchownat(ffff800020b38978,ffffff9c,200000c0,0,0,0) at dofchownat+0xcd sys/kern/vfs_syscalls.c:2269 syscall(ffff800020bf3590) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf3590) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff05,0,3,4f22b4d0010) at Xsyscall+0x128 end of kernel end trace frame: 0x4f5230e2370, count: -8 ddb{0}> show registers rdi 0xffffffff81266357 db_enter+0x17 rsi 0x389f __ALIGN_SIZE+0x289f rbp 0xffff800020bf3050 rbx 0xffff800020bf3100 rdx 0x38a0 __ALIGN_SIZE+0x28a0 rcx 0xffff800004153000 rax 0xffff800004153000 r8 0xffffffff813481d3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x73e2855ae0a22eb0 r12 0x3000000008 r13 0xffff800020bf3060 r14 0x100 r15 0x1 rip 0xffffffff81266358 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bf3040 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=72882 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b39080,0xffff800020b38e38 process=0xffff800020b3a010 user=0xffff800020bee000, vmspace=0xfffffd806e9329e0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 54905 131093 61648 32767 2 0x10 syz-executor.0 6908 165307 96075 32767 7 0x10 syz-executor.1 * 6908 72882 96075 32767 7 0x4000010 syz-executor.1 96075 497581 37467 32767 2 0x490 syz-executor.1 37467 442966 85194 0 3 0x82 wait syz-executor.1 61648 471835 92322 32767 3 0x90 nanosleep syz-executor.0 92322 91423 85194 0 3 0x82 wait syz-executor.0 50073 399298 0 0 3 0x14200 bored sosplice 85194 222194 95045 0 3 0x82 thrsleep syz-fuzzer 85194 427494 95045 0 3 0x4000082 thrsleep syz-fuzzer 85194 243217 95045 0 3 0x4000082 thrsleep syz-fuzzer 85194 76032 95045 0 3 0x4000082 thrsleep syz-fuzzer 85194 297555 95045 0 3 0x4000082 thrsleep syz-fuzzer 85194 317429 95045 0 3 0x4000082 kqread syz-fuzzer 85194 485879 95045 0 3 0x4000082 thrsleep syz-fuzzer 85194 432669 95045 0 3 0x4000082 thrsleep syz-fuzzer 85194 104112 95045 0 3 0x4000082 thrsleep syz-fuzzer 85194 328708 95045 0 3 0x4000082 thrsleep syz-fuzzer 95045 206581 93502 0 3 0x10008a pause ksh 93502 457153 48303 0 3 0x92 select sshd 85470 311548 1 0 3 0x100083 ttyin getty 48303 147280 1 0 3 0x80 select sshd 43562 337973 7499 73 3 0x100090 kqread syslogd 7499 272667 1 0 3 0x100082 netio syslogd 47600 376633 1 77 3 0x100090 poll dhclient 52699 330883 1 0 3 0x80 poll dhclient 20501 276993 0 0 3 0x14200 pgzero zerothread 77312 110867 0 0 3 0x14200 aiodoned aiodoned 10997 273118 0 0 3 0x14200 syncer update 17219 61715 0 0 3 0x14200 cleaner cleaner 60940 381818 0 0 3 0x14200 reaper reaper 95321 148859 0 0 3 0x14200 pgdaemon pagedaemon 88374 202927 0 0 3 0x14200 bored crynlk 73340 156862 0 0 3 0x14200 bored crypto 64788 23892 0 0 3 0x40014200 acpi0 acpi0 11505 249444 0 0 3 0x40014200 idle1 36521 479071 0 0 3 0x14200 bored softnet 72164 121315 0 0 3 0x14200 bored systqmp 82283 334538 0 0 3 0x14200 bored systq 75656 461865 0 0 2 0x40014200 softclock 58963 380233 0 0 3 0x40014200 idle0 78825 454799 0 0 3 0x14200 bored smr 1 88009 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 6908 (syz-executor.1) thread 0xffff800020b38978 (72882) 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 9461 6321K 6321K 78643K 10573 0 0 pcb 23 9K 10K 78643K 157 0 0 rtable 97 3K 3K 78643K 329 0 0 ifaddr 34 9K 9K 78643K 65 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 24 0 0 iov 0 0K 12K 78643K 17 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1344 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 11 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 69 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 8 25K 29K 78643K 279 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 44 50K 58K 78643K 365 0 0 subproc 68 69634K 69634K 78643K 238 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 38 0 0 in_multi 33 2K 2K 78643K 103 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 202 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 77 20K 29K 78643K 1636 0 0 UVM aobj 35 3K 3K 78643K 35 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 19 0 0 NDP 7 0K 0K 78643K 24 0 0 temp 105 2374K 2446K 78643K 3804 0 0 kqueue 0 0K 0K 78643K 3 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 9 0 5 1 0 1 1 0 8 0 inpcbpl 280 197 0 190 1 0 1 1 0 8 0 plimitpl 152 36 0 27 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 86 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpcb 544 86 0 82 1 0 1 1 0 8 0 nd6 48 14 0 10 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 389 0 204 12 0 12 12 0 8 0 art_table 32 390 0 204 2 0 2 2 0 8 0 art_node 16 85 0 51 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 63 0 53 1 0 1 1 0 8 0 shmpl 112 33 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1760 0 336 47 0 47 47 0 8 1 ffsino 272 1760 0 336 96 0 96 96 0 8 1 nchpl 144 2344 0 729 61 0 61 61 0 8 0 uvmvnodes 72 1888 0 0 35 0 35 35 0 8 0 vnodes 200 1888 0 0 100 0 100 100 0 8 0 namei 1024 6410 0 6409 3 2 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 6179 0 6179 11 8 3 6 0 8 3 sigapl 432 434 0 418 2 0 2 2 0 8 0 futexpl 56 2916 0 2916 1 0 1 1 0 8 1 knotepl 112 212 0 193 1 0 1 1 0 8 0 kqueuepl 104 53 0 51 1 0 1 1 0 8 0 pipepl 112 330 0 311 3 2 1 1 0 8 0 fdescpl 488 435 0 418 3 0 3 3 0 8 0 filepl 152 2637 0 2540 5 0 5 5 0 8 1 lockfpl 104 44 0 43 2 1 1 1 0 8 0 lockfspl 32 72 0 71 2 1 1 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 31 0 21 1 0 1 1 0 8 0 ucredpl 96 637 0 628 1 0 1 1 0 8 0 zombiepl 144 418 0 418 3 2 1 1 0 8 1 processpl 840 451 0 418 4 0 4 4 0 8 0 procpl 600 958 0 915 4 0 4 4 0 8 0 srpgc 64 30 0 30 1 0 1 1 0 8 1 sosppl 128 7 0 7 2 1 1 1 0 8 1 sockpl 384 350 0 333 3 0 3 3 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 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 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 104 0 0 12 0 12 12 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 144 0 0 9 1 8 8 0 8 0 bufpl 256 6118 0 1122 313 0 313 313 0 8 0 anonpl 16 50084 0 44098 35 3 32 32 0 125 5 amapchunkpl 152 2523 0 2439 9 0 9 9 0 158 5 amappl16 192 1473 0 1134 19 0 19 19 0 8 2 amappl15 184 65 0 61 1 0 1 1 0 8 0 amappl14 176 31 0 28 3 2 1 1 0 8 0 amappl13 168 103 0 100 1 0 1 1 0 8 0 amappl12 160 19 0 17 2 1 1 1 0 8 0 amappl11 152 24 0 13 1 0 1 1 0 8 0 amappl10 144 137 0 134 1 0 1 1 0 8 0 amappl9 136 567 0 564 1 0 1 1 0 8 0 amappl8 128 151 0 136 1 0 1 1 0 8 0 amappl7 120 118 0 113 1 0 1 1 0 8 0 amappl6 112 68 0 56 1 0 1 1 0 8 0 amappl5 104 128 0 117 1 0 1 1 0 8 0 amappl4 96 697 0 670 2 1 1 2 0 8 0 amappl3 88 129 0 124 1 0 1 1 0 8 0 amappl2 80 2601 0 2550 2 0 2 2 0 8 0 amappl1 72 18665 0 18232 23 13 10 19 0 8 0 amappl 72 1211 0 1176 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 34 0 0 1 0 1 1 0 8 0 uaddrrnd 24 435 0 418 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 435 0 418 1 0 1 1 0 8 0 vmmpekpl 168 7589 0 7565 2 0 2 2 0 8 0 vmmpepl 168 54634 0 53224 93 20 73 73 0 357 11 vmsppl 360 434 0 418 2 0 2 2 0 8 0 pdppl 4096 878 0 836 6 0 6 6 0 8 0 pvpl 32 173465 0 164206 117 21 96 102 0 265 16 pmappl 224 434 0 418 3 1 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 461 0 5 14 0 14 14 0 8 0