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(10,35,1) at malloc+0x855 sys/kern/kern_malloc.c:294 ip6_setmoptions(9,fffff6006fc4d9f8,fffff6006fa25c00,0) at ip6_setmoptions+0x8f sys/netinet6/ip6_output.c:-1 sosetopt(ffff80000162e900,29,9,fffff6006fa25c00) at sosetopt+0x118 sys/kern/uipc_socket.c:-1 sys_setsockopt(ffff80003c42f258,ffff80003c3e1520,ffff80003c3e1470) at sys_setsockopt+0x2ba sys/kern/uipc_syscalls.c:1226 syscall(ffff80003c3e1520) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3e1520) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd877e11d920, count: -6 ddb{1}> show registers rdi 0x6c45a5a8014099c1 rsi 0x4000 __ALIGN_SIZE+0x3000 rbp 0xffff80003c3e12d0 rbx 0x6c45a5a80140d9c1 rdx 0 rcx 0xffff80003c42f258 rax 0xffff80002999dff0 r8 0xfffff6006fa25c00 r9 0 r10 0xa929cbfe83c9eb49 r11 0x722d095a2a56891a r12 0x4000 __ALIGN_SIZE+0x3000 r13 0xffffffff83b03290 kmemstats+0xd40 r14 0xa30c333 __kernel_phys_end+0x670c333 r15 0x6c45a5a8014099c1 rip 0xffffffff82d2bcd5 malloc+0x855 cs 0x8 rflags 0x10202 __ALIGN_SIZE+0xf202 rsp 0xffff80003c3e1210 ss 0x10 malloc+0x855: movq 0x8(%rbx),%r14 ddb{1}> show proc PROC (syz-executor) tid=469164 pid=70389 tcnt=3 stat=onproc flags process=1010 proc=4080000 runpri=32, usrpri=78, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80003c42fcb8 scnt=2 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c42fcb8,0xffff80003c42ed38 process=0xffff800039bcc020 user=0xffff80003c3dc000, vmspace=0xfffff6006d1e53f0 estcpu=28, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 70389 447667 54294 32767 3 0x1010 0x2000 suspend syz-executor *70389 469164 54294 32767 7 0x1010 0x4080000 syz-executor 70389 218696 54294 32767 2 0x1010 0x4080000 syz-executor 64592 72895 76204 32767 3 0x10 0x80 nanoslp syz-executor 64592 350168 76204 32767 3 0x10 0x4000080 sbwait syz-executor 2818 369111 42360 32767 3 0x10 0x80 nanoslp syz-executor 2818 415679 42360 32767 3 0x10 0x4000080 lockf syz-executor 2818 215812 42360 32767 3 0x10 0x4000080 fsleep syz-executor 21626 217093 77266 32767 3 0x10 0x80 nanoslp syz-executor 21626 16712 77266 32767 3 0x10 0x4000080 netacc syz-executor 21626 122188 77266 32767 3 0x10 0x4000080 fsleep syz-executor 31321 345367 18268 32767 3 0x10 0x80 nanoslp syz-executor 31321 31471 18268 32767 3 0x10 0x4000080 sbwait syz-executor 31321 77965 18268 32767 3 0x10 0x4000080 fsleep syz-executor 67561 311762 75528 32767 3 0x10 0x80 nanoslp syz-executor 67561 440276 75528 32767 3 0x10 0x4000080 ttyout syz-executor 67561 336605 75528 32767 3 0x10 0x4000080 fsleep syz-executor 67561 476051 75528 32767 3 0x10 0x4000080 fsleep syz-executor 90889 321800 88872 32767 3 0x10 0x80 nanoslp syz-executor 90889 34093 88872 32767 3 0x10 0x4000080 fsleep syz-executor 90889 130445 88872 32767 3 0x10 0x4000080 pipewr syz-executor 90889 201419 88872 32767 3 0x10 0x4000080 fsleep syz-executor 18268 84013 64692 32767 3 0x10 0x80 nanoslp syz-executor 76204 177116 35885 32767 3 0x10 0x80 nanoslp syz-executor 54294 435916 66438 32767 3 0x10 0x80 nanoslp syz-executor 42360 115520 48521 32767 3 0x10 0x80 nanoslp syz-executor 75528 55895 72751 32767 3 0x10 0x80 nanoslp syz-executor 88872 282415 86321 32767 3 0x10 0x80 nanoslp syz-executor 77266 333067 71927 32767 3 0x10 0x80 nanoslp syz-executor 64692 294224 49603 0 3 0x2 0x80 wait syz-executor 66438 402619 49603 0 3 0x2 0x80 wait syz-executor 35885 265817 49603 0 3 0x2 0x80 wait syz-executor 48521 319043 49603 0 3 0x2 0x80 wait syz-executor 72751 504851 49603 0 3 0x2 0x80 wait syz-executor 86321 523918 49603 0 3 0x2 0x80 wait syz-executor 66357 396436 49603 0 3 0x2 0x80 wait syz-executor 71927 395448 49603 0 3 0x2 0x80 wait syz-executor 49603 254406 81555 0 3 0x2 0x80 kqread syz-executor 81555 332973 70895 0 3 0x100002 0x88 sigsusp ksh 70895 31190 34766 0 3 0x10 0x88 kqread sshd-session 34766 236395 85682 0 3 0x12 0x80 kqread sshd-session 98070 244715 1 0 3 0x100003 0x80 ttyin getty 85682 299607 1 0 3 0 0x88 kqread sshd 6363 14085 87568 73 3 0x1100010 0x80 kqread syslogd 87568 451399 1 0 3 0x100002 0x80 sbwait syslogd 59189 464386 1 0 3 0x100000 0x80 kqread resolvd 41427 413458 90163 77 3 0x100012 0x80 kqread dhcpleased 21798 315845 90163 77 3 0x100012 0x80 kqread dhcpleased 90163 116548 1 0 3 0 0x80 kqread dhcpleased 83076 398535 0 0 3 0x14000 0x200 bored smr 52501 54979 0 0 2 0x14000 0x200 zerothread 30971 503744 0 0 3 0x14000 0x200 aiodoned aiodoned 58623 313763 0 0 3 0x14000 0x200 syncer update 64383 209503 0 0 3 0x14000 0x200 cleaner cleaner 32690 417644 0 0 2 0x14000 0x200 reaper 30788 108052 0 0 3 0x14000 0x200 pgdaemon pagedaemon 50542 425297 0 0 3 0x14000 0x200 bored viomb 58550 320600 0 0 3 0x14000 0x40000200 acpi0 acpi0 39628 27949 0 0 3 0x14000 0x40000200 idle1 31949 111076 0 0 3 0x14000 0x200 bored softnet1 51453 94279 0 0 3 0x14000 0x200 bored softnet0 43386 45454 0 0 3 0x14000 0x200 bored systqmp 59749 19745 0 0 3 0x14000 0x200 bored systq 86208 475238 0 0 3 0x14000 0x200 tmoslp softclockmp 65004 203836 0 0 3 0x14000 0x40000200 tmoslp softclock 95127 521219 0 0 7 0x14000 0x40000200 idle0 1 346636 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 (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 ip6_setmoptions+0x8f sys/netinet6/ip6_output.c:-1 #4 sosetopt+0x118 sys/kern/uipc_socket.c:-1 #5 sys_setsockopt+0x2ba sys/kern/uipc_syscalls.c:1226 #6 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #7 Xsyscall+0x128 Process 70389 (syz-executor) thread 0xffff80003c42f258 (469164) exclusive rwlock netlock r = 0 (0xffffffff838f5680) #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 sosetopt+0xf2 sys/kern/uipc_socket.c:1899 #3 sys_setsockopt+0x2ba sys/kern/uipc_syscalls.c:1226 #4 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #5 Xsyscall+0x128 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 ip6_setmoptions+0x8f sys/netinet6/ip6_output.c:-1 #4 sosetopt+0x118 sys/kern/uipc_socket.c:-1 #5 sys_setsockopt+0x2ba sys/kern/uipc_syscalls.c:1226 #6 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11054 12019K 12034K 166960K 12145 0 pcb 17 12K 12K 166960K 17 0 rtable 241 6K 7K 166960K 351 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 4 1K 9K 166960K 8 0 counters 70 37K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 30 0 iov 0 0K 4K 166960K 3 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1287 81K 81K 166960K 1359 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 4 0K 0K 166960K 4 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 25 93K 125K 166960K 184 0 sigio 1 0K 0K 166960K 1 0 proc 61 115K 147K 166960K 510 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 16 0 in_multi 99 7K 7K 166960K 105 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 373 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 253 160K 177K 166960K 3343 0 UVM aobj 4 2K 2K 166960K 4 0 pinsyscall 46 92K 114K 166960K 1264 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 20 0 NDP 11 0K 2K 166960K 27 0 temp 34 9114K 9130K 166960K 3748 0 kqueue 13 20K 25K 166960K 35 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 36 0 32 1 0 1 1 0 8 0 rtentry 176 113 0 1 6 0 6 6 0 8 0 unpcb 144 88 0 71 1 0 1 1 0 8 0 syncache 336 6 0 6 1 0 1 1 0 8 1 tcpcb 736 61 0 55 4 0 4 4 0 8 3 arp 136 19 0 0 1 0 1 1 0 8 0 inpcb 328 141 0 123 4 0 4 4 0 8 2 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 454 0 0 29 0 29 29 0 8 0 art_table 40 455 0 0 5 0 5 5 0 8 0 art_node 32 113 0 11 1 0 1 1 0 8 0 semapl 72 2 0 0 1 0 1 1 0 8 0 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1624 0 161 92 0 92 92 0 8 0 ffsino 296 1624 0 161 114 0 114 114 0 8 1 nchpl 144 1871 0 179 63 0 63 63 0 8 0 vnodes 216 1705 0 0 95 0 95 95 0 8 0 namei 1024 5572 0 5572 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 6583 0 6583 4 1 3 3 1 8 3 plimitpl 152 45 0 21 2 0 2 2 0 8 1 sigapl 424 475 0 422 7 0 7 7 0 8 0 knotepl 120 108 0 0 4 0 4 4 0 8 0 kqueuepl 224 36 0 25 1 0 1 1 0 8 0 pipepl 344 125 0 97 3 0 3 3 0 8 0 fdescpl 528 459 0 422 4 0 4 4 0 8 0 filepl 160 1751 0 1524 11 0 11 11 0 8 1 lockfpl 104 23 0 18 1 0 1 1 0 8 0 lockfspl 48 10 0 6 1 0 1 1 0 8 0 sessionpl 144 26 0 10 1 0 1 1 0 8 0 pgrppl 48 34 0 10 1 0 1 1 0 8 0 ucredpl 104 182 0 163 1 0 1 1 0 8 0 zombiepl 144 424 0 422 1 0 1 1 0 8 0 processpl 1232 475 0 422 5 0 5 5 0 8 0 procpl 664 564 0 495 7 0 7 7 0 8 0 sockpl 752 265 0 226 7 0 7 7 0 8 2 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 108 0 0 14 0 14 14 0 8 0 mcl2k 2048 20 0 0 3 0 3 3 0 8 0 mextrefs 64 18 0 0 1 0 1 1 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 231 0 0 15 0 15 15 0 8 0 bufpl 272 2406 0 102 154 0 154 154 0 8 0 anonpl 32 5334 0 0 43 0 43 43 0 247 0 amapchunkpl 152 9399 0 8835 29 1 28 28 0 158 4 amappl16 200 1825 0 1802 5 0 5 5 0 8 3 amappl15 192 10 0 9 1 0 1 1 0 8 0 amappl14 184 494 0 493 1 0 1 1 0 8 0 amappl13 176 115 0 105 1 0 1 1 0 8 0 amappl12 168 694 0 658 2 0 2 2 0 8 0 amappl11 160 38 0 38 1 0 1 1 0 8 1 amappl10 152 56 0 46 1 0 1 1 0 8 0 amappl9 144 271 0 271 1 0 1 1 0 8 1 amappl8 136 89 0 88 1 0 1 1 0 8 0 amappl7 128 141 0 130 1 0 1 1 0 8 0 amappl6 120 151 0 150 1 0 1 1 0 8 0 amappl5 112 94 0 87 1 0 1 1 0 8 0 amappl4 104 278 0 264 1 0 1 1 0 8 0 amappl3 96 1661 0 1529 5 1 4 4 0 8 0 amappl2 88 520 0 467 2 0 2 2 0 8 0 amappl1 80 10626 0 10050 16 0 16 16 0 8 1 amappl 88 2655 0 2467 5 0 5 5 0 92 0 uvmvnodes 80 98 0 0 2 0 2 2 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 459 0 422 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 459 0 422 1 0 1 1 0 8 0 vmmpekpl 168 5796 0 5761 2 0 2 2 0 8 0 vmmpepl 168 39382 0 37318 102 0 102 102 0 357 5 vmsppl 488 458 0 422 7 1 6 6 0 8 1 rwobjpl 80 14835 0 13888 24 0 24 24 0 8 2 pdppl 4096 925 0 844 107 16 91 97 0 8 10 pvpl 32 11689 0 0 95 0 95 95 0 265 0 pmappl 256 458 0 422 4 1 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 435 0 19 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(ffffffff8393cff0) 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(ffffffff8393cff0) at sched_idle+0x371 sys/kern/kern_sched.c:192 end trace frame: 0x0, count: -5 ddb{0}> machine ddbcpu 1 Stopped at malloc+0x855: movq 0x8(%rbx),%r14 ddb{1}> trace malloc(10,35,1) at malloc+0x855 sys/kern/kern_malloc.c:294 ip6_setmoptions(9,fffff6006fc4d9f8,fffff6006fa25c00,0) at ip6_setmoptions+0x8f sys/netinet6/ip6_output.c:-1 sosetopt(ffff80000162e900,29,9,fffff6006fa25c00) at sosetopt+0x118 sys/kern/uipc_socket.c:-1 sys_setsockopt(ffff80003c42f258,ffff80003c3e1520,ffff80003c3e1470) at sys_setsockopt+0x2ba sys/kern/uipc_syscalls.c:1226 syscall(ffff80003c3e1520) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3e1520) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd877e11d920, count: -6