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 449274 15349 32767 0x10 0 1 syz-executor.0 * 4961 15349 32767 0x10 0x4000000 0K 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(ffffffff81f7bdfb,ffffffff81f325a7,36f,ffffffff81f8b7f3) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b75080,ffff800020bfb888) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bfb888) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b75080,ffffff9c,200000c0,fffffff4) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020bfbb40) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bfbb40) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,1097c21b010) at Xsyscall+0x128 end of kernel end trace frame: 0x10c2e2a4340, 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(ffffffff81f7bdfb,ffffffff81f325a7,36f,ffffffff81f8b7f3) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b75080,ffff800020bfb888) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020bfb888) at namei+0x88b sys/kern/vfs_lookup.c:232 domkdirat(ffff800020b75080,ffffff9c,200000c0,fffffff4) at domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 syscall(ffff800020bfbb40) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bfbb40) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff94,0,2,1097c21b010) at Xsyscall+0x128 end of kernel end trace frame: 0x10c2e2a4340, count: -8 ddb{0}> show registers rdi 0xffffffff8188e157 db_enter+0x17 rsi 0x3ba3 __ALIGN_SIZE+0x2ba3 rbp 0xffff800020bfb630 rbx 0xffff800020bfb6e0 rdx 0x3ba4 __ALIGN_SIZE+0x2ba4 rcx 0xffff800000b4a000 rax 0xffff800000b4a000 r8 0xffffffff81e2f083 kprintf+0x183 r9 0x1 r10 0x25 r11 0x368e19cc1cbdb80a r12 0x3000000008 r13 0xffff800020bfb640 r14 0x100 r15 0x1 rip 0xffffffff8188e158 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bfb620 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=4961 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b752d8,0xffffffff82352f38 process=0xffff800020b3a9e8 user=0xffff800020bf6000, vmspace=0xfffffd807effd708 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 15349 449274 36140 32767 7 0x10 syz-executor.0 *15349 4961 36140 32767 7 0x4000010 syz-executor.0 36140 487844 32652 32767 3 0x90 nanosleep syz-executor.0 32652 87069 64316 0 3 0x82 wait syz-executor.0 855 330832 7963 32767 2 0x490 syz-executor.1 7963 70995 64316 0 3 0x82 wait syz-executor.1 55360 150882 0 0 3 0x14200 bored sosplice 64316 50582 92037 0 3 0x82 thrsleep syz-fuzzer 64316 408687 92037 0 3 0x4000082 thrsleep syz-fuzzer 64316 398878 92037 0 3 0x4000082 thrsleep syz-fuzzer 64316 452431 92037 0 3 0x4000082 thrsleep syz-fuzzer 64316 454769 92037 0 3 0x4000082 thrsleep syz-fuzzer 64316 349483 92037 0 3 0x4000082 thrsleep syz-fuzzer 64316 244206 92037 0 3 0x4000082 thrsleep syz-fuzzer 64316 120619 92037 0 3 0x4000082 thrsleep syz-fuzzer 64316 340002 92037 0 3 0x4000082 kqread syz-fuzzer 64316 511820 92037 0 3 0x4000082 thrsleep syz-fuzzer 92037 136348 76906 0 3 0x10008a pause ksh 76906 201778 23012 0 3 0x92 select sshd 48686 397391 1 0 3 0x100083 ttyin getty 23012 400272 1 0 3 0x80 select sshd 57726 144051 32472 73 3 0x100090 kqread syslogd 32472 108730 1 0 3 0x100082 netio syslogd 58025 8538 1 77 3 0x100090 poll dhclient 17123 352726 1 0 3 0x80 poll dhclient 18503 457616 0 0 2 0x14200 zerothread 30716 387462 0 0 3 0x14200 aiodoned aiodoned 37845 321436 0 0 3 0x14200 syncer update 64980 68961 0 0 3 0x14200 cleaner cleaner 43486 448193 0 0 3 0x14200 reaper reaper 24617 275009 0 0 3 0x14200 pgdaemon pagedaemon 30647 326422 0 0 3 0x14200 bored crynlk 39055 248980 0 0 3 0x14200 bored crypto 64330 171341 0 0 3 0x40014200 acpi0 acpi0 31905 237513 0 0 3 0x40014200 idle1 74008 105994 0 0 3 0x14200 bored softnet 74953 239568 0 0 3 0x14200 bored systqmp 12052 4075 0 0 3 0x14200 bored systq 75938 257276 0 0 3 0x40014200 bored softclock 21870 69531 0 0 3 0x40014200 idle0 4700 254837 0 0 3 0x14200 bored smr 1 59556 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 15349 (syz-executor.0) thread 0xffff800020b75080 (4961) exclusive rrwlock inode r = 0 (0xfffffd80698193c8) 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 (0xffffffff82342968) 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 10942 0 0 pcb 23 9K 11K 78643K 1615 0 0 rtable 97 3K 3K 78643K 2750 0 0 ifaddr 35 11K 12K 78643K 521 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 107 0 0 iov 0 0K 24K 78643K 294 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 3314 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 355 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 456 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 33K 78643K 3375 0 0 sigio 0 0K 0K 78643K 38 0 0 proc 46 50K 70K 78643K 2153 0 0 subproc 68 69634K 69634K 78643K 2754 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 1178 0 0 in_multi 33 2K 2K 78643K 1055 0 0 ether_multi 1 0K 0K 78643K 24 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 729 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 104 22K 31K 78643K 11264 0 0 UVM aobj 130 4K 4K 78643K 130 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 202 0 0 NDP 5 0K 0K 78643K 246 0 0 temp 121 2378K 2450K 78643K 15369 0 0 kqueue 0 0K 0K 78643K 32 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 83 0 79 1 0 1 1 0 8 0 inpcbpl 280 2043 0 2036 1 0 1 1 0 8 0 plimitpl 152 325 0 316 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 752 0 712 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 681 0 677 1 0 1 1 0 8 0 nd6 48 162 0 158 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3517 0 3329 12 0 12 12 0 8 0 art_table 32 3518 0 3329 2 0 2 2 0 8 0 art_node 16 751 0 717 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 6 2 1 1 1 0 8 0 semapl 112 452 0 442 1 0 1 1 0 8 0 shmpl 112 128 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5496 0 3940 52 1 51 51 0 8 0 ffsino 272 5496 0 3940 104 0 104 104 0 8 0 nchpl 144 10052 0 8359 64 1 63 63 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 37486 0 37485 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 28658 0 28658 19 18 1 5 0 8 1 sigapl 432 3308 0 3293 4 2 2 3 0 8 0 futexpl 56 36528 0 36528 1 0 1 1 0 8 1 knotepl 112 2358 0 2339 1 0 1 1 0 8 0 kqueuepl 104 1117 0 1115 1 0 1 1 0 8 0 pipepl 112 2670 0 2651 10 9 1 2 0 8 0 fdescpl 488 3309 0 3293 3 0 3 3 0 8 0 filepl 152 23697 0 23601 12 7 5 7 0 8 1 lockfpl 104 753 0 753 7 6 1 1 0 8 1 lockfspl 32 1362 0 1362 6 5 1 1 0 8 1 sessionpl 112 96 0 86 1 0 1 1 0 8 0 pgrppl 48 131 0 121 1 0 1 1 0 8 0 ucredpl 96 8275 0 8266 1 0 1 1 0 8 0 zombiepl 144 3293 0 3292 2 1 1 1 0 8 0 processpl 840 3325 0 3292 4 0 4 4 0 8 0 procpl 600 9125 0 9082 4 0 4 4 0 8 0 srpgc 64 458 0 458 9 8 1 1 0 8 1 sosppl 128 46 0 46 13 12 1 1 0 8 1 sockpl 384 3698 0 3681 6 3 3 4 0 8 1 mcl64k 65536 11 0 0 2 0 2 2 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 20 0 0 2 0 2 2 0 8 0 mcl8k 8192 13 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 132 0 0 16 1 15 16 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 326 0 0 14 0 14 14 0 8 0 bufpl 256 11404 0 4385 439 0 439 439 0 8 0 anonpl 16 403743 0 397281 103 65 38 43 0 125 4 amapchunkpl 152 23798 0 23715 44 38 6 11 0 158 1 amappl16 192 15843 0 15480 125 100 25 31 0 8 5 amappl15 184 400 0 396 1 0 1 1 0 8 0 amappl14 176 781 0 775 2 1 1 1 0 8 0 amappl13 168 541 0 537 1 0 1 1 0 8 0 amappl12 160 622 0 614 1 0 1 1 0 8 0 amappl11 152 808 0 797 1 0 1 1 0 8 0 amappl10 144 704 0 699 2 1 1 1 0 8 0 amappl9 136 1212 0 1209 1 0 1 1 0 8 0 amappl8 128 937 0 895 2 0 2 2 0 8 0 amappl7 120 620 0 613 1 0 1 1 0 8 0 amappl6 112 730 0 717 1 0 1 1 0 8 0 amappl5 104 625 0 611 1 0 1 1 0 8 0 amappl4 96 3191 0 3159 2 1 1 2 0 8 0 amappl3 88 992 0 986 1 0 1 1 0 8 0 amappl2 80 25580 0 25525 2 0 2 2 0 8 0 amappl1 72 89698 0 89254 23 13 10 19 0 8 0 amappl 72 9955 0 9921 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 129 0 0 3 0 3 3 0 8 0 uaddrrnd 24 3309 0 3293 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3309 0 3293 1 0 1 1 0 8 0 vmmpekpl 168 29729 0 29706 2 0 2 2 0 8 0 vmmpepl 168 386600 0 385155 154 74 80 89 0 357 13 vmsppl 360 3308 0 3293 2 0 2 2 0 8 0 pdppl 4096 6626 0 6586 6 0 6 6 0 8 0 pvpl 32 1066880 0 1057130 255 145 110 118 0 265 22 pmappl 224 3308 0 3293 9 7 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 608 0 4 18 0 18 18 0 8 0