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 spec_open_clone(ffff80002a2828b8) at spec_open_clone+0x333 sys/kern/spec_vnops.c:-1 spec_open(ffff80002a2828b8) at spec_open+0x319 sys/kern/spec_vnops.c:148 VOP_OPEN(fffff0806efd2000,3,fffff080097fd888,ffff80002a21a018) at VOP_OPEN+0x8b sys/kern/vfs_vops.c:138 vn_open(ffff80002a282b08,3,0) at vn_open+0x7a5 sys/kern/vfs_vnops.c:183 doopenat(ffff80002a21a018,ffffff9c,9fc75036565,2,0,0,73c3371e92f7fa33) at doopenat+0x35b sys/kern/vfs_syscalls.c:1163 sys_open(ffff80002a21a018,ffff80002a282dc0,ffff80002a282d10) at sys_open+0x59 sys/kern/vfs_syscalls.c:1065 syscall(ffff80002a282dc0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a282dc0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x786199090440, count: -9 ddb{0}> show registers rdi 0x583baa32f63f899a rsi 0x7fff00007fff rbp 0xffff80002a2827b0 rbx 0x583bd5cdf63ff665 rdx 0 rcx 0xffff80002a21a018 rax 0xffffffff8398cff0 cpu_info_full_primary+0x1ff0 r8 0x40 r9 0xffffffffffffffff r10 0x7635370d659b243b r11 0x212be456363b6567 r12 0x7fff00007fff r13 0xffffffff83b5b4b0 kmemstats+0x1fc0 r14 0xa30c333 __kernel_phys_end+0x670c333 r15 0x583baa32f63f899a rip 0xffffffff82edf7e5 malloc+0x855 cs 0x8 rflags 0x10206 __ALIGN_SIZE+0xf206 rsp 0xffff80002a2826f0 ss 0x10 malloc+0x855: movq 0x8(%rbx),%r14 ddb{0}> show proc PROC (syz-executor) tid=170392 pid=46606 tcnt=1 stat=onproc flags process=2 proc=0 runpri=50, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a21a2b0,0xffffffff83b63870 process=0xffff800045fe6bb8 user=0xffff80002a27d000, vmspace=0xfffff0806ccfc9b8 estcpu=36, cpticks=5, pctcpu=0.0, user=0, sys=5, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND *46606 170392 31114 0 7 0x2 0 syz-executor 13740 305205 29080 32767 2 0x10 0xc80 syz-executor 13740 244649 29080 32767 3 0x10 0x4000080 lockf syz-executor 83004 206024 58817 32767 3 0x10 0x80 piperd syz-executor 20910 513305 61204 32767 3 0x10 0x80 piperd syz-executor 76989 47747 94282 32767 2 0x10 0xc80 syz-executor 84517 293615 49169 32767 2 0x10 0 syz-executor 29080 139059 53963 32767 2 0x10 0xc80 syz-executor 43589 72299 97049 32767 3 0x10 0x80 wait syz-executor 58817 267695 31114 0 3 0x2 0x80 wait syz-executor 61204 298124 31114 0 3 0x2 0x80 wait syz-executor 49169 259827 31114 0 3 0x2 0x80 wait syz-executor 53963 208218 31114 0 3 0x2 0x80 wait syz-executor 94282 445416 31114 0 3 0x2 0x80 wait syz-executor 97049 448391 31114 0 3 0x2 0x80 wait syz-executor 31114 82211 38161 0 3 0x2 0x80 nanoslp syz-executor 38161 341629 17864 0 3 0x100002 0x88 sigsusp ksh 17864 209486 21268 0 3 0x10 0x88 kqread sshd-session 21268 360814 42835 0 3 0x12 0x80 kqread sshd-session 21688 402277 1 0 3 0x100003 0x80 ttyin getty 42835 212705 1 0 3 0 0x88 kqread sshd 5907 471966 53800 73 7 0x1100010 0 syslogd 53800 396885 1 0 3 0x100002 0x80 sbwait syslogd 67802 350434 1 0 3 0x100000 0x80 kqread resolvd 58676 109366 34280 77 3 0x100012 0x80 kqread dhcpleased 58220 33164 34280 77 3 0x100012 0x80 kqread dhcpleased 34280 447518 1 0 3 0 0x80 kqread dhcpleased 26980 334428 0 0 3 0x14000 0x200 bored smr 95938 414856 0 0 2 0x14000 0x200 zerothread 53841 111843 0 0 3 0x14000 0x200 aiodoned aiodoned 81789 43128 0 0 3 0x14000 0x200 syncer update 59562 274359 0 0 3 0x14000 0x200 cleaner cleaner 7525 213586 0 0 3 0x14000 0x200 reaper reaper 49394 421943 0 0 3 0x14000 0x200 pgdaemon pagedaemon 93100 159077 0 0 3 0x14000 0x200 bored viomb 64401 201963 0 0 3 0x14000 0x40000200 acpi0 acpi0 38853 26057 0 0 3 0x14000 0x40000200 idle1 80888 296953 0 0 3 0x14000 0x200 bored softnet1 67815 80740 0 0 3 0x14000 0x200 bored softnet0 71497 469989 0 0 3 0x14000 0x200 bored systqmp 18840 415163 0 0 3 0x14000 0x200 bored systq 69098 334442 0 0 3 0x14000 0x200 tmoslp softclockmp 78039 215602 0 0 3 0x14000 0x40000200 tmoslp softclock 42876 296391 0 0 3 0x14000 0x40000200 idle0 1 225141 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 (0xffffffff839e03b8) #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 spec_open_clone+0x333 sys/kern/spec_vnops.c:-1 #4 spec_open+0x319 sys/kern/spec_vnops.c:148 #5 VOP_OPEN+0x8b sys/kern/vfs_vops.c:138 #6 vn_open+0x7a5 sys/kern/vfs_vnops.c:183 #7 doopenat+0x35b sys/kern/vfs_syscalls.c:1163 #8 sys_open+0x59 sys/kern/vfs_syscalls.c:1065 #9 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #9 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 #10 Xsyscall+0x128 Process 46606 (syz-executor) thread 0xffff80002a21a018 (170392) exclusive rrwlock inode r = 0 (0xfffff0806efcf7f8) #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 spec_open_clone+0x290 sys/kern/spec_vnops.c:725 #6 spec_open+0x319 sys/kern/spec_vnops.c:148 #7 VOP_OPEN+0x8b sys/kern/vfs_vops.c:138 #8 vn_open+0x7a5 sys/kern/vfs_vnops.c:183 #9 doopenat+0x35b sys/kern/vfs_syscalls.c:1163 #10 sys_open+0x59 sys/kern/vfs_syscalls.c:1065 #11 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #11 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 #12 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a75540) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 doopenat+0x340 sys/kern/vfs_syscalls.c:1163 #2 sys_open+0x59 sys/kern/vfs_syscalls.c:1065 #3 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #3 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 #4 Xsyscall+0x128 exclusive mutex /syzkaller/managers/setuid/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff839e03b8) #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 spec_open_clone+0x333 sys/kern/spec_vnops.c:-1 #4 spec_open+0x319 sys/kern/spec_vnops.c:148 #5 VOP_OPEN+0x8b sys/kern/vfs_vops.c:138 #6 vn_open+0x7a5 sys/kern/vfs_vnops.c:183 #7 doopenat+0x35b sys/kern/vfs_syscalls.c:1163 #8 sys_open+0x59 sys/kern/vfs_syscalls.c:1065 #9 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #9 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 #10 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11042 12013K 12034K 166960K 12139 0 pcb 17 12K 12K 166960K 17 0 rtable 193 5K 7K 166960K 348 0 pf 27 16K 16K 166960K 31 0 ifaddr 34 6K 7K 166960K 44 0 ifgroup 42 1K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 5 0 counters 66 36K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 31 0 iov 0 0K 4K 166960K 4 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1287 81K 81K 166960K 1709 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 12 1K 1K 166960K 13 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 18 65K 121K 166960K 560 0 sigio 0 0K 0K 166960K 3 0 proc 58 99K 147K 166960K 518 0 subproc 61 3K 4K 166960K 412 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 19 0 in_multi 77 5K 6K 166960K 104 0 ether_multi 1 0K 0K 166960K 3 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 49 228K 228K 166960K 49 0 exec 0 0K 1K 166960K 419 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 194 134K 151K 166960K 5593 0 UVM aobj 5 2K 2K 166960K 5 0 pinsyscall 39 78K 111K 166960K 1633 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 4 0 NDP 9 0K 2K 166960K 27 0 temp 28 9121K 9142K 166960K 4636 0 kqueue 13 20K 25K 166960K 51 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 35 0 32 1 0 1 1 0 8 0 rtentry 176 111 0 23 5 0 5 5 0 8 0 unpcb 144 104 0 89 1 0 1 1 0 8 0 syncache 336 9 0 9 1 0 1 1 0 8 1 tcpcb 736 38 0 34 1 0 1 1 0 8 0 arp 136 18 0 4 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 1 1 0 1 1 0 8 0 inpcb 328 143 0 136 1 0 1 1 0 8 0 nd6 152 24 0 6 1 0 1 1 0 8 0 kcovpl 48 45 0 39 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 452 0 88 29 0 29 29 0 8 2 art_table 40 453 0 88 5 0 5 5 0 8 0 art_node 32 111 0 31 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 0 1 1 0 8 1 semapl 72 10 0 0 1 0 1 1 0 8 0 shmpl 120 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1932 0 429 94 0 94 94 0 8 0 ffsino 296 1932 0 429 116 0 116 116 0 8 0 nchpl 144 2448 0 718 65 0 65 65 0 8 0 vnodes 216 2353 0 0 131 0 131 131 0 8 0 namei 1024 7923 0 7923 3 1 2 2 0 8 2 percpumem 16 51 0 2 1 0 1 1 0 8 0 kstatmem 264 25 0 4 2 0 2 2 0 8 0 scxspl 216 8129 0 8129 6 3 3 3 1 8 3 plimitpl 152 115 0 94 1 0 1 1 0 8 0 sigapl 424 774 0 728 7 0 7 7 0 8 0 knotepl 120 301 0 0 10 0 10 10 0 8 0 kqueuepl 224 53 0 44 1 0 1 1 0 8 0 pipepl 344 242 0 215 4 0 4 4 0 8 0 fdescpl 528 758 0 728 3 0 3 3 0 8 0 filepl 160 2624 0 2431 10 0 10 10 0 8 1 lockfpl 104 76 0 71 1 0 1 1 0 8 0 lockfspl 48 27 0 24 1 0 1 1 0 8 0 sessionpl 144 68 0 54 1 0 1 1 0 8 0 pgrppl 48 114 0 93 1 0 1 1 0 8 0 ucredpl 104 239 0 222 1 0 1 1 0 8 0 zombiepl 144 730 0 728 1 0 1 1 0 8 0 processpl 1240 774 0 728 5 0 5 5 0 8 0 procpl 664 1072 0 1025 6 0 6 6 0 8 1 sockpl 752 282 0 257 4 0 4 4 0 8 1 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k128 9344 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 120 0 0 15 0 15 15 0 8 0 mcl2k 2048 17 0 0 3 0 3 3 0 8 0 mextrefs 64 19 0 0 1 0 1 1 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 1219 0 0 77 0 77 77 0 8 0 bufpl 272 2738 0 102 176 0 176 176 0 8 0 anonpl 32 4053 0 0 33 0 33 33 0 247 0 amapchunkpl 152 16562 0 16156 24 0 24 24 0 158 5 amappl16 200 1737 0 1719 5 1 4 5 0 8 1 amappl15 192 21 0 21 1 1 0 1 0 8 0 amappl14 184 419 0 418 1 0 1 1 0 8 0 amappl13 176 107 0 97 1 0 1 1 0 8 0 amappl12 168 994 0 965 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 62 0 52 1 0 1 1 0 8 0 amappl9 144 279 0 279 1 1 0 1 0 8 0 amappl8 136 90 0 89 1 0 1 1 0 8 0 amappl7 128 150 0 139 1 0 1 1 0 8 0 amappl6 120 145 0 144 1 0 1 1 0 8 0 amappl5 112 93 0 86 1 0 1 1 0 8 0 amappl4 104 260 0 246 1 0 1 1 0 8 0 amappl3 96 2923 0 2845 4 1 3 3 0 8 0 amappl2 88 865 0 799 2 0 2 2 0 8 0 amappl1 80 11551 0 11012 14 0 14 14 0 8 0 amappl 88 4862 0 4727 5 0 5 5 0 92 0 uvmvnodes 80 105 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 758 0 728 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 758 0 728 1 0 1 1 0 8 0 vmmpekpl 168 8254 0 8203 3 0 3 3 0 8 0 vmmpepl 168 54936 0 53223 94 0 94 94 0 357 8 vmsppl 488 757 0 728 7 1 6 6 0 8 0 rwobjpl 80 16959 0 16083 22 0 22 22 0 8 1 pdppl 4096 1524 0 1456 108 34 74 98 0 8 6 pvpl 32 11579 0 0 94 0 94 94 0 265 0 pmappl 256 757 0 728 4 1 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 522 0 38 14 0 14 14 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 spec_open_clone(ffff80002a2828b8) at spec_open_clone+0x333 sys/kern/spec_vnops.c:-1 spec_open(ffff80002a2828b8) at spec_open+0x319 sys/kern/spec_vnops.c:148 VOP_OPEN(fffff0806efd2000,3,fffff080097fd888,ffff80002a21a018) at VOP_OPEN+0x8b sys/kern/vfs_vops.c:138 vn_open(ffff80002a282b08,3,0) at vn_open+0x7a5 sys/kern/vfs_vnops.c:183 doopenat(ffff80002a21a018,ffffff9c,9fc75036565,2,0,0,73c3371e92f7fa33) at doopenat+0x35b sys/kern/vfs_syscalls.c:1163 sys_open(ffff80002a21a018,ffff80002a282dc0,ffff80002a282d10) at sys_open+0x59 sys/kern/vfs_syscalls.c:1065 syscall(ffff80002a282dc0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a282dc0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x786199090440, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff80002998dff0) 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(ffffffff83a74d40) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a74d40) at __mp_lock+0x192 sys/kern/kern_lock.c:173 syscall(ffff80002a2748e0) at syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] syscall(ffff80002a2748e0) at syscall+0xaf4 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76bdc4fbeda0, count: -6