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(c,1f,9) at malloc+0x855 sys/kern/kern_malloc.c:294 sys_semget(ffff800045fee548,ffff80003c407660,ffff80003c4075b0) at sys_semget+0x37c sys/kern/sysv_sem.c:470 syscall(ffff80003c407660) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c407660) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd707fdea160, count: -4 ddb{1}> show registers rdi 0xffff800030f95000 rsi 0xc5 rbp 0xffff80003c4074d0 rbx 0x3e14cd0a98f843b7 rdx 0xffff800030f95000 rcx 0xc4 rax 0xffffffff8206ebe4 malloc+0x544 r8 0x48 r9 0 r10 0xfdb53bc7a7a4c92f r11 0xc06016bded04e799 r12 0x200000143 r13 0xffffffff83a814f0 kmemstats+0x7c0 r14 0xa30c333 __kernel_phys_end+0x670c333 r15 0x3e14cd0898f842f4 rip 0xffffffff8206eef5 malloc+0x855 cs 0x8 rflags 0x10206 __ALIGN_SIZE+0xf206 rsp 0xffff80003c407410 ss 0x10 malloc+0x855: movq 0x8(%rbx),%r14 ddb{1}> show proc PROC (syz-executor) tid=25608 pid=67423 tcnt=2 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=0xffff800045fefa08,0xffff80003c400038 process=0xffff80003c3cdd00 user=0xffff80003c402000, vmspace=0xfffff4006c2ac9b8 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 50389 286907 72383 32767 2 0x10 0 syz-executor 42938 400107 48197 32767 2 0x10 0 syz-executor 42938 397362 48197 32767 3 0x10 0x4000080 fsleep syz-executor 42938 111730 48197 32767 3 0x10 0x4000080 fsleep syz-executor 67423 269163 16071 32767 2 0x10 0 syz-executor *67423 25608 16071 32767 7 0x10 0x4000000 syz-executor 88838 366477 26000 32767 2 0x10 0 syz-executor 88838 81639 26000 32767 3 0x10 0x4000080 fsleep syz-executor 97289 45212 67379 32767 3 0x10 0x80 nanoslp syz-executor 97289 142836 67379 32767 3 0x10 0x4000080 fsleep syz-executor 97289 339208 67379 32767 3 0x10 0x4000080 ttyin syz-executor 97289 312657 67379 32767 3 0x10 0x4000080 fsleep syz-executor 47105 370499 19933 32767 3 0x10 0x80 nanoslp syz-executor 47105 202441 19933 32767 3 0x10 0x4000080 kqread syz-executor 47105 504415 19933 32767 3 0x10 0x4000080 fsleep syz-executor 72383 490068 76700 32767 3 0x10 0x80 nanoslp syz-executor 19933 126779 9992 32767 3 0x10 0x80 nanoslp syz-executor 16071 462540 36528 32767 3 0x10 0x80 nanoslp syz-executor 63422 274366 7751 32767 2 0x10 0 syz-executor 67379 445516 57037 32767 3 0x10 0x80 nanoslp syz-executor 48197 193008 44476 32767 3 0x10 0x80 nanoslp syz-executor 20113 221660 69103 32767 3 0x10 0x80 nanoslp syz-executor 26000 442520 79948 32767 3 0x10 0x80 nanoslp syz-executor 76700 284414 27793 0 3 0x2 0x80 wait syz-executor 7751 456299 27793 0 3 0x2 0x80 wait syz-executor 9992 380404 27793 0 3 0x2 0x80 wait syz-executor 57037 199506 27793 0 3 0x2 0x80 wait syz-executor 36528 180581 27793 0 3 0x2 0x80 wait syz-executor 44476 99504 27793 0 3 0x2 0x80 wait syz-executor 79948 122749 27793 0 3 0x2 0x80 wait syz-executor 69103 272400 27793 0 3 0x2 0x80 wait syz-executor 27793 506626 77878 0 3 0x2 0x80 kqread syz-executor 77878 517889 58270 0 3 0x100002 0x88 sigsusp ksh 58270 163850 67309 0 3 0x10 0x88 kqread sshd-session 67309 447121 1317 0 3 0x12 0x80 kqread sshd-session 46103 25873 1 0 3 0x100003 0x80 ttyin getty 1317 168097 1 0 3 0 0x88 kqread sshd 84347 345191 69879 73 3 0x1100010 0x80 kqread syslogd 69879 51348 1 0 3 0x100002 0x80 sbwait syslogd 82501 5260 1 0 3 0x100000 0x80 kqread resolvd 31629 488407 87338 77 3 0x100012 0x80 kqread dhcpleased 14594 203005 87338 77 3 0x100012 0x80 kqread dhcpleased 87338 469862 1 0 3 0 0x80 kqread dhcpleased 85402 77697 0 0 3 0x14000 0x200 bored smr 73677 386949 0 0 2 0x14000 0x200 zerothread 73958 227142 0 0 3 0x14000 0x200 aiodoned aiodoned 66283 476301 0 0 3 0x14000 0x200 syncer update 22670 264141 0 0 3 0x14000 0x200 cleaner cleaner 84091 298704 0 0 3 0x14000 0x200 reaper reaper 67874 59914 0 0 3 0x14000 0x200 pgdaemon pagedaemon 93246 491345 0 0 3 0x14000 0x200 bored viomb 23163 6121 0 0 3 0x14000 0x40000200 acpi0 acpi0 16977 268537 0 0 3 0x14000 0x40000200 idle1 58648 223676 0 0 3 0x14000 0x200 bored softnet1 92352 81573 0 0 3 0x14000 0x200 bored softnet0 6538 450453 0 0 3 0x14000 0x200 bored systqmp 79561 455599 0 0 3 0x14000 0x200 bored systq 5911 248575 0 0 3 0x14000 0x200 tmoslp softclockmp 93518 166306 0 0 3 0x14000 0x40000200 tmoslp softclock 52589 245878 0 0 3 0x14000 0x40000200 idle0 1 221320 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 (0xffffffff83965728) #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_semget+0x37c sys/kern/sysv_sem.c:470 #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 67423 (syz-executor) thread 0xffff800045fee548 (25608) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83add8c0) #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 (0xffffffff83965728) #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_semget+0x37c sys/kern/sysv_sem.c:470 #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 11051 12018K 12034K 166960K 12142 0 pcb 17 12K 12K 166960K 17 0 rtable 241 6K 7K 166960K 366 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 32 0 iov 0 0K 8K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1288 81K 81K 166960K 1356 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 5K 166960K 4 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 25 93K 125K 166960K 261 0 sigio 0 0K 0K 166960K 1 0 proc 58 99K 163K 166960K 509 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 30 0 in_multi 99 7K 7K 166960K 102 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 5 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 384 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 252 168K 211K 166960K 4086 0 UVM aobj 10 2K 2K 166960K 13 0 pinsyscall 46 92K 114K 166960K 1401 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 12 0 NDP 11 0K 2K 166960K 27 0 temp 69 9122K 9122K 166960K 4102 0 kqueue 17 26K 28K 166960K 49 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 45 0 42 1 0 1 1 0 8 0 rtentry 176 113 0 1 6 0 6 6 0 8 0 unpcb 144 220 0 203 2 0 2 2 0 8 1 syncache 336 8 0 8 1 0 1 1 0 8 1 tcpcb 736 61 0 56 2 0 2 2 0 8 1 arp 136 18 0 0 1 0 1 1 0 8 0 inpcb 328 182 0 170 2 0 2 2 0 8 0 nd6 152 26 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 483 0 0 31 0 31 31 0 8 0 art_table 40 484 0 0 5 0 5 5 0 8 0 art_node 32 113 0 11 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 72 8 0 0 1 0 1 1 0 8 0 shmpl 112 10 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1721 0 257 92 0 92 92 0 8 0 ffsino 296 1721 0 257 113 0 113 113 0 8 0 nchpl 144 2084 0 389 63 0 63 63 0 8 0 vnodes 216 1802 0 0 101 0 101 101 0 8 0 namei 1024 6581 0 6581 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 7015 0 7015 4 3 1 3 1 8 1 plimitpl 152 60 0 34 2 0 2 2 0 8 1 sigapl 424 568 0 514 7 0 7 7 0 8 0 knotepl 120 557 0 0 17 0 17 17 0 8 0 kqueuepl 224 58 0 46 1 0 1 1 0 8 0 pipepl 344 138 0 111 3 0 3 3 0 8 0 fdescpl 528 552 0 515 4 0 4 4 0 8 0 filepl 160 2275 0 2057 11 0 11 11 0 8 1 lockfpl 104 40 0 38 1 0 1 1 0 8 0 lockfspl 48 17 0 15 1 0 1 1 0 8 0 sessionpl 144 30 0 14 1 0 1 1 0 8 0 pgrppl 48 40 0 16 1 0 1 1 0 8 0 ucredpl 104 251 0 232 1 0 1 1 0 8 0 zombiepl 144 516 0 514 1 0 1 1 0 8 0 processpl 1232 568 0 514 5 0 5 5 0 8 0 procpl 664 772 0 709 6 0 6 6 0 8 0 sockpl 752 450 0 418 5 0 5 5 0 8 0 mcl64k 65536 5 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 119 0 0 15 0 15 15 0 8 0 mcl2k 2048 18 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 250 0 0 16 0 16 16 0 8 0 bufpl 272 2478 0 102 159 0 159 159 0 8 0 anonpl 32 7265 0 0 59 0 59 59 0 247 0 amapchunkpl 152 12157 0 11607 30 0 30 30 0 158 6 amappl16 200 1613 0 1591 5 2 3 5 0 8 1 amappl15 192 2 0 2 1 1 0 1 0 8 0 amappl14 184 413 0 412 1 0 1 1 0 8 0 amappl13 176 124 0 114 1 0 1 1 0 8 0 amappl12 168 796 0 760 2 0 2 2 0 8 0 amappl11 160 2 0 2 1 1 0 1 0 8 0 amappl10 152 57 0 47 1 0 1 1 0 8 0 amappl9 144 270 0 270 1 1 0 1 0 8 0 amappl8 136 108 0 107 1 0 1 1 0 8 0 amappl7 128 145 0 134 1 0 1 1 0 8 0 amappl6 120 150 0 149 1 0 1 1 0 8 0 amappl5 112 117 0 109 1 0 1 1 0 8 0 amappl4 104 282 0 266 1 0 1 1 0 8 0 amappl3 96 2204 0 2076 5 1 4 4 0 8 0 amappl2 88 579 0 525 2 0 2 2 0 8 0 amappl1 80 12208 0 11630 19 0 19 19 0 8 1 amappl 88 3336 0 3149 5 0 5 5 0 92 0 uvmvnodes 80 102 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 12 0 3 1 0 1 1 0 8 0 uaddrrnd 24 552 0 515 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 552 0 515 1 0 1 1 0 8 0 vmmpekpl 168 6816 0 6788 2 0 2 2 0 8 0 vmmpepl 168 46021 0 43958 120 0 120 120 0 357 22 vmsppl 488 551 0 514 7 1 6 6 0 8 0 rwobjpl 80 16653 0 15695 28 0 28 28 0 8 3 pdppl 4096 1111 0 1028 121 28 93 97 0 8 10 pvpl 32 14196 0 0 115 0 115 115 0 265 0 pmappl 256 551 0 514 4 1 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 456 0 31 13 0 13 13 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp ddb{0}> trace x86_ipi_db(ffffffff838f3ff0) 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 mtx_enter(ffffffff83965718) at mtx_enter+0x377 sys/kern/kern_lock.c:454 free(ffff8000016153a0,62,18) at free+0x9f sys/kern/kern_malloc.c:393 amap_free(fffff40064559000) at amap_free+0x1f0 sys/uvm/uvm_amap.c:453 uvm_unmap_detach(ffff80003c40cfc0,0) at uvm_unmap_detach+0x8a sys/uvm/uvm_map.c:1359 uvm_map_teardown(fffff4006c2ac030) at uvm_map_teardown+0x360 sys/uvm/uvm_map.c:2536 exit1(ffff80003c400028,0,0,1) at exit1+0x71b sys/kern/kern_exit.c:260 sys_exit(ffff80003c400028,ffff80003c40d190,ffff80003c40d0e0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003c40d190) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c40d190) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x764fb2a99a90, count: -12 ddb{0}> machine ddbcpu 1 Stopped at malloc+0x855: movq 0x8(%rbx),%r14 ddb{1}> trace malloc(c,1f,9) at malloc+0x855 sys/kern/kern_malloc.c:294 sys_semget(ffff800045fee548,ffff80003c407660,ffff80003c4075b0) at sys_semget+0x37c sys/kern/sysv_sem.c:470 syscall(ffff80003c407660) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c407660) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd707fdea160, count: -4