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 249439 35269 32767 0x10 0 0 syz-executor.0 *494654 35269 32767 0x10 0x4000000 1K 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(ffffffff81f7c61c,ffffffff81f2d7dd,36f,ffffffff81f8730a) at __assert+0x2e sys/kern/subr_prf.c:155 unveil_check_final(ffff800020b77c30,ffff800020c54d60) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c54d60) at namei+0x88b sys/kern/vfs_lookup.c:232 vn_open(ffff800020c54d60,40000201,dec) at vn_open+0x157 sys/kern/vfs_vnops.c:103 doopenat(ffff800020b77c30,ffffff9c,200000c0,40000200,fffffffe,ffff800020c54fa0) at doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 syscall(ffff800020c55050) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c55050) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffa8,0,3,a127f3fb010) at Xsyscall+0x128 end of kernel end trace frame: 0xa14ad6befc0, 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(ffff800020b77c30,ffff800020c54d60) at unveil_check_final+0x81d sys/kern/kern_unveil.c:879 namei(ffff800020c54d60) at namei+0x88b sys/kern/vfs_lookup.c:232 vn_open(ffff800020c54d60,40000201,dec) at vn_open+0x157 sys/kern/vfs_vnops.c:103 doopenat(ffff800020b77c30,ffffff9c,200000c0,40000200,fffffffe,ffff800020c54fa0) at doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 syscall(ffff800020c55050) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c55050) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffa8,0,3,a127f3fb010) at Xsyscall+0x128 end of kernel end trace frame: 0xa14ad6befc0, count: -9 ddb{1}> show registers rdi 0xffffffff81266357 db_enter+0x17 rsi 0x3f48 __ALIGN_SIZE+0x2f48 rbp 0xffff800020c549a0 rbx 0xffff800020c54a50 rdx 0x3f49 __ALIGN_SIZE+0x2f49 rcx 0xffff80000114a000 rax 0xffff80000114a000 r8 0xffffffff813481d3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x8853b3e69288e53d r12 0x3000000008 r13 0xffff800020c549b0 r14 0x100 r15 0x1 rip 0xffffffff81266358 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c54990 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=494654 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b77780,0xffff800020b74730 process=0xffff800020b3a010 user=0xffff800020c50000, vmspace=0xfffffd806e92c710 estcpu=36, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 44160 272270 70292 32767 2 0x10 syz-executor.1 44160 61989 70292 32767 3 0x4000010 biowait syz-executor.1 35269 249439 90583 32767 7 0x10 syz-executor.0 *35269 494654 90583 32767 7 0x4000010 syz-executor.0 35269 517788 90583 32767 3 0x4000090 fsleep syz-executor.0 35269 386664 90583 32767 3 0x4000090 fsleep syz-executor.0 35269 70422 90583 32767 3 0x4000090 fsleep syz-executor.0 90583 190689 98628 32767 3 0x90 nanosleep syz-executor.0 98628 443097 10092 0 3 0x82 wait syz-executor.0 70292 235634 61850 32767 3 0x90 nanosleep syz-executor.1 61850 227477 10092 0 3 0x82 wait syz-executor.1 61065 415601 0 0 3 0x14200 bored sosplice 10092 444654 49344 0 3 0x82 thrsleep syz-fuzzer 10092 98457 49344 0 3 0x4000082 thrsleep syz-fuzzer 10092 102411 49344 0 3 0x4000082 thrsleep syz-fuzzer 10092 174046 49344 0 3 0x4000082 thrsleep syz-fuzzer 10092 273317 49344 0 3 0x4000082 thrsleep syz-fuzzer 10092 147572 49344 0 3 0x4000082 thrsleep syz-fuzzer 10092 170993 49344 0 3 0x4000082 kqread syz-fuzzer 10092 207882 49344 0 3 0x4000082 thrsleep syz-fuzzer 10092 140333 49344 0 3 0x4000082 thrsleep syz-fuzzer 10092 297686 49344 0 3 0x4000082 thrsleep syz-fuzzer 49344 64573 67735 0 3 0x10008a pause ksh 67735 212761 86914 0 3 0x92 select sshd 3845 297627 1 0 3 0x100083 ttyin getty 86914 368420 1 0 3 0x80 select sshd 46526 146229 4107 73 3 0x100090 kqread syslogd 4107 485710 1 0 3 0x100082 netio syslogd 16684 86502 1 77 3 0x100090 poll dhclient 36417 31299 1 0 3 0x80 poll dhclient 10896 185843 0 0 3 0x14200 pgzero zerothread 77329 93577 0 0 3 0x14200 aiodoned aiodoned 23618 55351 0 0 3 0x14200 syncer update 29642 417290 0 0 3 0x14200 cleaner cleaner 13414 347980 0 0 3 0x14200 reaper reaper 418 208418 0 0 3 0x14200 pgdaemon pagedaemon 95822 449478 0 0 3 0x14200 bored crynlk 85742 493540 0 0 3 0x14200 bored crypto 84143 120836 0 0 3 0x40014200 acpi0 acpi0 17089 496463 0 0 3 0x40014200 idle1 12389 202989 0 0 3 0x14200 bored softnet 48255 490580 0 0 3 0x14200 bored systqmp 3576 184448 0 0 3 0x14200 bored systq 18557 156103 0 0 3 0x40014200 bored softclock 98856 141630 0 0 3 0x40014200 idle0 76584 423928 0 0 3 0x14200 bored smr 1 305391 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 44160 (syz-executor.1) thread 0xffff800020b75c38 (61989) exclusive rrwlock inode r = 0 (0xfffffd807da39e68) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_ihash.c:140 #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 ufs_ihashins+0x6d sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x143 sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0x10f sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0x76 sys/kern/vfs_vops.c:449 #8 domkdirat+0x12d sys/kern/vfs_syscalls.c:2881 #9 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd807da39c48) 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 Process 35269 (syz-executor.0) thread 0xffff800020b77c30 (494654) exclusive rrwlock inode r = 0 (0xfffffd807da39098) 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+0x157 sys/kern/vfs_vnops.c:103 #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 rrwlock inode r = 0 (0xfffffd807da394d8) 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 vn_open+0x157 sys/kern/vfs_vnops.c:103 #8 doopenat+0x2ca sys/kern/vfs_syscalls.c:1045 #9 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #10 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 9461 6321K 6321K 78643K 10703 0 0 pcb 23 9K 11K 78643K 818 0 0 rtable 97 3K 3K 78643K 1179 0 0 ifaddr 36 11K 11K 78643K 227 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 56 0 0 iov 0 0K 24K 78643K 136 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 2081 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 25 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 196 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 8 25K 29K 78643K 1456 0 0 sigio 0 0K 0K 78643K 25 0 0 proc 44 50K 66K 78643K 1053 0 0 subproc 68 69634K 69634K 78643K 1122 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 239 0 0 in_multi 33 2K 2K 78643K 417 0 0 ether_multi 1 0K 0K 78643K 13 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 420 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 91 21K 31K 78643K 5424 0 0 UVM aobj 83 4K 4K 78643K 98 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 88 0 0 NDP 5 0K 0K 78643K 102 0 0 temp 121 2378K 2446K 78643K 8172 0 0 kqueue 0 0K 0K 78643K 21 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 35 0 31 1 0 1 1 0 8 0 inpcbpl 280 836 0 829 1 0 1 1 0 8 0 plimitpl 152 146 0 137 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 320 0 280 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 58 0 58 1 1 0 1 0 8 0 tcpcb 544 354 0 350 1 0 1 1 0 8 0 nd6 48 66 0 62 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1479 0 1291 12 0 12 12 0 8 0 art_table 32 1480 0 1291 2 0 2 2 0 8 0 art_node 16 319 0 285 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 192 0 182 1 0 1 1 0 8 0 shmpl 112 96 0 15 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3268 0 1808 48 0 48 48 0 8 0 ffsino 272 3268 0 1808 98 0 98 98 0 8 0 nchpl 144 5465 0 3834 63 2 61 61 0 8 0 uvmvnodes 72 3838 0 0 70 0 70 70 0 8 0 vnodes 200 3838 0 0 202 0 202 202 0 8 0 namei 1024 18778 0 18776 4 3 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 15185 0 15184 15 11 4 6 0 8 3 sigapl 432 1533 0 1517 2 0 2 2 0 8 0 futexpl 56 15139 0 15136 1 0 1 1 0 8 0 knotepl 112 1045 0 1026 1 0 1 1 0 8 0 kqueuepl 104 415 0 413 1 0 1 1 0 8 0 pipepl 112 1288 0 1267 8 7 1 2 0 8 0 fdescpl 488 1534 0 1517 3 0 3 3 0 8 0 filepl 152 10671 0 10571 9 4 5 7 0 8 1 lockfpl 104 428 0 427 2 1 1 1 0 8 0 lockfspl 32 854 0 853 2 1 1 1 0 8 0 sessionpl 112 48 0 38 1 0 1 1 0 8 0 pgrppl 48 59 0 49 1 0 1 1 0 8 0 ucredpl 96 3313 0 3304 1 0 1 1 0 8 0 zombiepl 144 1517 0 1517 4 3 1 1 0 8 1 processpl 840 1550 0 1517 4 0 4 4 0 8 0 procpl 600 4207 0 4160 4 0 4 4 0 8 0 srpgc 64 182 0 182 7 6 1 1 0 8 1 sosppl 128 22 0 22 6 6 0 1 0 8 0 sockpl 384 1663 0 1646 4 1 3 4 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 11 0 0 2 0 2 2 0 8 0 mcl9k 9216 5 0 0 1 0 1 1 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 26 0 0 4 1 3 3 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 148 0 0 17 0 17 17 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 230 0 0 11 0 11 11 0 8 0 bufpl 256 8244 0 1225 439 0 439 439 0 8 0 anonpl 16 192189 0 186181 86 47 39 43 0 125 7 amapchunkpl 152 10438 0 10347 29 24 5 11 0 158 1 amappl16 192 7513 0 7144 74 47 27 31 0 8 7 amappl15 184 151 0 147 1 0 1 1 0 8 0 amappl14 176 329 0 323 3 2 1 1 0 8 0 amappl13 168 423 0 416 1 0 1 1 0 8 0 amappl12 160 294 0 290 2 1 1 1 0 8 0 amappl11 152 252 0 241 1 0 1 1 0 8 0 amappl10 144 361 0 358 3 2 1 1 0 8 0 amappl9 136 856 0 850 1 0 1 1 0 8 0 amappl8 128 526 0 499 2 0 2 2 0 8 0 amappl7 120 294 0 287 1 0 1 1 0 8 0 amappl6 112 289 0 282 1 0 1 1 0 8 0 amappl5 104 308 0 295 1 0 1 1 0 8 0 amappl4 96 1635 0 1607 2 1 1 2 0 8 0 amappl3 88 477 0 469 1 0 1 1 0 8 0 amappl2 80 11524 0 11459 3 1 2 2 0 8 0 amappl1 72 46503 0 46034 24 15 9 19 0 8 0 amappl 72 4675 0 4636 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 97 0 15 2 0 2 2 0 8 0 uaddrrnd 24 1534 0 1517 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1534 0 1517 1 0 1 1 0 8 0 vmmpekpl 168 16707 0 16683 2 0 2 2 0 8 0 vmmpepl 168 182494 0 180960 143 57 86 86 0 357 18 vmsppl 360 1533 0 1517 2 0 2 2 0 8 0 pdppl 4096 3076 0 3034 6 0 6 6 0 8 0 pvpl 32 518614 0 508721 204 96 108 115 0 265 20 pmappl 224 1533 0 1517 7 5 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 601 0 6 17 0 17 17 0 8 0