kern.securelevel: 0 -> 1 creating runtime link editor directory cache. preserving editor files. starting network daemons: sshd. starting local daemons:. Tue Mar 19 11:36:51 PDT 2019 OpenBSD/amd64 (ci-openbsd-multicore-8.c.syzkaller.internal) (tty00) Warning: Permanently added '10.128.10.33' (ECDSA) to the list of known hosts. executing program login: witness: lock order reversal: 1st 0xfffffd806e827b60 vmmaplk (&map->lock) @ /syzkaller/managers/multicore/kernel/sys/uvm/uvm_fault.c:1444 2nd 0xfffffd8073bb03d0 inode (&ip->i_lock) @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 lock order "&ip->i_lock"(rrwlock) -> "&map->lock"(rwlock) first seen at: #0 witness_checkorder+0x6cd #1 _rw_enter+0xd5 #2 vm_map_lock_ln+0x164 #3 uvm_map+0x2fb #4 km_alloc+0x1b7 #5 pool_multi_alloc_ni+0xe8 #6 pool_p_alloc+0x74 #7 pool_do_get+0x12b #8 pool_get+0x106 #9 ufsdirhash_build+0x420 #10 ufs_lookup+0x2c1 #11 VOP_LOOKUP+0x67 #12 vfs_lookup+0x556 #13 namei+0x4b2 #14 start_init+0xec #15 proc_trampoline+0x1c lock order "&map->lock"(rwlock) -> "&ip->i_lock"(rrwlock) first seen at: #0 witness_checkorder+0x6cd #1 _rw_enter+0xd5 #2 _rrw_enter+0x60 #3 VOP_LOCK+0x57 #4 vn_lock+0x6e #5 uvn_io+0x2fc #6 uvn_get+0x236 #7 uvm_fault+0x1312 #8 uvm_fault_wire+0x70 #9 uvm_map_pageable_wire+0x31d #10 sys_mlock+0x18b #11 syscall+0x5b8 #12 Xsyscall+0x128 Stopped at db_enter+0x18: addq $0x8,%rsp ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic the kernel did not panic ddb{1}> trace db_enter() at db_enter+0x18 witness_checkorder(fffffd8073bb03d0,9,ffffffff81f2ce1f,60b,0) at witness_checkorder+0x12ff _rw_enter(fffffd8073bb03c0,81,ffffffff81f2ce1f,60b) at _rw_enter+0xd5 _rrw_enter(fffffd8073bb03c0,81,ffffffff81f2ce1f,60b) at _rrw_enter+0x60 VOP_LOCK(fffffd8073ae6008,81) at VOP_LOCK+0x57 vn_lock(fffffd8073ae6008,81) at vn_lock+0x6e uvn_io(fffffd8073b48098,ffff800020bab590,1,2,0) at uvn_io+0x2fc uvn_get(fffffd8073b48098,0,ffff800020bab6b0,ffff800020bab6c4,0,1) at uvn_get+0x236 uvm_fault(fffffd806e827b48,20002000,2,1) at uvm_fault+0x1312 uvm_fault_wire(fffffd806e827b48,20002000,20005000,1) at uvm_fault_wire+0x70 uvm_map_pageable_wire(fffffd806e827b48,fffffd806e56a428,fffffd806e56a818,0,0,0) at uvm_map_pageable_wire+0x31d sys_mlock(ffff800020b752d0,ffff800020baba48,ffff800020baba30) at sys_mlock+0x18b syscall(ffff800020babae0) at syscall+0x5b8 Xsyscall(6,0,7f7fffff4298,0,1,7f7fffff42a8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff4230, count: -14 ddb{1}> show registers rdi 0x3 rsi 0xffffffff822238d0 __sancov_gen_cov_switch_values.127 rbp 0xffff800020bab1c0 rbx 0x3 rdx 0x8b rcx 0x3 rax 0x3 r8 0xffffffff81d720d8 witness_checkorder+0x12d8 r9 0x5 r10 0x7b56694e1de19744 r11 0x4d3783cd6cd52df0 r12 0xffffffff81f2ce1f cmd0646_9_tim_udma+0x23b2f r13 0xfffffd8002693c30 r14 0xffffffff8230db20 w_lodata+0x510a0 r15 0xfffffd800269b890 rip 0xffffffff81ba3af8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bab1b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor7235) pid=400752 stat=onproc flags process=2 proc=0 pri=54, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff800020b74718,0xffffffff823df7d8 process=0xffff800020b2b3c0 user=0xffff800020ba6000, vmspace=0xfffffd806e827b48 estcpu=4, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *54387 400752 63450 0 7 0x2 syz-executor7235 63450 127453 39843 0 3 0x10008a pause ksh 39843 86103 34721 0 3 0x92 select sshd 49123 116605 1 0 3 0x100083 ttyin getty 34721 207715 1 0 3 0x80 select sshd 50258 518786 7910 74 3 0x100092 bpf pflogd 7910 363458 1 0 3 0x80 netio pflogd 14751 123878 71587 73 7 0x100090 syslogd 71587 480979 1 0 3 0x100082 netio syslogd 11947 427775 1 77 3 0x100090 poll dhclient 37525 225656 1 0 3 0x80 poll dhclient 3982 220590 0 0 3 0x14200 pgzero zerothread 29327 448310 0 0 3 0x14200 aiodoned aiodoned 10075 202379 0 0 3 0x14200 syncer update 69551 14202 0 0 3 0x14200 cleaner cleaner 58983 469749 0 0 3 0x14200 reaper reaper 89281 511621 0 0 3 0x14200 pgdaemon pagedaemon 27497 366816 0 0 3 0x14200 bored crynlk 28708 438095 0 0 3 0x14200 bored crypto 95310 285622 0 0 3 0x40014200 acpi0 acpi0 89791 112602 0 0 3 0x40014200 idle1 81836 250870 0 0 3 0x14200 bored softnet 77777 326949 0 0 3 0x14200 bored systqmp 77766 117975 0 0 3 0x14200 bored systq 37694 73629 0 0 3 0x40014200 bored softclock 91718 303493 0 0 3 0x40014200 idle0 68176 47740 0 0 3 0x14200 bored smr 1 105570 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 54387 (syz-executor7235) thread 0xffff800020b752d0 (400752) shared rwlock vmmaplk r = 0 (0xfffffd806e827b60) locked @ /syzkaller/managers/multicore/kernel/sys/uvm/uvm_fault.c:1444 #0 witness_lock+0x594 #1 _rw_enter+0x45d #2 vm_map_lock_ln+0x164 #3 uvm_map_pageable+0x12b #4 sys_mlock+0x18b #5 syscall+0x5b8 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823d7a38) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 #1 syscall+0x48b #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9450 6382K 6383K 78643K 10537 0 0 pcb 25 9K 9K 78643K 57 0 0 rtable 61 2K 2K 78643K 125 0 0 ifaddr 25 7K 7K 78643K 26 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1467 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1167 73K 73K 78643K 1172 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 2 0K 0K 78643K 2 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 1 0K 0K 78643K 1 0 0 proc 52 50K 58K 78643K 279 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 in_multi 11 0K 0K 78643K 11 0 0 ether_multi 1 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 18 79K 79K 78643K 18 0 0 exec 0 0K 1K 78643K 176 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 55 3K 3K 78643K 754 0 0 UVM aobj 2 2K 2K 78643K 2 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 4 0K 0K 78643K 4 0 0 temp 39 2360K 2424K 78643K 1954 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 2 0 0 1 0 1 1 0 8 0 inpcbpl 280 29 0 23 1 0 1 1 0 8 0 plimitpl 152 14 0 8 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 syncache 264 5 0 5 2 1 1 1 0 8 1 tcpcb 544 8 0 5 1 0 1 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 8 0 2 1 0 1 1 0 8 0 pfstkey 112 8 0 2 1 0 1 1 0 8 0 pfstate 328 8 0 2 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 97 0 0 7 0 7 7 0 8 0 art_table 32 98 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1391 0 17 45 0 45 45 0 8 0 ffsino 272 1391 0 17 92 0 92 92 0 8 0 nchpl 144 1564 0 32 57 0 57 57 0 8 0 uvmvnodes 72 1401 0 0 26 0 26 26 0 8 0 vnodes 200 1401 0 0 74 0 74 74 0 8 0 namei 1024 3528 0 3528 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 2430 0 2430 9 8 1 6 0 8 1 sigapl 432 202 0 190 2 0 2 2 0 8 0 knotepl 112 5 0 0 1 0 1 1 0 8 0 kqueuepl 104 1 0 0 1 0 1 1 0 8 0 pipepl 112 128 0 121 3 2 1 1 0 8 0 fdescpl 488 203 0 190 3 0 3 3 0 8 0 filepl 152 947 0 899 2 0 2 2 0 8 0 lockfpl 104 6 0 6 1 1 0 1 0 8 0 lockfspl 32 3 0 3 1 1 0 1 0 8 0 sessionpl 112 18 0 9 1 0 1 1 0 8 0 pgrppl 48 18 0 9 1 0 1 1 0 8 0 ucredpl 96 52 0 43 1 0 1 1 0 8 0 zombiepl 144 190 0 190 3 2 1 1 0 8 1 processpl 840 218 0 190 4 0 4 4 0 8 0 procpl 600 218 0 190 3 0 3 3 0 8 0 sockpl 384 73 0 55 2 0 2 2 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 62 0 0 7 0 7 7 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 82 0 0 5 0 5 5 0 8 0 bufpl 256 2122 0 248 118 0 118 118 0 8 0 anonpl 16 18829 0 17643 9 3 6 7 0 125 1 amapchunkpl 152 550 0 513 2 0 2 2 0 158 0 amappl16 192 100 0 94 1 0 1 1 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 24 0 21 1 0 1 1 0 8 0 amappl13 168 17 0 14 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 204 0 191 1 0 1 1 0 8 0 amappl10 144 53 0 51 1 0 1 1 0 8 0 amappl9 136 216 0 215 1 0 1 1 0 8 0 amappl8 128 95 0 91 1 0 1 1 0 8 0 amappl7 120 20 0 17 1 0 1 1 0 8 0 amappl6 112 45 0 41 1 0 1 1 0 8 0 amappl5 104 146 0 131 1 0 1 1 0 8 0 amappl4 96 305 0 283 1 0 1 1 0 8 0 amappl3 88 110 0 104 1 0 1 1 0 8 0 amappl2 80 640 0 602 1 0 1 1 0 8 0 amappl1 72 13433 0 13018 16 6 10 16 0 8 0 amappl 72 422 0 401 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 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 203 0 190 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 203 0 190 1 0 1 1 0 8 0 vmmpekpl 168 5497 0 5475 2 0 2 2 0 8 0 vmmpepl 168 26583 0 25823 56 19 37 50 0 357 1 vmsppl 360 202 0 190 2 0 2 2 0 8 0 pdppl 4096 414 0 380 6 0 6 6 0 8 0 pvpl 32 79188 0 76184 39 10 29 29 0 265 4 pmappl 224 202 0 190 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 248 0 5 7 0 7 7 0 8 0