kernel: protection fault trap, code=0 Stopped at malloc+0x855: movq 0x8(%rbx),%r14 ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic the kernel did not panic ddb{1}> show kasan No such command ddb{1}> trace malloc(4,7f,1) at malloc+0x855 sys/kern/kern_malloc.c:294 sys___semctl(ffff80003bbd27f0,ffff80003c3fb280,ffff80003c3fb1d0) at sys___semctl+0x39f sys/kern/sysv_sem.c:396 syscall(ffff80003c3fb280) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3fb280) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1535a8a34b0, count: -4 ddb{1}> show registers rdi 0xffff80002df80000 rsi 0x68 rbp 0xffff80003c3fb070 rbx 0xd86c324531033a40 rdx 0xffff80002df80000 rcx 0x67 rax 0xffffffff813c6074 malloc+0x544 r8 0x7f7fffffc000 r9 0 r10 0x89e42fb1271b04af r11 0xa8743bb163fee2ff r12 0x1000001f2 r13 0xffffffff83a0b330 kmemstats+0x1fc0 r14 0xa30c333 __kernel_phys_end+0x670c333 r15 0xd86c324431033bb2 rip 0xffffffff813c6385 malloc+0x855 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff80003c3fafb0 ss 0x10 malloc+0x855: movq 0x8(%rbx),%r14 ddb{1}> show proc PROC (syz-executor) tid=94095 pid=41691 tcnt=3 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003bbd3250,0xffff80003a7b8fc0 process=0xffff80003bbd5360 user=0xffff80003c3f6000, vmspace=0xfffff5006a9f75d8 estcpu=12, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 52473 59349 29003 32767 2 0x10 0 syz-executor 52473 200516 29003 32767 2 0x10 0x4000000 syz-executor 52473 10597 29003 32767 2 0x10 0x4000000 syz-executor 41691 518649 97352 32767 7 0x10 0 syz-executor *41691 94095 97352 32767 7 0x10 0x4000000 syz-executor 41691 437702 97352 32767 2 0x10 0x4000000 syz-executor 58439 277845 69882 32767 2 0x10 0 syz-executor 58439 83621 69882 32767 2 0x10 0x4000000 syz-executor 48963 469543 38553 32767 2 0x10 0 syz-executor 48963 62544 38553 32767 3 0x10 0x4000080 fsleep syz-executor 4172 138363 90841 32767 2 0x10 0 syz-executor 95508 375336 93308 32767 2 0x10 0 syz-executor 95508 504802 93308 32767 3 0x10 0x4000080 fsleep syz-executor 93308 201777 12062 32767 3 0x10 0x80 nanoslp syz-executor 97352 279095 40199 32767 3 0x10 0x80 nanoslp syz-executor 90841 43320 20900 32767 3 0x10 0x80 nanoslp syz-executor 29003 466022 52925 32767 3 0x10 0x80 nanoslp syz-executor 6791 201630 67386 32767 3 0x10 0x80 nanoslp syz-executor 69882 490253 16141 32767 3 0x10 0x80 nanoslp syz-executor 23240 17192 64416 32767 3 0x10 0x80 nanoslp syz-executor 38553 50490 4974 32767 3 0x10 0x80 nanoslp syz-executor 16141 393619 36679 0 3 0x2 0x80 wait syz-executor 64416 2444 36679 0 3 0x2 0x80 wait syz-executor 52925 166699 36679 0 3 0x2 0x80 wait syz-executor 40199 447222 36679 0 3 0x2 0x80 wait syz-executor 20900 448357 36679 0 3 0x2 0x80 wait syz-executor 12062 459376 36679 0 3 0x2 0x80 wait syz-executor 67386 215180 36679 0 3 0x2 0x80 wait syz-executor 4974 92612 36679 0 3 0x2 0x80 wait syz-executor 36679 112080 20357 0 3 0x2 0x80 kqread syz-executor 20357 287817 59195 0 3 0x100002 0x88 sigsusp ksh 59195 183453 47207 0 3 0x10 0x88 kqread sshd-session 47207 90284 86897 0 3 0x12 0x80 kqread sshd-session 70467 220160 1 0 3 0x100003 0x80 ttyin getty 86897 158199 1 0 3 0 0x88 kqread sshd 17835 524112 75097 73 3 0x1100010 0x80 kqread syslogd 75097 361707 1 0 3 0x100002 0x80 sbwait syslogd 75860 142338 1 0 3 0x100000 0x80 kqread resolvd 61057 227216 34183 77 3 0x100012 0x80 kqread dhcpleased 70702 209167 34183 77 3 0x100012 0x80 kqread dhcpleased 34183 155575 1 0 3 0 0x80 kqread dhcpleased 39728 130845 0 0 3 0x14000 0x200 bored smr 48211 132534 0 0 2 0x14000 0x200 zerothread 72279 146964 0 0 3 0x14000 0x200 aiodoned aiodoned 4255 380017 0 0 3 0x14000 0x200 syncer update 31723 296054 0 0 3 0x14000 0x200 cleaner cleaner 84660 90236 0 0 3 0x14000 0x200 reaper reaper 32090 81428 0 0 3 0x14000 0x200 pgdaemon pagedaemon 28627 319668 0 0 3 0x14000 0x200 bored viomb 69618 462941 0 0 3 0x14000 0x40000200 acpi0 acpi0 62620 58809 0 0 3 0x14000 0x40000200 idle1 73845 508924 0 0 3 0x14000 0x200 bored softnet1 53820 387848 0 0 3 0x14000 0x200 bored softnet0 1001 450004 0 0 3 0x14000 0x200 bored systqmp 61911 182707 0 0 3 0x14000 0x200 bored systq 98460 336353 0 0 3 0x14000 0x200 tmoslp softclockmp 47575 512781 0 0 3 0x14000 0x40000200 tmoslp softclock 43878 444831 0 0 3 0x14000 0x40000200 idle0 1 478048 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive mutex /syzkaller/managers/setuid/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff838e4b38) #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 sys___semctl+0x39f sys/kern/sysv_sem.c:396 #4 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #5 Xsyscall+0x128 Process 41691 (syz-executor) thread 0xffff80003bbd27f0 (94095) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a04b40) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] #1 syscall+0xaf4 sys/arch/amd64/amd64/trap.c:783 #2 Xsyscall+0x128 exclusive mutex /syzkaller/managers/setuid/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff838e4b38) #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 sys___semctl+0x39f sys/kern/sysv_sem.c:396 #4 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #5 Xsyscall+0x128 ddb{1}> 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 239 6K 7K 166960K 422 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 5 0 counters 70 37K 37K 166960K 70 0 ioctlops 0 0K 4K 166960K 33 0 iov 0 0K 12K 166960K 4 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1287 81K 81K 166960K 1354 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 4 0K 0K 166960K 4 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 26 97K 129K 166960K 194 0 sigio 0 0K 0K 166960K 67 0 proc 58 99K 163K 166960K 499 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 0 0K 0K 166960K 4 0 in_multi 99 7K 7K 166960K 101 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 2 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 370 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 246 152K 160K 166960K 3383 0 UVM aobj 5 2K 2K 166960K 6 0 pinsyscall 47 94K 113K 166960K 1297 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 11 0K 2K 166960K 27 0 temp 35 9118K 9122K 166960K 3846 0 kqueue 16 22K 29K 166960K 39 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> 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 125 0 108 4 0 4 4 0 8 3 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 25 0 20 1 0 1 1 0 8 0 arp 136 18 0 0 1 0 1 1 0 8 0 inpcb 328 129 0 118 4 0 4 4 0 8 3 nd6 152 25 0 0 1 0 1 1 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 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 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semapl 72 2 0 0 1 0 1 1 0 8 0 shmpl 112 3 0 1 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1642 0 177 92 0 92 92 0 8 0 ffsino 296 1642 0 177 113 0 113 113 0 8 0 nchpl 144 1903 0 208 63 0 63 63 0 8 0 vnodes 216 1723 0 0 96 0 96 96 0 8 0 namei 1024 5643 0 5643 1 0 1 1 0 8 1 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 6513 0 6513 3 2 1 2 1 8 1 plimitpl 152 41 0 17 2 0 2 2 0 8 1 sigapl 424 493 0 439 7 0 7 7 0 8 0 knotepl 120 324 0 0 10 0 10 10 0 8 0 kqueuepl 224 37 0 26 2 0 2 2 0 8 1 pipepl 344 124 0 97 3 0 3 3 0 8 0 fdescpl 528 477 0 439 4 0 4 4 0 8 0 filepl 160 1825 0 1607 14 0 14 14 0 8 4 lockfpl 104 22 0 20 1 0 1 1 0 8 0 lockfspl 48 11 0 9 1 0 1 1 0 8 0 sessionpl 144 26 0 10 1 0 1 1 0 8 0 pgrppl 48 37 0 13 1 0 1 1 0 8 0 ucredpl 104 161 0 142 1 0 1 1 0 8 0 zombiepl 144 441 0 439 1 0 1 1 0 8 0 processpl 1232 493 0 439 5 0 5 5 0 8 0 procpl 664 594 0 533 6 0 6 6 0 8 0 sosppl 176 1 0 1 1 0 1 1 0 8 1 sockpl 752 298 0 267 13 0 13 13 0 8 9 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 114 0 0 15 0 15 15 0 8 0 mcl2k 2048 19 0 0 3 0 3 3 0 8 0 mextrefs 64 20 0 0 1 0 1 1 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 284 0 0 18 0 18 18 0 8 0 bufpl 272 2292 0 102 146 0 146 146 0 8 0 anonpl 32 7493 0 0 61 0 61 61 0 247 0 amapchunkpl 152 9641 0 9090 24 0 24 24 0 158 1 amappl16 200 2131 0 2107 14 0 14 14 0 8 12 amappl15 192 62 0 61 1 0 1 1 0 8 0 amappl14 184 409 0 408 1 0 1 1 0 8 0 amappl13 176 115 0 105 1 0 1 1 0 8 0 amappl12 168 711 0 675 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 1 0 1 0 8 0 amappl10 152 63 0 52 1 0 1 1 0 8 0 amappl9 144 272 0 272 1 1 0 1 0 8 0 amappl8 136 95 0 94 1 0 1 1 0 8 0 amappl7 128 139 0 128 1 0 1 1 0 8 0 amappl6 120 169 0 168 1 0 1 1 0 8 0 amappl5 112 99 0 91 1 0 1 1 0 8 0 amappl4 104 267 0 251 1 0 1 1 0 8 0 amappl3 96 1781 0 1648 5 1 4 4 0 8 0 amappl2 88 520 0 468 2 0 2 2 0 8 0 amappl1 80 10537 0 9953 15 0 15 15 0 8 1 amappl 88 2682 0 2500 5 0 5 5 0 92 0 uvmvnodes 80 100 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 1 1 0 1 1 0 8 0 uaddrrnd 24 477 0 439 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 477 0 439 1 0 1 1 0 8 0 vmmpekpl 168 5760 0 5732 2 0 2 2 0 8 0 vmmpepl 168 40221 0 38127 106 0 106 106 0 357 12 vmsppl 488 476 0 439 7 1 6 6 0 8 1 rwobjpl 80 15063 0 14111 28 0 28 28 0 8 5 pdppl 4096 961 0 878 117 30 87 99 0 8 4 pvpl 32 14227 0 0 115 0 115 115 0 265 0 pmappl 256 476 0 439 4 1 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 437 0 33 12 0 12 12 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp ddb{0}> trace x86_ipi_db(ffffffff83924ff0) 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 __mp_lock(ffffffff83a04340) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a04340) at __mp_lock+0x192 sys/kern/kern_lock.c:173 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x76d582b8b670, count: -7 ddb{0}> machine ddbcpu 1 Stopped at malloc+0x855: movq 0x8(%rbx),%r14 ddb{1}> trace malloc(4,7f,1) at malloc+0x855 sys/kern/kern_malloc.c:294 sys___semctl(ffff80003bbd27f0,ffff80003c3fb280,ffff80003c3fb1d0) at sys___semctl+0x39f sys/kern/sysv_sem.c:396 syscall(ffff80003c3fb280) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3fb280) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1535a8a34b0, count: -4