kernel: protection fault trap, code=0 Stopped at malloc+0x855: movq 0x8(%rbx),%r14 ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic the kernel did not panic ddb{0}> show kasan No such command ddb{0}> trace malloc(10,62,2) at malloc+0x855 sys/kern/kern_malloc.c:294 amap_alloc1(20,2,0) at amap_alloc1+0x291 sys/uvm/uvm_amap.c:353 amap_alloc(20000,2,0) at amap_alloc+0xad sys/uvm/uvm_amap.c:-1 amap_copy(fffff8006d0913f8,fffff8006d0804a8,2,0,c994cd6e000,c994cd6e001) at amap_copy+0x6ac sys/uvm/uvm_amap.c:567 uvm_fault_check(ffff80003c3ffac0,ffff80003c3ffaf8,ffff80003c3ffb30,0) at uvm_fault_check+0x473 sys/uvm/uvm_fault.c:747 uvm_fault(fffff8006d0913f8,c994cd6e000,0,2) at uvm_fault+0x106 sys/uvm/uvm_fault.c:627 upageflttrap(ffff80003c3ffc60,c994cd6e6e8) at upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:192 usertrap(ffff80003c3ffc60) at usertrap+0x430 sys/arch/amd64/amd64/trap.c:640 recall_trap() at recall_trap+0x8 end trace frame: 0x0, count: -9 ddb{0}> show registers rdi 0x2228be5218d5ff6a rsi 0x6a59b602 rbp 0xffff80003c3ff760 rbx 0x2228be52728c4968 rdx 0 rcx 0xffff80003afed788 rax 0xffffffff8393cff0 cpu_info_full_primary+0x1ff0 r8 0xc994cd6e000 r9 0xc994cd6e001 r10 0 r11 0x7cbe8c6d4d28570f r12 0x6a59b602 r13 0xffffffff83b03dd0 kmemstats+0x1880 r14 0xa30c333 __kernel_phys_end+0x670c333 r15 0x2228be5218d5ff6a rip 0xffffffff82d2bcd5 malloc+0x855 cs 0x8 rflags 0x10202 __ALIGN_SIZE+0xf202 rsp 0xffff80003c3ff6a0 ss 0 malloc+0x855: movq 0x8(%rbx),%r14 ddb{0}> show proc PROC (syz-executor) tid=189012 pid=11986 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=50, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003afecfc0,0xffffffff83b35650 process=0xffff80003a3cc9c0 user=0xffff80003c3fa000, vmspace=0xfffff8006d0913f8 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 11986 399922 23874 32767 7 0x10 0 syz-executor *11986 189012 23874 32767 7 0x10 0x4000000 syz-executor 96025 335965 51409 32767 3 0x10 0x80 nanoslp syz-executor 96025 85022 51409 32767 3 0x10 0x4000080 kqpoll syz-executor 96025 49163 51409 32767 3 0x10 0x4000080 fsleep syz-executor 41451 145449 65706 32767 3 0x10 0x80 nanoslp syz-executor 41451 362523 65706 32767 3 0x10 0x4000080 kqsel syz-executor 41451 447579 65706 32767 3 0x10 0x4000080 fsleep syz-executor 41451 494730 65706 32767 3 0x10 0x4000080 fsleep syz-executor 440 1590 42212 32767 3 0x10 0x80 nanoslp syz-executor 440 108337 42212 32767 3 0x10 0x4000080 nanoslp syz-executor 57262 391521 41195 32767 3 0x10 0x80 nanoslp syz-executor 57262 340104 41195 32767 3 0x10 0x4000080 kqpoll syz-executor 57262 368199 41195 32767 3 0x10 0x4000080 fsleep syz-executor 81668 283711 55240 32767 3 0x10 0x80 nanoslp syz-executor 81668 85000 55240 32767 3 0x10 0x4000080 sbwait syz-executor 81668 179998 55240 32767 3 0x10 0x4000080 fsleep syz-executor 53090 69109 32635 32767 3 0x10 0x80 nanoslp syz-executor 53090 264039 32635 32767 3 0x10 0x4000080 kqread syz-executor 53090 190551 32635 32767 3 0x10 0x4000080 fsleep syz-executor 53090 190034 32635 32767 3 0x10 0x4000080 fsleep syz-executor 32635 421662 37521 32767 3 0x10 0x80 nanoslp syz-executor 51409 325050 55651 32767 3 0x10 0x80 nanoslp syz-executor 41195 508130 60494 32767 3 0x10 0x80 nanoslp syz-executor 42212 92055 69269 32767 3 0x10 0x80 nanoslp syz-executor 65706 324011 88964 32767 3 0x10 0x80 nanoslp syz-executor 23874 411403 71385 32767 3 0x10 0x80 nanoslp syz-executor 37782 66292 22993 32767 3 0x10 0x80 nanoslp syz-executor 55240 496423 90260 32767 3 0x10 0x80 nanoslp syz-executor 71385 504251 14558 0 3 0x2 0x80 wait syz-executor 37521 59026 14558 0 3 0x2 0x80 wait syz-executor 22993 213420 14558 0 3 0x2 0x80 wait syz-executor 60494 75077 14558 0 3 0x2 0x80 wait syz-executor 69269 117246 14558 0 3 0x2 0x80 wait syz-executor 90260 216680 14558 0 3 0x2 0x80 wait syz-executor 55651 101798 14558 0 3 0x2 0x80 wait syz-executor 88964 68725 14558 0 3 0x2 0x80 wait syz-executor 14558 341331 49231 0 3 0x2 0x80 kqread syz-executor 49231 501647 50590 0 3 0x100002 0x88 sigsusp ksh 50590 170328 32854 0 3 0x10 0x88 kqread sshd-session 32854 351941 74358 0 3 0x12 0x80 kqread sshd-session 17704 84919 1 0 3 0x100003 0x80 ttyin getty 74358 148254 1 0 3 0 0x88 kqread sshd 76612 197355 77205 73 3 0x1100010 0x80 kqread syslogd 77205 143369 1 0 3 0x100002 0x80 sbwait syslogd 58392 386805 1 0 3 0x100000 0x80 kqread resolvd 69631 431837 18992 77 3 0x100012 0x80 kqread dhcpleased 54431 255933 18992 77 3 0x100012 0x80 kqread dhcpleased 18992 275595 1 0 3 0 0x80 kqread dhcpleased 38363 191859 0 0 3 0x14000 0x200 bored smr 56475 521251 0 0 3 0x14000 0x200 pgzero zerothread 90495 360911 0 0 3 0x14000 0x200 aiodoned aiodoned 81923 351657 0 0 3 0x14000 0x200 syncer update 61308 276668 0 0 3 0x14000 0x200 cleaner cleaner 69988 134050 0 0 3 0x14000 0x200 reaper reaper 89197 410097 0 0 3 0x14000 0x200 pgdaemon pagedaemon 63291 261298 0 0 3 0x14000 0x200 bored viomb 53525 326908 0 0 3 0x14000 0x40000200 acpi0 acpi0 13194 197871 0 0 3 0x14000 0x40000200 idle1 98616 366748 0 0 3 0x14000 0x200 bored softnet1 33772 285694 0 0 3 0x14000 0x200 bored softnet0 63379 69576 0 0 3 0x14000 0x200 bored systqmp 37653 44428 0 0 3 0x14000 0x200 bored systq 91945 217162 0 0 3 0x14000 0x200 tmoslp softclockmp 66239 348934 0 0 3 0x14000 0x40000200 tmoslp softclock 36526 31666 0 0 3 0x14000 0x40000200 idle0 1 365305 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex /syzkaller/managers/setuid/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff839af2b8) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter+0x4b4 sys/kern/kern_lock.c:487 #2 malloc+0x2ef sys/kern/kern_malloc.c:200 #3 amap_alloc1+0x291 sys/uvm/uvm_amap.c:353 #4 amap_alloc+0xad sys/uvm/uvm_amap.c:-1 #5 amap_copy+0x6ac sys/uvm/uvm_amap.c:567 #6 uvm_fault_check+0x473 sys/uvm/uvm_fault.c:747 #7 uvm_fault+0x106 sys/uvm/uvm_fault.c:627 #8 upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:192 #9 usertrap+0x430 sys/arch/amd64/amd64/trap.c:640 #10 recall_trap+0x8 Process 11986 (syz-executor) thread 0xffff80003afed788 (189012) exclusive rwlock vmmaplk r = 0 (0xfffff8006d0914f8) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 vm_map_lock_ln+0x12e sys/uvm/uvm_map.c:5170 #3 uvmfault_lookup+0xe8 sys/uvm/uvm_fault.c:1874 #4 uvm_fault_check+0x37c sys/uvm/uvm_fault.c:693 #5 uvm_fault+0x106 sys/uvm/uvm_fault.c:627 #6 upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:192 #7 usertrap+0x430 sys/arch/amd64/amd64/trap.c:640 #8 recall_trap+0x8 exclusive mutex /syzkaller/managers/setuid/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff839af2b8) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter+0x4b4 sys/kern/kern_lock.c:487 #2 malloc+0x2ef sys/kern/kern_malloc.c:200 #3 amap_alloc1+0x291 sys/uvm/uvm_amap.c:353 #4 amap_alloc+0xad sys/uvm/uvm_amap.c:-1 #5 amap_copy+0x6ac sys/uvm/uvm_amap.c:567 #6 uvm_fault_check+0x473 sys/uvm/uvm_fault.c:747 #7 uvm_fault+0x106 sys/uvm/uvm_fault.c:627 #8 upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:192 #9 usertrap+0x430 sys/arch/amd64/amd64/trap.c:640 #10 recall_trap+0x8 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11052 12018K 12034K 166960K 12143 0 pcb 17 12K 12K 166960K 17 0 rtable 243 6K 7K 166960K 353 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 2 1K 9K 166960K 7 0 counters 70 37K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 31 0 iov 0 0K 5K 166960K 7 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1288 81K 81K 166960K 1386 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 9 0K 0K 166960K 10 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 26 97K 117K 166960K 234 0 sigio 0 0K 0K 166960K 1 0 proc 58 99K 163K 166960K 503 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 20 0 in_multi 99 7K 7K 166960K 101 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 6 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 367 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 269 169K 178K 166960K 3800 0 UVM aobj 5 2K 2K 166960K 5 0 pinsyscall 47 94K 112K 166960K 1304 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 9 0 NDP 11 0K 2K 166960K 27 0 temp 39 9118K 9178K 166960K 3835 0 kqueue 15 24K 26K 166960K 48 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 28 0 0 1 0 1 1 0 8 0 rtpcb 120 37 0 34 1 0 1 1 0 8 0 rtentry 176 114 0 1 6 0 6 6 0 8 0 unpcb 144 89 0 71 1 0 1 1 0 8 0 syncache 336 6 0 6 1 0 1 1 0 8 1 tcpcb 736 38 0 32 1 0 1 1 0 8 0 arp 136 18 0 0 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 0 1 0 1 1 0 8 0 inpcb 328 198 0 183 7 0 7 7 0 8 5 ip6q 72 1 0 1 1 0 1 1 0 8 1 ip6af 40 2 0 2 1 0 1 1 0 8 1 nd6 152 27 0 0 2 0 2 2 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 471 0 0 30 0 30 30 0 8 0 art_table 40 472 0 0 5 0 5 5 0 8 0 art_node 32 114 0 11 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 3 1 0 1 1 0 8 1 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 72 7 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1720 0 259 92 0 92 92 0 8 0 ffsino 296 1720 0 259 113 0 113 113 0 8 0 nchpl 144 2041 0 349 63 0 63 63 0 8 0 vnodes 216 1801 0 0 101 0 101 101 0 8 0 namei 1024 6293 0 6293 2 0 2 2 0 8 2 percpumem 16 51 0 0 1 0 1 1 0 8 0 kstatmem 264 25 0 0 2 0 2 2 0 8 0 scxspl 216 7023 0 7023 4 3 1 3 1 8 1 plimitpl 152 51 0 24 2 0 2 2 0 8 0 sigapl 424 523 0 469 7 0 7 7 0 8 0 knotepl 120 319 0 0 10 0 10 10 0 8 0 kqueuepl 224 47 0 33 1 0 1 1 0 8 0 pipepl 344 125 0 98 3 0 3 3 0 8 0 fdescpl 528 507 0 469 3 0 3 3 0 8 0 filepl 160 2074 0 1854 12 0 12 12 0 8 1 lockfpl 104 31 0 29 1 0 1 1 0 8 0 lockfspl 48 13 0 11 1 0 1 1 0 8 0 sessionpl 144 29 0 13 1 0 1 1 0 8 0 pgrppl 48 38 0 14 1 0 1 1 0 8 0 ucredpl 104 320 0 301 1 0 1 1 0 8 0 zombiepl 144 470 0 469 1 0 1 1 0 8 0 processpl 1232 523 0 469 5 0 5 5 0 8 0 procpl 664 694 0 626 7 0 7 7 0 8 1 sosppl 176 2 0 2 1 0 1 1 0 8 1 sockpl 752 324 0 288 10 0 10 10 0 8 6 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 131 0 0 17 0 17 17 0 8 0 mcl2k 2048 22 0 0 3 0 3 3 0 8 0 mextrefs 64 17 0 0 1 0 1 1 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 214 0 0 14 0 14 14 0 8 0 bufpl 272 2474 0 102 159 0 159 159 0 8 0 anonpl 32 7486 0 0 61 0 61 61 0 247 0 amapchunkpl 152 10518 0 9902 26 0 26 26 0 158 2 amappl16 200 1187 0 1161 14 3 11 14 0 8 8 amappl15 192 3 0 3 2 2 0 1 0 8 0 amappl14 184 403 0 402 1 0 1 1 0 8 0 amappl13 176 132 0 122 1 0 1 1 0 8 0 amappl12 168 734 0 697 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 56 0 46 1 0 1 1 0 8 0 amappl9 144 269 0 269 1 1 0 1 0 8 0 amappl8 136 93 0 92 1 0 1 1 0 8 0 amappl7 128 133 0 122 1 0 1 1 0 8 0 amappl6 120 150 0 149 1 0 1 1 0 8 0 amappl5 112 89 0 81 1 0 1 1 0 8 0 amappl4 104 254 0 238 1 0 1 1 0 8 0 amappl3 96 2002 0 1858 5 1 4 4 0 8 0 amappl2 88 512 0 456 2 0 2 2 0 8 0 amappl1 80 10444 0 9863 14 0 14 14 0 8 0 amappl 88 3128 0 2924 5 0 5 5 0 92 0 uvmvnodes 80 99 0 0 3 0 3 3 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 507 0 469 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 507 0 469 1 0 1 1 0 8 0 vmmpekpl 168 5933 0 5902 2 0 2 2 0 8 0 vmmpepl 168 40510 0 38371 103 0 103 103 0 357 9 vmsppl 488 506 0 469 7 1 6 6 0 8 1 rwobjpl 80 14334 0 13354 25 0 25 25 0 8 2 pdppl 4096 1021 0 938 105 22 83 93 0 8 0 pvpl 32 13742 0 0 112 1 111 112 0 265 0 pmappl 256 506 0 469 4 1 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 438 0 25 12 0 12 12 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace malloc(10,62,2) at malloc+0x855 sys/kern/kern_malloc.c:294 amap_alloc1(20,2,0) at amap_alloc1+0x291 sys/uvm/uvm_amap.c:353 amap_alloc(20000,2,0) at amap_alloc+0xad sys/uvm/uvm_amap.c:-1 amap_copy(fffff8006d0913f8,fffff8006d0804a8,2,0,c994cd6e000,c994cd6e001) at amap_copy+0x6ac sys/uvm/uvm_amap.c:567 uvm_fault_check(ffff80003c3ffac0,ffff80003c3ffaf8,ffff80003c3ffb30,0) at uvm_fault_check+0x473 sys/uvm/uvm_fault.c:747 uvm_fault(fffff8006d0913f8,c994cd6e000,0,2) at uvm_fault+0x106 sys/uvm/uvm_fault.c:627 upageflttrap(ffff80003c3ffc60,c994cd6e6e8) at upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:192 usertrap(ffff80003c3ffc60) at usertrap+0x430 sys/arch/amd64/amd64/trap.c:640 recall_trap() at recall_trap+0x8 end trace frame: 0x0, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff80002999dff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x722989926eb0, count: -3