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,7f,1) at malloc+0x855 sys/kern/kern_malloc.c:294 dofilereadv(ffff800045ffd4c8,3,ffff80002a294bc8,0,ffff80002a294c80) at dofilereadv+0x1f3 sys/kern/sys_generic.c:-1 sys_read(ffff800045ffd4c8,ffff80002a294d30,ffff80002a294c80) at sys_read+0xa2 sys/kern/sys_generic.c:172 syscall(ffff80002a294d30) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a294d30) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72000e9e1190, count: -5 ddb{0}> show registers rdi 0x7bd1d48d63217f6c rsi 0 rbp 0xffff80002a294b10 rbx 0x7bd1d48d63217f6c rdx 0 rcx 0xffff800045ffd4c8 rax 0xffffffff838dfff0 cpu_info_full_primary+0x1ff0 r8 0xffff80002a294c80 r9 0x2 r10 0xd00b0dc37633f3df r11 0xe388e12d6eb45824 r12 0 r13 0xffffffff839f8a60 kmemstats+0x1fc0 r14 0xa30c333 __kernel_phys_end+0x670c333 r15 0x7bd1d48d63217f6c rip 0xffffffff814e7725 malloc+0x855 cs 0x8 rflags 0x10206 __ALIGN_SIZE+0xf206 rsp 0xffff80002a294a50 ss 0x10 malloc+0x855: movq 0x8(%rbx),%r14 ddb{0}> show proc PROC (syz-executor) tid=425775 pid=70183 tcnt=1 stat=onproc flags process=2 proc=0 runpri=24, usrpri=51, slppri=24, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff800045ffca68,0xffff80002a222a80 process=0xffff800045ff21c0 user=0xffff80002a28f000, vmspace=0xffffef006f06e010 estcpu=1, cpticks=11, pctcpu=0.3, user=0, sys=11, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 85542 249472 25623 0 2 0 0 syz-executor 72739 4015 56421 0 2 0x4000000 0 syz-executor 72739 84790 56421 0 3 0x4000000 0x4000080 fsleep syz-executor 82444 389832 23525 0 2 0 0 syz-executor 82444 453642 23525 0 3 0 0x4000080 fsleep syz-executor 65345 152284 34039 0 2 0 0 syz-executor 65345 306482 34039 0 3 0 0x4000080 kqsel syz-executor 65345 387559 34039 0 3 0 0x4000080 fsleep syz-executor 65345 354836 34039 0 3 0 0x4000080 fsleep syz-executor 70723 272650 0 0 3 0x14000 0x200 acct acct 85508 278737 31308 0 2 0 0 syz-executor 85508 472579 31308 0 3 0 0x4000080 fsleep syz-executor 85508 165323 31308 0 3 0 0x4000080 fsleep syz-executor 36699 199307 61563 0 2 0 0xc80 syz-executor 36699 322901 61563 0 3 0 0x4000080 netcon syz-executor 31308 66956 70183 0 2 0x2 0xc80 syz-executor 2587 504162 70183 0 2 0x2 0 syz-executor 23525 37923 70183 0 2 0x2 0xc80 syz-executor 34039 341810 70183 0 3 0x2 0x80 nanoslp syz-executor 61563 12382 70183 0 3 0x2 0x80 nanoslp syz-executor 47800 133963 70183 0 3 0x2 0 biowait syz-executor 25623 372762 70183 0 3 0x2 0x80 nanoslp syz-executor 56421 508026 70183 0 3 0x2 0x80 nanoslp syz-executor *70183 425775 67361 0 7 0x2 0 syz-executor 67361 43584 30537 0 3 0x100002 0x88 sigsusp ksh 30537 406061 46450 0 3 0x10 0x88 kqread sshd-session 46450 394482 31661 0 3 0x12 0x80 kqread sshd-session 77534 487627 1 0 3 0x100003 0x80 ttyin getty 31661 232945 1 0 3 0 0x88 kqread sshd 69659 299264 50757 74 3 0x1100012 0x80 bpf pflogd 50757 522183 1 0 3 0 0x80 sbwait pflogd 94340 182073 84295 73 3 0x1100010 0x80 kqread syslogd 84295 10004 1 0 3 0x100002 0x80 sbwait syslogd 518 65823 1 0 3 0x100000 0x80 kqread resolvd 89484 465276 96286 77 3 0x100012 0x80 kqread dhcpleased 77985 427687 96286 77 3 0x100012 0x80 kqread dhcpleased 96286 479672 1 0 3 0 0x80 kqread dhcpleased 90820 286767 0 0 3 0x14000 0x200 bored smr 15873 358734 0 0 2 0x14000 0x200 zerothread 80332 470012 0 0 3 0x14000 0x200 aiodoned aiodoned 55887 41232 0 0 3 0x14000 0x200 syncer update 59732 194239 0 0 3 0x14000 0x200 cleaner cleaner 48014 494962 0 0 3 0x14000 0x200 reaper reaper 5120 337824 0 0 3 0x14000 0x200 pgdaemon pagedaemon 25247 297845 0 0 3 0x14000 0x200 bored viomb 90011 276701 0 0 3 0x14000 0x40000200 acpi0 acpi0 69151 14301 0 0 7 0x14000 0x40000200 idle1 87090 338042 0 0 3 0x14000 0x200 bored softnet1 78207 36154 0 0 3 0x14000 0x200 bored softnet0 11652 404281 0 0 3 0x14000 0x200 bored systqmp 54673 391390 0 0 3 0x14000 0x200 bored systq 37927 67071 0 0 3 0x14000 0x200 tmoslp softclockmp 25233 245210 0 0 3 0x14000 0x40000200 tmoslp softclock 25126 220962 0 0 3 0x14000 0x40000200 idle0 1 11167 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/multicore/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff838f9e58) #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 dofilereadv+0x1f3 sys/kern/sys_generic.c:-1 #4 sys_read+0xa2 sys/kern/sys_generic.c:172 #5 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #6 Xsyscall+0x128 Process 47800 (syz-executor) thread 0xffff80002a222d08 (133963) exclusive rrwlock inode r = 0 (0xffffef006cc2e568) #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 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 ufs_ihashins+0x4f ufs_ihash sys/ufs/ufs/ufs_ihash.c:-1 [inline] #4 ufs_ihashins+0x4f sys/ufs/ufs/ufs_ihash.c:150 #5 ffs_vget+0x187 sys/ufs/ffs/ffs_vfsops.c:1232 #6 ffs_inode_alloc+0x279 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 #8 VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 #9 domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 #10 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #10 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xffffef006dd7be90) #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 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:576 #5 vfs_lookup+0x12b sys/kern/vfs_lookup.c:431 #6 namei+0x7c5 sys/kern/vfs_lookup.c:250 #7 domkdirat+0x8b sys/kern/vfs_syscalls.c:3048 #8 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11067 12161K 12449K 166960K 12406 0 pcb 17 14K 16K 166960K 44 0 rtable 252 9K 10K 166960K 387 0 pf 40 19K 24K 166960K 85 0 ifaddr 43 7K 7K 166960K 47 0 ifgroup 55 2K 2K 166960K 62 0 sysctl 2 1K 9K 166960K 8 0 counters 70 37K 37K 166960K 74 0 ioctlops 0 0K 4K 166960K 1502 0 iov 0 0K 20K 166960K 7 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1295 81K 82K 166960K 1478 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 8 0K 0K 166960K 8 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 16 57K 110K 166960K 254 0 sigio 0 0K 0K 166960K 1 0 proc 72 115K 164K 166960K 565 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 1 0K 0K 166960K 7 0 in_multi 101 7K 7K 166960K 102 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 400 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 224 167K 181K 166960K 4097 0 UVM aobj 6 2K 2K 166960K 6 0 pinsyscall 41 82K 103K 166960K 1433 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 5 0 NDP 12 0K 2K 166960K 30 0 temp 34 9114K 9122K 166960K 5378 0 kqueue 13 20K 24K 166960K 35 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 43 0 40 1 0 1 1 0 8 0 rtentry 176 112 0 1 6 0 6 6 0 8 0 unpcb 144 79 0 62 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 240 0 232 13 4 9 13 0 8 8 arp 136 18 0 0 1 0 1 1 0 8 0 inpcb 328 358 0 344 12 3 9 12 0 8 7 nd6 152 25 0 0 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1192 1 0 1 1 0 1 1 0 8 1 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pffrag 232 1 0 1 1 0 1 1 0 482 1 pffrnode 88 1 0 1 1 0 1 1 0 8 1 pffrent 40 35 0 35 1 0 1 1 0 8 1 pfosfp 40 1428 0 1428 5 0 5 5 0 8 5 pfosfpen 112 1428 0 1428 21 0 21 21 0 8 21 pfrktable 1344 4 0 1 1 0 1 1 0 8 0 pfanchor 1288 4 0 3 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 320 1 0 0 1 0 1 1 0 8 0 pfstitem 24 29 0 0 1 0 1 1 0 8 0 pfstkey 128 29 0 0 1 0 1 1 0 8 0 pfstate 448 28 0 0 4 0 4 4 0 8 0 pfrule 1360 24 0 16 2 0 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 467 0 0 30 0 30 30 0 8 0 art_table 40 468 0 0 5 0 5 5 0 8 0 art_node 32 112 0 11 1 0 1 1 0 8 0 semapl 72 6 0 0 1 0 1 1 0 8 0 shmpl 112 3 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1799 0 334 93 0 93 93 0 8 0 ffsino 296 1799 0 334 114 0 114 114 0 8 0 nchpl 144 2135 0 440 64 0 64 64 0 8 0 vnodes 216 1941 0 0 108 0 108 108 0 8 0 namei 1024 6835 0 6834 2 0 2 2 0 8 1 percpumem 16 53 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 1 0 0 1 0 1 1 0 8 0 kstatmem 264 31 0 4 2 0 2 2 0 8 0 scxspl 216 6964 0 6963 4 2 2 3 1 8 1 plimitpl 152 113 0 96 1 0 1 1 0 8 0 sigapl 424 574 0 527 7 0 7 7 0 8 1 knotepl 120 155 0 0 5 0 5 5 0 8 0 kqueuepl 224 41 0 30 1 0 1 1 0 8 0 pipepl 344 140 0 112 3 0 3 3 0 8 0 fdescpl 528 557 0 527 3 0 3 3 0 8 0 filepl 160 2581 0 2358 16 0 16 16 0 8 6 lockfpl 104 67 0 64 1 0 1 1 0 8 0 lockfspl 48 31 0 28 1 0 1 1 0 8 0 sessionpl 144 27 0 18 1 0 1 1 0 8 0 pgrppl 48 35 0 18 1 0 1 1 0 8 0 ucredpl 104 305 0 292 1 0 1 1 0 8 0 zombiepl 144 527 0 527 1 0 1 1 0 8 1 processpl 1232 574 0 527 5 0 5 5 0 8 0 procpl 664 760 0 705 6 0 6 6 0 8 0 sockpl 752 484 0 450 17 6 11 17 0 8 7 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 123 0 0 16 0 16 16 0 8 0 mcl2k 2048 20 0 0 3 0 3 3 0 8 0 mextrefs 64 20 0 0 1 0 1 1 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 150 0 0 10 0 10 10 0 8 0 bufpl 272 2438 0 105 156 0 156 156 0 8 0 anonpl 32 5488 0 0 45 0 45 45 0 247 0 amapchunkpl 152 11977 0 11542 27 0 27 27 0 158 7 amappl16 200 1551 0 1525 5 1 4 5 0 8 2 amappl15 192 3 0 3 1 1 0 1 0 8 0 amappl14 184 442 0 441 1 0 1 1 0 8 0 amappl13 176 127 0 115 1 0 1 1 0 8 0 amappl12 168 827 0 799 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 1 0 1 0 8 0 amappl10 152 72 0 58 1 0 1 1 0 8 0 amappl9 144 276 0 276 1 1 0 1 0 8 0 amappl8 136 103 0 101 1 0 1 1 0 8 0 amappl7 128 150 0 137 1 0 1 1 0 8 0 amappl6 120 159 0 158 1 0 1 1 0 8 0 amappl5 112 100 0 88 1 0 1 1 0 8 0 amappl4 104 298 0 279 1 0 1 1 0 8 0 amappl3 96 2194 0 2094 4 0 4 4 0 8 0 amappl2 88 553 0 492 2 0 2 2 0 8 0 amappl1 80 10977 0 10381 14 0 14 14 0 8 1 amappl 88 3333 0 3181 5 0 5 5 0 92 1 uvmvnodes 80 107 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 557 0 527 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 557 0 527 1 0 1 1 0 8 0 vmmpekpl 168 6469 0 6426 3 0 3 3 0 8 0 vmmpepl 168 43953 0 42119 87 0 87 87 0 357 2 vmsppl 488 556 0 527 5 0 5 5 0 8 1 rwobjpl 80 15545 0 14530 23 0 23 23 0 8 0 pdppl 4096 1121 0 1054 103 32 71 85 0 8 4 pvpl 32 12616 0 0 102 0 102 102 0 265 0 pmappl 256 556 0 527 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 446 0 38 12 0 12 12 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace malloc(10,7f,1) at malloc+0x855 sys/kern/kern_malloc.c:294 dofilereadv(ffff800045ffd4c8,3,ffff80002a294bc8,0,ffff80002a294c80) at dofilereadv+0x1f3 sys/kern/sys_generic.c:-1 sys_read(ffff800045ffd4c8,ffff80002a294d30,ffff80002a294c80) at sys_read+0xa2 sys/kern/sys_generic.c:172 syscall(ffff80002a294d30) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a294d30) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72000e9e1190, count: -5 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 acpicpu_idle() at acpicpu_idle+0x457 sys/dev/acpi/acpicpu_x86.c:1224 sched_idle(ffff80002999dff0) at sched_idle+0x371 sys/kern/kern_sched.c:192 end trace frame: 0x0, count: -5