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 *404065 81544 32767 0x10 0x4000000 0 syz-executor.1 487542 99137 32767 0x10 0 1 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(ffffffff81f7f998,ffffffff81f30b1c,36f,ffffffff81f8a837) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b67528,ffff800020c17328) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c17328) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b67528,ffffff9c,200000c0,fffffff4) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020c175e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c175e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,b69dddae010) at Xsyscall+0x128 end of kernel end trace frame: 0xb6c2e439610, 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(ffffffff81f7f998,ffffffff81f30b1c,36f,ffffffff81f8a837) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b67528,ffff800020c17328) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c17328) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b67528,ffffff9c,200000c0,fffffff4) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020c175e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c175e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,b69dddae010) at Xsyscall+0x128 end of kernel end trace frame: 0xb6c2e439610, count: -8 ddb{0}> show registers rdi 0xffffffff815e48a7 db_enter+0x17 rsi 0x3864 __ALIGN_SIZE+0x2864 rbp 0xffff800020c170d0 rbx 0xffff800020c17180 rdx 0x3865 __ALIGN_SIZE+0x2865 rcx 0xffff800004358000 rax 0xffff800004358000 r8 0xffffffff81d729c3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x6d690c35fef77bfc r12 0x3000000008 r13 0xffff800020c170e0 r14 0x100 r15 0x1 rip 0xffffffff815e48a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c170c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=404065 stat=onproc flags process=10 proc=4000000 pri=78, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff800020b67078,0xffffffff8235ded8 process=0xffff800020b2a358 user=0xffff800020c12000, vmspace=0xfffffd807effe5a0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 81544 505461 99137 32767 2 0x10 syz-executor.1 *81544 404065 99137 32767 7 0x4000010 syz-executor.1 64630 147245 14035 32767 3 0x90 nanosleep syz-executor.0 64630 223656 14035 32767 3 0x4000090 fifor syz-executor.0 64630 326661 14035 32767 3 0x4000090 fifor syz-executor.0 64630 299161 14035 32767 3 0x4000090 fsleep syz-executor.0 14035 225943 85470 32767 3 0x90 nanosleep syz-executor.0 85470 8859 85271 0 3 0x82 wait syz-executor.0 99137 487542 99405 32767 7 0x10 syz-executor.1 99405 354009 85271 0 3 0x82 wait syz-executor.1 89702 363305 0 0 3 0x14200 bored sosplice 85271 274327 35345 0 3 0x82 thrsleep syz-fuzzer 85271 379177 35345 0 3 0x4000082 nanosleep syz-fuzzer 85271 84302 35345 0 3 0x4000082 thrsleep syz-fuzzer 85271 218108 35345 0 3 0x4000082 thrsleep syz-fuzzer 85271 411257 35345 0 3 0x4000082 thrsleep syz-fuzzer 85271 397311 35345 0 3 0x4000082 kqread syz-fuzzer 85271 62669 35345 0 3 0x4000082 thrsleep syz-fuzzer 85271 510610 35345 0 3 0x4000082 thrsleep syz-fuzzer 85271 409320 35345 0 3 0x4000082 thrsleep syz-fuzzer 85271 417707 35345 0 3 0x4000082 thrsleep syz-fuzzer 35345 325694 97265 0 3 0x10008a pause ksh 97265 418516 72431 0 3 0x92 select sshd 6595 243257 1 0 3 0x100083 ttyin getty 72431 238987 1 0 3 0x80 select sshd 71862 340864 32927 73 3 0x100090 kqread syslogd 32927 285930 1 0 3 0x100082 netio syslogd 71665 323404 1 77 3 0x100090 poll dhclient 64990 322865 1 0 3 0x80 poll dhclient 3366 297795 0 0 3 0x14200 pgzero zerothread 75888 161259 0 0 3 0x14200 aiodoned aiodoned 22037 70109 0 0 3 0x14200 syncer update 69319 521180 0 0 3 0x14200 cleaner cleaner 50472 237528 0 0 3 0x14200 reaper reaper 11244 259153 0 0 3 0x14200 pgdaemon pagedaemon 64977 84445 0 0 3 0x14200 bored crynlk 33383 149080 0 0 3 0x14200 bored crypto 78695 81975 0 0 3 0x40014200 acpi0 acpi0 38116 300761 0 0 3 0x40014200 idle1 94067 108307 0 0 3 0x14200 bored softnet 48455 279864 0 0 3 0x14200 bored systqmp 34839 465018 0 0 3 0x14200 bored systq 14194 85046 0 0 3 0x40014200 bored softclock 58208 145439 0 0 3 0x40014200 idle0 85009 100062 0 0 3 0x14200 bored smr 1 449048 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 81544 (syz-executor.1) thread 0xffff800020b67528 (404065) exclusive rrwlock inode r = 0 (0xfffffd807b542c50) 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 domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 #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 (0xffffffff8236d8b0) 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 9460 6321K 6321K 78643K 10697 0 0 pcb 25 9K 11K 78643K 540 0 0 rtable 97 3K 3K 78643K 1139 0 0 ifaddr 36 11K 11K 78643K 221 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 48 0 0 iov 0 0K 32K 78643K 124 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 75K 78643K 1965 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 23 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 144 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 8 25K 29K 78643K 1009 0 0 sigio 0 0K 0K 78643K 3 0 0 proc 44 50K 70K 78643K 940 0 0 subproc 68 69634K 69634K 78643K 1088 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 126 0 0 in_multi 33 2K 2K 78643K 393 0 0 ether_multi 1 0K 0K 78643K 6 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 348 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 3995 0 0 UVM aobj 70 3K 3K 78643K 84 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 32 0 0 NDP 5 0K 0K 78643K 99 0 0 temp 119 2377K 2443K 78643K 6986 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 34 0 30 1 0 1 1 0 8 0 inpcbpl 280 501 0 494 1 0 1 1 0 8 0 plimitpl 152 127 0 118 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 311 0 271 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 5 0 5 1 1 0 1 0 8 0 tcpcb 544 184 0 180 1 0 1 1 0 8 0 nd6 48 64 0 60 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1448 0 1256 12 0 12 12 0 8 0 art_table 32 1449 0 1256 2 0 2 2 0 8 0 art_node 16 310 0 276 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 5 1 0 1 1 0 8 0 semupl 112 3 0 3 2 2 0 1 0 8 0 semapl 112 141 0 131 1 0 1 1 0 8 0 shmpl 112 82 0 14 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2608 0 1153 47 0 47 47 0 8 0 ffsino 272 2608 0 1153 98 0 98 98 0 8 0 nchpl 144 4109 0 2467 61 0 61 61 0 8 0 uvmvnodes 72 3161 0 0 58 0 58 58 0 8 0 vnodes 200 3161 0 0 167 0 167 167 0 8 0 namei 1024 13767 0 13766 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 11848 0 11848 9 8 1 6 0 8 1 sigapl 432 1089 0 1073 2 0 2 2 0 8 0 futexpl 56 8889 0 8888 1 0 1 1 0 8 0 knotepl 112 860 0 841 1 0 1 1 0 8 0 kqueuepl 104 251 0 249 1 0 1 1 0 8 0 pipepl 112 906 0 887 3 2 1 2 0 8 0 fdescpl 488 1090 0 1073 3 0 3 3 0 8 0 filepl 152 7562 0 7464 9 4 5 7 0 8 0 lockfpl 104 239 0 239 3 2 1 1 0 8 1 lockfspl 32 484 0 484 3 2 1 1 0 8 1 sessionpl 112 47 0 37 1 0 1 1 0 8 0 pgrppl 48 53 0 43 1 0 1 1 0 8 0 ucredpl 96 2353 0 2344 1 0 1 1 0 8 0 zombiepl 144 1073 0 1073 2 1 1 1 0 8 1 processpl 840 1106 0 1073 4 0 4 4 0 8 0 procpl 600 2816 0 2770 5 1 4 5 0 8 0 srpgc 64 176 0 176 3 2 1 1 0 8 1 sosppl 128 32 0 32 6 5 1 1 0 8 1 sockpl 384 1046 0 1027 5 2 3 4 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 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 119 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 189 0 0 11 0 11 11 0 8 0 bufpl 256 7770 0 1122 416 0 416 416 0 8 0 anonpl 16 155703 0 149876 68 27 41 42 0 125 14 amapchunkpl 152 8155 0 8063 25 20 5 9 0 158 0 amappl16 192 5941 0 5601 80 55 25 31 0 8 7 amappl15 184 283 0 277 1 0 1 1 0 8 0 amappl14 176 142 0 138 2 1 1 1 0 8 0 amappl13 168 119 0 116 1 0 1 1 0 8 0 amappl12 160 240 0 238 1 0 1 1 0 8 0 amappl11 152 197 0 183 1 0 1 1 0 8 0 amappl10 144 189 0 186 4 3 1 1 0 8 0 amappl9 136 780 0 777 1 0 1 1 0 8 0 amappl8 128 412 0 388 1 0 1 1 0 8 0 amappl7 120 178 0 171 1 0 1 1 0 8 0 amappl6 112 78 0 73 1 0 1 1 0 8 0 amappl5 104 331 0 319 1 0 1 1 0 8 0 amappl4 96 1275 0 1244 2 1 1 2 0 8 0 amappl3 88 219 0 213 1 0 1 1 0 8 0 amappl2 80 7673 0 7606 2 0 2 2 0 8 0 amappl1 72 35258 0 34786 23 13 10 19 0 8 0 amappl 72 3269 0 3230 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 83 0 14 2 0 2 2 0 8 0 uaddrrnd 24 1090 0 1073 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1090 0 1073 1 0 1 1 0 8 0 vmmpekpl 168 12852 0 12826 2 0 2 2 0 8 0 vmmpepl 168 132668 0 131179 106 30 76 77 0 357 10 vmsppl 360 1089 0 1073 2 0 2 2 0 8 0 pdppl 4096 2188 0 2146 6 0 6 6 0 8 0 pvpl 32 419025 0 409820 148 39 109 114 0 265 27 pmappl 224 1089 0 1073 6 5 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 571 0 3 17 0 17 17 0 8 0