syzbot
uvm_fault: savectx (3)
Status:
upstream: reported on 2025/02/20 07:12
Reported-by: syzbot+a67c3d29b86efeb5eed6@syzkaller.appspotmail.com
First crash: 524d, last: 27m
Sample crash report:
login: uvm_fault(0xfffff1806fbecd60, 0x98, 0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 rip ffffffff81075188 cs 8 rflags 10246 cr2 98 cpl 0 rsp ffff80002a266060
gsbase 0xffff80002999dff0 kgsbase 0x0
panic: trap type 6, code=0, pc=ffffffff81075188
Starting stack trace...
panic(ffffffff834f18e6) at panic+0x1d0 sys/kern/subr_prf.c:229
kerntrap(ffff80002a265fb0) at kerntrap+0x30b
alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b
dovutimens(ffff80002a235a08,fffff1805fb84398,ffff80002a266170) at dovutimens+0x368 sys/kern/vfs_syscalls.c:2691
sys_futimens(ffff80002a235a08,ffff80002a2662c0,ffff80002a266210) at sys_futimens+0xb3 sys/kern/vfs_syscalls.c:2767
syscall(ffff80002a2662c0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a2662c0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x8668ba49320, count: 250
End of stack trace.
WARNING: SPL NOT LOWERED ON SYSCALL 83 -1548412272 EXIT 0 4
Stopped at savectx+0xae: movl $0,%gs:0x688
TID PID UID PRFLAGS PFLAGS CPU COMMAND
76521 10592 0 0 0 0 syz-executor
*376167 94748 0 0 0 1 syz-executor
savectx() at savectx+0xae
end of kernel
end trace frame: 0x71ccff0cc300, count: 14
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
*cpu1: uvm_fault(0xfffff1806fbecd60, 0x98, 0, 1) -> e
ddb{1}> show kasan
No such command
ddb{1}> trace
savectx() at savectx+0xae
end of kernel
end trace frame: 0x71ccff0cc300, count: -1
ddb{1}> show registers
rdi 0
rsi 0
rbp 0xffff80002a248090
rbx 0
rdx 0
rcx 0xffff80002a2347e0
rax 0x3c
r8 0xffff80002a247fc0
r9 0x1
r10 0xeac812e690bf9d8c
r11 0xd548687d6bb8c5ba
r12 0
r13 0
r14 0xffff80002a2347e0
r15 0
rip 0xffffffff8146a3ee savectx+0xae
cs 0x8
rflags 0x46
rsp 0xffff80002a248010
ss 0x10
savectx+0xae: movl $0,%gs:0x688
ddb{1}> show proc
PROC (syz-executor) tid=376167 pid=94748 tcnt=2 stat=onproc
flags process=0 proc=0
runpri=86, usrpri=86, slppri=17, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
forw=0xffffffffffffffff, list=0xffff800033b90a80,0xffff80002a235a18
process=0xffff800045fe84f0 user=0xffff80002a243000, vmspace=0xfffff1806fbecd60
estcpu=36, cpticks=5, pctcpu=0.0, user=4, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND
37666 117483 83057 0 2 0 0 syz-executor
10592 76521 50298 0 7 0 0 syz-executor
10592 271557 50298 0 2 0 0x4000000 syz-executor
*94748 376167 48651 0 7 0 0 syz-executor
94748 416785 48651 0 3 0 0x4000000 sbar syz-executor
10234 280858 919 0 3 0 0x80 nanoslp syz-executor
10234 77172 919 0 3 0 0x4000080 kqsel syz-executor
10234 236043 919 0 3 0 0x4000080 fsleep syz-executor
94247 67057 19627 60929 3 0x10 0x80 nanoslp syz-executor
94247 147258 19627 60929 3 0x10 0x4000080 kqsel syz-executor
94247 167463 19627 60929 3 0x10 0x4000080 fsleep syz-executor
90266 47416 1 0 3 0x100003 0x80 ttyin getty
919 84131 20170 0 3 0x2 0x80 nanoslp syz-executor
50298 318560 20170 0 3 0x2 0x80 nanoslp syz-executor
48651 243409 20170 0 3 0x2 0x80 nanoslp syz-executor
83057 282628 20170 0 3 0x2 0x80 nanoslp syz-executor
5288 454879 20170 0 3 0x2 0x80 nanoslp syz-executor
52968 324765 20170 0 3 0x2 0x80 wait syz-executor
19627 142951 20170 0 3 0x2 0x80 nanoslp syz-executor
85879 33967 20170 0 3 0x2 0x80 nanoslp syz-executor
20170 429614 1 0 3 0x2 0x80 kqread syz-executor
46214 179907 0 0 3 0x14000 0x200 pause smr
18967 496015 0 0 3 0x14000 0x200 pgzero zerothread
97894 488212 0 0 3 0x14000 0x200 aiodoned aiodoned
85415 193497 0 0 3 0x14000 0x200 syncer update
38008 32028 0 0 3 0x14000 0x200 cleaner cleaner
94145 72834 0 0 3 0x14000 0x200 reaper reaper
6467 219885 0 0 3 0x14000 0x200 pgdaemon pagedaemon
51083 24685 0 0 3 0x14000 0x200 bored viomb
74289 373800 0 0 3 0x14000 0x40000200 acpi0 acpi0
80404 397019 0 0 3 0x14000 0x40000200 idle1
37479 143143 0 0 3 0x14000 0x200 bored softnet1
25377 182234 0 0 3 0x14000 0x200 netlock softnet0
28406 340400 0 0 3 0x14000 0x200 smrbar systqmp
76565 355866 0 0 3 0x14000 0x200 bored systq
4644 463900 0 0 3 0x14000 0x200 tmoslp softclockmp
62395 203806 0 0 3 0x14000 0x40000200 tmoslp softclock
53628 435146 0 0 3 0x14000 0x40000200 idle0
1 305582 0 0 3 0x2 0x80 wait init
0 0 -1 0 3 0x10000 0x200 scheduler swapper
ddb{1}> show all locks
Process 94748 (syz-executor) thread 0xffff80002a235a08 (416785)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a907c0)
#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
Process 28406 (systqmp) thread 0xffff800045ffe530 (340400)
shared rwlock systqmp r = 0 (0xffffffff83996d68)
#0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1 taskq_thread+0x12a sys/kern/kern_task.c:442
#2 proc_trampoline+0x10
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 11058 12028K 12514K 166960K 12623 0
pcb 17 13K 14K 166960K 100 0
rtable 235 9K 9K 166960K 411 0
pf 38 18K 26K 166960K 114 0
ifaddr 39 6K 7K 166960K 57 0
ifgroup 55 2K 2K 166960K 82 0
sysctl 1 1K 9K 166960K 5 0
counters 70 37K 37K 166960K 92 0
ioctlops 0 0K 4K 166960K 1587 0
iov 0 0K 16K 166960K 10 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1416 89K 89K 166960K 1662 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 9K 166960K 6 0
VM map 2 1K 1K 166960K 2 0
sem 6 0K 0K 166960K 75 0
dirhash 12 2K 2K 166960K 12 0
ACPI 1734 201K 291K 166960K 11964 0
file desc 17 65K 97K 166960K 331 0
sigio 0 0K 0K 166960K 10 0
proc 21 33K 180K 166960K 579 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 20 0
in_multi 87 6K 7K 166960K 103 0
ether_multi 1 0K 0K 166960K 2 0
mrt 1 0K 0K 166960K 15 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 79 360K 360K 166960K 79 0
exec 0 0K 1K 166960K 406 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 135 82K 176K 166960K 4959 0
UVM aobj 9 2K 2K 166960K 10 0
pinsyscall 20 40K 106K 166960K 1521 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
ip6_options 0 0K 0K 166960K 6 0
NDP 12 0K 1K 166960K 36 0
temp 40 9115K 9154K 166960K 13399 0
kqueue 1 2K 26K 166960K 65 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 42 0 40 1 0 1 1 0 8 0
rtentry 176 117 0 19 5 0 5 5 0 8 0
unpcb 144 111 0 111 1 0 1 1 0 8 1
syncache 336 7 0 7 1 0 1 1 0 8 1
sackhl 24 1 0 1 1 1 0 1 0 8 0
tcpcb 736 86 0 85 2 0 2 2 0 8 1
arp 136 18 0 4 1 0 1 1 0 8 0
inpcb 328 285 0 283 4 0 4 4 0 8 3
nd6 152 26 0 3 1 0 1 1 0 8 0
kcovpl 48 8 0 0 1 0 1 1 0 8 0
ppxss 1192 7 0 7 1 0 1 1 0 8 1
pppxif 1576 2 0 2 1 0 1 1 0 8 1
pfstscr 40 4 0 3 1 0 1 1 0 8 0
pffrag 232 5 0 3 1 0 1 1 0 482 0
pffrnode 88 5 0 3 1 0 1 1 0 8 0
pffrent 40 9 0 7 1 0 1 1 0 8 0
pfosfp 40 1428 0 1005 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfrktable 1344 1 0 0 1 0 1 1 0 8 0
pfanchor 1288 13 0 7 2 0 2 2 0 8 1
pftag 88 2 0 0 1 0 1 1 0 8 0
pfstitem 24 37 0 0 1 0 1 1 0 8 0
pfstkey 128 41 0 4 2 0 2 2 0 8 0
pfstate 448 38 0 2 4 0 4 4 0 8 0
pfrule 1360 24 0 18 2 1 1 2 0 8 0
rttmr 136 1 0 1 1 0 1 1 0 8 1
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 500 0 60 29 0 29 29 0 8 1
art_table 40 501 0 60 5 0 5 5 0 8 0
art_node 32 117 0 27 1 0 1 1 0 8 0
sysvmsgpl 40 3 0 2 1 0 1 1 0 8 0
semupl 112 1 0 1 1 0 1 1 0 8 1
semapl 72 72 0 68 1 0 1 1 0 8 0
shmpl 112 7 0 1 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1924 0 448 93 0 93 93 0 8 0
ffsino 296 1924 0 448 115 0 115 115 0 8 0
nchpl 144 2408 0 704 64 0 64 64 0 8 0
vnodes 216 2241 0 0 125 0 125 125 0 8 0
namei 1024 7787 0 7787 2 0 2 2 0 8 2
percpumem 16 62 0 11 1 0 1 1 0 8 0
kstatmem 264 45 0 16 3 0 3 3 0 8 1
scxspl 216 9224 0 9224 4 2 2 3 1 8 2
plimitpl 152 86 0 74 1 0 1 1 0 8 0
sigapl 424 658 0 622 7 0 7 7 0 8 1
knotepl 120 540 0 0 17 0 17 17 0 8 0
kqueuepl 224 83 0 80 1 0 1 1 0 8 0
pipepl 344 139 0 112 3 0 3 3 0 8 0
fdescpl 528 642 0 622 3 0 3 3 0 8 0
filepl 160 3078 0 2846 14 0 14 14 0 8 2
lockfpl 104 126 0 126 1 0 1 1 0 8 1
lockfspl 48 49 0 49 1 0 1 1 0 8 1
sessionpl 144 35 0 32 1 0 1 1 0 8 0
pgrppl 48 46 0 35 1 0 1 1 0 8 0
ucredpl 104 412 0 407 1 0 1 1 0 8 0
zombiepl 144 625 0 622 1 0 1 1 0 8 0
processpl 1232 658 0 622 5 0 5 5 0 8 0
procpl 664 966 0 924 5 0 5 5 0 8 0
sockpl 752 444 0 440 4 0 4 4 0 8 3
mcl64k 65536 2 0 0 1 0 1 1 0 8 0
mcl8k 8192 3 0 0 1 0 1 1 0 8 0
mcl4k 4096 126 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 5 0 0 1 0 1 1 0 8 0
mbufpl 256 149 0 0 10 0 10 10 0 8 0
bufpl 272 4158 0 105 271 0 271 271 0 8 0
anonpl 32 5132 0 0 42 0 42 42 0 247 0
amapchunkpl 152 14759 0 14400 23 0 23 23 0 158 6
amappl16 200 2144 0 2122 5 3 2 5 0 8 0
amappl15 192 14 0 14 1 1 0 1 0 8 0
amappl14 184 455 0 455 1 0 1 1 0 8 1
amappl13 176 127 0 126 1 0 1 1 0 8 0
amappl12 168 898 0 880 2 0 2 2 0 8 0
amappl11 160 6 0 6 2 2 0 1 0 8 0
amappl10 152 110 0 110 1 0 1 1 0 8 1
amappl9 144 279 0 279 1 1 0 1 0 8 0
amappl8 136 103 0 103 1 0 1 1 0 8 1
amappl7 128 183 0 181 1 0 1 1 0 8 0
amappl6 120 159 0 159 1 0 1 1 0 8 1
amappl5 112 120 0 120 1 0 1 1 0 8 1
amappl4 104 305 0 303 1 0 1 1 0 8 0
amappl3 96 2800 0 2720 3 0 3 3 0 8 0
amappl2 88 557 0 548 2 0 2 2 0 8 0
amappl1 80 11361 0 11240 15 0 15 15 0 8 6
amappl 88 4130 0 4009 4 0 4 4 0 92 0
uvmvnodes 80 101 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 9 0 1 1 0 1 1 0 8 0
uaddrrnd 24 642 0 622 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 642 0 622 1 0 1 1 0 8 0
vmmpekpl 168 7068 0 7032 2 0 2 2 0 8 0
vmmpepl 168 49903 0 49013 87 0 87 87 0 357 43
vmsppl 488 641 0 622 5 0 5 5 0 8 0
rwobjpl 80 17017 0 16592 23 0 23 23 0 8 1
pdppl 4096 1291 0 1244 99 50 49 87 0 8 2
pvpl 32 10241 0 0 83 0 83 83 0 265 0
pmappl 256 641 0 622 3 0 3 3 0 8 0
extentpl 40 46 0 28 1 0 1 1 0 8 0
phpool 112 544 0 53 15 0 15 15 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x27: addq $0x8,%rsp
x86_ipi_db(ffffffff8391bff0) 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(ffffffff83a8ffc0) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:142 [inline]
__mp_lock(ffffffff83a8ffc0) at __mp_lock+0x199 sys/kern/kern_lock.c:173
softintr_dispatch(2) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83
dosoftint(2) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862
Xsofttty() at Xsofttty+0x27
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x19 kd_curproc sys/dev/kcov.c:580 [inline]
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x19 sys/dev/kcov.c:153
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: 0x7a2120f562b0, count: 4
ddb{0}> trace
x86_ipi_db(ffffffff8391bff0) 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(ffffffff83a8ffc0) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:142 [inline]
__mp_lock(ffffffff83a8ffc0) at __mp_lock+0x199 sys/kern/kern_lock.c:173
softintr_dispatch(2) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83
dosoftint(2) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862
Xsofttty() at Xsofttty+0x27
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x19 kd_curproc sys/dev/kcov.c:580 [inline]
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x19 sys/dev/kcov.c:153
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: 0x7a2120f562b0, count: -11
ddb{0}> machine ddbcpu 1
Stopped at savectx+0xae: movl $0,%gs:0x688
savectx() at savectx+0xae
end of kernel
end trace frame: 0x71ccff0cc300, count: 14
ddb{1}> trace
savectx() at savectx+0xae
end of kernel
end trace frame: 0x71ccff0cc300, count: -1
ddb{1}>
* Struck through repros no longer work on HEAD.