protection_fault: lf_findoverlap

0 views
Skip to first unread message

syzbot

unread,
Mar 13, 2022, 7:01:31 PM3/13/22
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9a24c98b6f2e make those checks less chatty... once the fil..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=15d9c4a9700000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=182df9087f5f182daa44

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+182df9...@syzkaller.appspotmail.com

kernel: protection fault trap, code=0
Stopped at lf_findoverlap+0xfb: movq 0x18(%r15),%rax
ddb{1}>
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
the kernel did not panic
ddb{1}> trace
lf_findoverlap(fffffd806f0aad00,fffffd806f0aad00,2,ffff800026087958) at lf_findoverlap+0xfb sys/kern/vfs_lockf.c:659
lf_setlock(fffffd806f0aad00) at lf_setlock+0xf4 lf_getblock sys/kern/vfs_lockf.c:622 [inline]
lf_setlock(fffffd806f0aad00) at lf_setlock+0xf4 sys/kern/vfs_lockf.c:344
lf_advlock(ffff8000000295a0,0,fffffd80679e13e8,8,ffff800026087b30,40) at lf_advlock+0x3a7 sys/kern/vfs_lockf.c:301
VOP_ADVLOCK(fffffd807efcb700,fffffd80679e13e8,8,ffff800026087b30,40) at VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628
sys_fcntl(ffff80002465fce8,ffff800026087bb8,ffff800026087c10) at sys_fcntl+0xad9
syscall(ffff800026087c80) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800026087c80) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x28382cb4600, count: -7
ddb{1}> show registers
rdi 0xffff800022c5a000
rsi 0x1ab
rbp 0xffff800026087930
rbx 0
rdx 0xffff800022c5a000
rcx 0x1aa
rax 0xffffffff81768015 lf_findoverlap+0xd5
r8 0xffff800026087b30
r9 0x40
r10 0xe7bbfda65ced92e
r11 0x70cc6dc7889e2583
r12 0
r13 0
r14 0xffff800026087958
r15 0xdead4110dead4110
rip 0xffffffff8176803b lf_findoverlap+0xfb
cs 0x8
rflags 0x10202 __ALIGN_SIZE+0xf202
rsp 0xffff8000260878b0
ss 0x10
lf_findoverlap+0xfb: movq 0x18(%r15),%rax
ddb{1}> show proc
PROC (syz-executor.4) pid=401614 stat=onproc
flags process=10<SUGID> proc=4000000<THREAD>
pri=32, usrpri=82, nice=20
forw=0xffffffffffffffff, list=0xffff80002465f508,0xffff80002465e7f8
process=0xffff8000212354e0 user=0xffff800026082000, vmspace=0xfffffd806aff6d00
estcpu=36, cpticks=0, pctcpu=0.0
user=0, sys=0, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
35569 499714 26109 32767 2 0x10 syz-executor.5
35569 316815 26109 32767 7 0x4000010 syz-executor.5
32394 133900 33232 32767 2 0x10 syz-executor.2
32394 1497 33232 32767 3 0x4000010 lockflk syz-executor.2
73967 190344 76828 32767 2 0x10 syz-executor.0
73967 507130 76828 32767 3 0x4000090 fsleep syz-executor.0
46390 298380 82984 32767 2 0x10 syz-executor.4
*46390 401614 82984 32767 7 0x4000010 syz-executor.4
31574 130799 86685 32767 2 0x10 syz-executor.7
31574 503547 86685 32767 3 0x4000090 fsleep syz-executor.7
94897 182847 77086 32767 3 0x90 nanoslp syz-executor.1
94897 236539 77086 32767 3 0x4000090 fsleep syz-executor.1
94897 89942 77086 32767 2 0x4000010 syz-executor.1
94897 444556 77086 32767 3 0x4000090 fsleep syz-executor.1
94897 498328 77086 32767 2 0x4000010 syz-executor.1
69076 518489 13943 32767 3 0x90 nanoslp syz-executor.6
69076 299496 13943 32767 3 0x4000090 piperd syz-executor.6
69076 446919 13943 32767 3 0x4000090 fsleep syz-executor.6
17922 34302 85259 32767 2 0x10 syz-executor.3
85259 226400 98610 0 3 0x82 wait syz-executor.3
82984 382096 93648 32767 2 0x490 syz-executor.4
93648 85705 98610 0 3 0x82 wait syz-executor.4
33232 242026 98593 32767 3 0x90 nanoslp syz-executor.2
98593 215837 98610 0 3 0x82 wait syz-executor.2
26109 443885 81181 32767 3 0x90 nanoslp syz-executor.5
81181 169498 98610 0 3 0x82 wait syz-executor.5
13943 434190 10944 32767 2 0x490 syz-executor.6
10944 201385 98610 0 3 0x82 wait syz-executor.6
77086 11532 77365 32767 2 0x10 syz-executor.1
77365 262413 98610 0 3 0x82 wait syz-executor.1
30050 308592 0 0 3 0x14200 bored sosplice
86685 434206 76642 32767 3 0x90 nanoslp syz-executor.7
76642 55012 98610 0 3 0x82 wait syz-executor.7
76828 373886 24637 32767 3 0x90 nanoslp syz-executor.0
24637 66589 98610 0 3 0x82 wait syz-executor.0
98610 286280 18743 0 3 0x82 kqread syz-fuzzer
98610 466533 18743 0 3 0x4000082 nanoslp syz-fuzzer
98610 377660 18743 0 3 0x4000082 thrsleep syz-fuzzer
98610 184334 18743 0 3 0x4000082 thrsleep syz-fuzzer
98610 261952 18743 0 3 0x4000082 thrsleep syz-fuzzer
98610 172624 18743 0 3 0x4000082 nanoslp syz-fuzzer
98610 319161 18743 0 3 0x4000082 thrsleep syz-fuzzer
98610 4012 18743 0 3 0x4000082 thrsleep syz-fuzzer
18743 191403 1452 0 3 0x10008a sigsusp ksh
1452 421519 54715 0 3 0x9a kqread sshd
5426 436553 1 0 3 0x100083 ttyin getty
54715 470161 1 0 3 0x88 kqread sshd
4529 483232 88364 73 3 0x1100090 kqread syslogd
88364 367296 1 0 3 0x100082 netio syslogd
84673 508014 1 0 3 0x100080 kqread resolvd
35080 170261 95401 77 3 0x100092 kqread dhcpleased
16703 440947 95401 77 3 0x100092 kqread dhcpleased
95401 169621 1 0 3 0x80 kqread dhcpleased
12360 305146 0 0 3 0x14200 bored smr
13285 38936 0 0 2 0x14200 zerothread
878 212589 0 0 3 0x14200 aiodoned aiodoned
95467 34476 0 0 3 0x14200 syncer update
47554 308300 0 0 3 0x14200 cleaner cleaner
69081 269908 0 0 3 0x14200 reaper reaper
87634 240456 0 0 3 0x14200 pgdaemon pagedaemon
36382 63939 0 0 3 0x14200 bored viomb
68006 180078 0 0 3 0x40014200 acpi0 acpi0
4372 488245 0 0 3 0x40014200 idle1
19704 185059 0 0 3 0x14200 bored softnet
39185 302575 0 0 3 0x14200 bored systqmp
27994 460881 0 0 3 0x14200 bored systq
64027 26441 0 0 3 0x40014200 bored softclock
25911 474309 0 0 3 0x40014200 idle0
1 500368 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 35569 (syz-executor.5) thread 0xffff8000297497b0 (316815)
exclusive rwlock amaplk r = 0 (0xfffffd80671f85c0)
#0 witness_lock+0x44d
#1 uvm_fault_check+0x3ca sys/uvm/uvm_fault.c:774
#2 uvm_fault+0x102 sys/uvm/uvm_fault.c:602
#3 upageflttrap+0x82 sys/arch/amd64/amd64/trap.c:181
#4 usertrap+0x1aa sys/arch/amd64/amd64/trap.c:403
#5 recall_trap+0x8
shared rwlock vmmaplk r = 0 (0xfffffd806aff6a38)
#0 witness_lock+0x44d
#1 uvmfault_lookup+0xd9 sys/uvm/uvm_fault.c:1758
#2 uvm_fault_check+0x3a sys/uvm/uvm_fault.c:674
#3 uvm_fault+0x102 sys/uvm/uvm_fault.c:602
#4 upageflttrap+0x82 sys/arch/amd64/amd64/trap.c:181
#5 usertrap+0x1aa sys/arch/amd64/amd64/trap.c:403
#6 recall_trap+0x8
Process 46390 (syz-executor.4) thread 0xffff80002465fce8 (401614)
exclusive rwlock lockflk r = 0 (0xffffffff82923c30)
#0 witness_lock+0x44d
#1 lf_advlock+0x189 sys/kern/vfs_lockf.c:263
#2 VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628
#3 sys_fcntl+0xad9
#4 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#4 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#5 Xsyscall+0x128
Process 17922 (syz-executor.3) thread 0xffff8000297482b0 (34302)
exclusive rrwlock inode r = 0 (0xfffffd8079cfb1b8)
#0 witness_lock+0x44d
#1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310
#2 rrw_enter+0x8b sys/kern/kern_rwlock.c:461
#3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:534
#4 ufs_ihashins+0x42 sys/ufs/ufs/ufs_ihash.c:140
#5 ffs_vget+0x141 sys/ufs/ffs/ffs_vfsops.c:1347
#6 ffs_inode_alloc+0x1be sys/ufs/ffs/ffs_alloc.c:394
#7 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1162
#8 VOP_MKDIR+0xbf sys/kern/vfs_vops.c:404
#9 domkdirat+0x121 sys/kern/vfs_syscalls.c:3101
#10 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#10 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#11 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd807d222920)
#0 witness_lock+0x44d
#1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310
#2 rrw_enter+0x8b sys/kern/kern_rwlock.c:461
#3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:534
#4 vn_lock+0x84 sys/kern/vfs_vnops.c:579
#5 vfs_lookup+0xd1 sys/kern/vfs_lookup.c:413
#6 namei+0x36a sys/kern/vfs_lookup.c:245
#7 domkdirat+0x75 sys/kern/vfs_syscalls.c:3086
#8 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#8 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#9 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10205 6411K 6419K 78643K 11363 0
pcb 13 12K 14K 78643K 17 0
rtable 258 7K 8K 78643K 2152 0
ifaddr 81 17K 17K 78643K 238 0
sysctl 3 1K 1K 78643K 3 0
counters 56 35K 35K 78643K 100 0
ioctlops 0 0K 2K 78643K 187 0
iov 0 0K 32K 78643K 3330 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 5 0
vnodes 1271 79K 79K 78643K 4734 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 9K 78643K 173 0
VM map 2 1K 1K 78643K 2 0
sem 12 0K 1K 78643K 5126 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 25 93K 117K 78643K 21873 0
sigio 0 0K 0K 78643K 225 0
proc 56 74K 111K 78643K 2340 0
subproc 104 6K 6K 78643K 390 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 2220 0
in_multi 99 6K 7K 78643K 691 0
ether_multi 1 0K 0K 78643K 105 0
mrt 5 0K 0K 78643K 9 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 247 1102K 1102K 78643K 247 0
exec 0 0K 2K 78643K 4593 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 493 95K 111K 78643K 284496 0
UVM aobj 131 8K 8K 78643K 131 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 484 0
NDP 11 0K 2K 78643K 93 0
temp 125 4707K 4787K 78643K 54213 0
kqueue 13 20K 28K 78643K 1870 0
SYN cache 2 16K 16K 78643K 2 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 22 0 0 1 0 1 1 0 8 0
rtpcb 120 1819 0 1815 20 19 1 3 0 8 0
rtentry 112 396 0 276 4 0 4 4 0 8 0
unpcb 136 18228 0 18215 179 174 5 9 0 8 4
syncache 296 148 0 148 35 34 1 1 0 8 1
tcpqe 32 197 0 197 16 16 0 1 0 8 0
tcpcb 736 7364 0 7357 252 248 4 20 0 8 3
arp 120 68 0 50 1 0 1 1 0 8 0
ipq 40 17 0 17 9 9 0 1 0 8 0
ipqe 40 268 0 268 9 9 0 1 0 8 0
inpcb 304 17924 0 17917 223 220 3 14 0 8 2
rttmr 72 8 0 7 1 0 1 1 0 8 0
ip6q 72 20 0 20 7 7 0 1 0 8 0
ip6af 40 38 0 38 8 8 0 1 0 8 0
nd6 48 126 0 93 1 0 1 1 0 8 0
kcovpl 48 30 0 22 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 1661 0 1142 42 7 35 38 0 8 0
art_table 32 1662 0 1142 6 1 5 5 0 8 0
art_node 16 395 0 285 1 0 1 1 0 8 0
sysvmsgpl 40 3 0 0 1 0 1 1 0 8 0
semupl 112 7 0 7 1 1 0 1 0 8 0
semapl 112 5121 0 5111 1 0 1 1 0 8 0
shmpl 112 128 0 0 4 0 4 4 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 30209 0 28755 92 0 92 92 0 8 0
ffsino 272 30209 0 28755 98 0 98 98 0 8 0
nchpl 144 59621 0 57996 62 0 62 62 0 8 0
uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0
vnodes 224 5926 0 0 349 0 349 349 0 8 0
namei 1024 210124 0 210123 6 5 1 2 0 8 0
percpumem 16 62 0 22 1 0 1 1 0 8 0
scxspl 216 183087 0 183087 88 85 3 8 0 8 3
plimitpl 152 3360 0 3338 13 12 1 2 0 8 0
sigapl 424 22104 0 22053 7 1 6 7 0 8 0
futexpl 64 204649 0 204644 6 5 1 1 0 8 0
knotepl 120 1411 0 0 18 1 17 17 0 8 0
kqueuepl 216 6989 0 6979 132 130 2 8 0 8 1
pipepl 336 4443 0 4411 137 129 8 13 0 8 5
fdescpl 496 22089 0 22053 7 2 5 6 0 8 0
filepl 152 153885 0 153628 292 274 18 22 0 8 7
lockfpl 104 41493 0 41477 6 5 1 4 0 8 0
lockfspl 48 6866 0 6861 1 0 1 1 0 8 0
sessionpl 144 45 0 29 1 0 1 1 0 8 0
pgrppl 48 302 0 286 1 0 1 1 0 8 0
ucredpl 96 21645 0 21627 1 0 1 1 0 8 0
zombiepl 144 22053 0 22053 1 0 1 1 0 8 1
processpl 1064 22104 0 22053 5 1 4 4 0 8 0
procpl 672 65737 0 65668 42 34 8 8 0 8 1
sosppl 168 243 0 243 33 33 0 1 0 8 0
sockpl 480 38602 0 38578 942 931 11 42 0 8 8
mcl64k 65536 73 0 0 4 1 3 3 0 8 0
mcl16k 16384 49 0 0 7 4 3 3 0 8 0
mcl12k 12288 41 0 0 4 2 2 2 0 8 0
mcl9k 9216 37 0 0 3 1 2 2 0 8 0
mcl8k 8192 41 0 0 4 1 3 3 0 8 0
mcl4k 4096 50 0 0 4 1 3 3 0 8 0
mcl2k2 2112 14 0 0 1 0 1 1 0 8 0
mcl2k 2048 304 0 0 20 2 18 20 0 8 0
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 1291 0 0 28 2 26 28 0 8 0
bufpl 288 42188 0 35853 453 0 453 453 0 8 0
anonpl 24 6370716 0 6355906 332 224 108 141 0 186 0
amapchunkpl 152 756017 0 755187 250 213 37 48 0 158 4
amappl16 200 63653 0 63280 262 241 21 33 0 8 0
amappl15 192 2781 0 2775 1 0 1 1 0 8 0
amappl14 184 1350 0 1344 1 0 1 1 0 8 0
amappl13 176 1014 0 1011 1 0 1 1 0 8 0
amappl12 168 6857 0 6847 1 0 1 1 0 8 0
amappl11 160 4705 0 4687 1 0 1 1 0 8 0
amappl10 152 1552 0 1542 1 0 1 1 0 8 0
amappl9 144 1967 0 1965 1 0 1 1 0 8 0
amappl8 136 4805 0 4594 8 0 8 8 0 8 0
amappl7 128 3100 0 3086 1 0 1 1 0 8 0
amappl6 120 1784 0 1757 2 1 1 2 0 8 0
amappl5 112 15893 0 15876 1 0 1 1 0 8 0
amappl4 104 9832 0 9790 11 9 2 2 0 8 0
amappl3 96 8566 0 8547 1 0 1 1 0 8 0
amappl2 88 7944 0 7891 3 1 2 3 0 8 0
amappl1 80 400704 0 400048 31 16 15 18 0 8 1
amappl 88 282801 0 282498 13 5 8 8 0 92 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 130 0 0 3 0 3 3 0 8 0
uaddrrnd 24 22089 0 22053 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 22089 0 22053 1 0 1 1 0 8 0
vmmpekpl 168 180041 0 179987 3 0 3 3 0 8 0
vmmpepl 168 2027667 0 2024752 323 190 133 139 0 357 2
vmsppl 368 22088 0 22053 4 0 4 4 0 8 0
rwobjpl 56 496881 0 489319 127 18 109 110 0 8 0
pdppl 4096 44185 0 44106 516 435 81 91 0 8 2
pvpl 32 10550695 0 10530078 625 439 186 259 0 265 0
pmappl 248 22088 0 22053 4 1 3 3 0 8 0
extentpl 40 58 0 38 1 0 1 1 0 8 0
phpool 112 1674 0 837 25 0 25 25 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
ddb{0}> trace
x86_ipi_db(ffffffff8298cff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
pool_get(ffffffff82a50ae0,2) at pool_get+0x15b sys/kern/subr_pool.c:590
pmap_enter(fffffd806c79a4e8,56fe478e000,6952c000,1,20) at pmap_enter+0x169
uvm_fault_upper_lookup(ffff80002e3b55a0,ffff80002e3b55d8,ffff80002e3b54a0,ffff80002e3b5520) at uvm_fault_upper_lookup+0x2b3 sys/uvm/uvm_fault.c:887
uvm_fault(fffffd806aff6a20,56fe478d000,0,1) at uvm_fault+0x139 sys/uvm/uvm_fault.c:607
upageflttrap(ffff80002e3b5710,56fe478d000) at upageflttrap+0x82 sys/arch/amd64/amd64/trap.c:181
usertrap(ffff80002e3b5710) at usertrap+0x1aa sys/arch/amd64/amd64/trap.c:403
recall_trap() at recall_trap+0x8
end of kernel
end trace frame: 0x5700faed970, count: -10
ddb{0}> machine ddbcpu 1
Stopped at lf_findoverlap+0xfb: movq 0x18(%r15),%rax
ddb{1}> trace
lf_findoverlap(fffffd806f0aad00,fffffd806f0aad00,2,ffff800026087958) at lf_findoverlap+0xfb sys/kern/vfs_lockf.c:659
lf_setlock(fffffd806f0aad00) at lf_setlock+0xf4 lf_getblock sys/kern/vfs_lockf.c:622 [inline]
lf_setlock(fffffd806f0aad00) at lf_setlock+0xf4 sys/kern/vfs_lockf.c:344
lf_advlock(ffff8000000295a0,0,fffffd80679e13e8,8,ffff800026087b30,40) at lf_advlock+0x3a7 sys/kern/vfs_lockf.c:301
VOP_ADVLOCK(fffffd807efcb700,fffffd80679e13e8,8,ffff800026087b30,40) at VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628
sys_fcntl(ffff80002465fce8,ffff800026087bb8,ffff800026087c10) at sys_fcntl+0xad9
syscall(ffff800026087c80) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800026087c80) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x28382cb4600, count: -7


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Apr 14, 2022, 11:33:26 PM4/14/22
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3fe80b7fb1a5 ddb: constify command tables
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=105e936cf00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=118381b7700000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a609df700000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+182df9...@syzkaller.appspotmail.com

kernel: protection fault trap, code=0
Stopped at lf_findoverlap+0xfb: movq 0x18(%r15),%rax
ddb{1}>
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
the kernel did not panic
ddb{1}> trace
lf_findoverlap(fffffd806f12b6e8,fffffd806f12ba28,2,ffff800021240470) at lf_findoverlap+0xfb sys/kern/vfs_lockf.c:659
lf_deadlock(fffffd806f12ba28) at lf_deadlock+0x1f6 lf_getblock sys/kern/vfs_lockf.c:622 [inline]
lf_deadlock(fffffd806f12ba28) at lf_deadlock+0x1f6 sys/kern/vfs_lockf.c:841
lf_setlock(fffffd806f12ba28) at lf_setlock+0x168 sys/kern/vfs_lockf.c:359
lf_advlock(ffff800000bb7c20,0,fffffd806d8ac3e8,8,ffff8000212406c0,50) at lf_advlock+0x3a7 sys/kern/vfs_lockf.c:301
VOP_ADVLOCK(fffffd806e57a948,fffffd806d8ac3e8,8,ffff8000212406c0,50) at VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628
sys_fcntl(ffff8000211a2fc8,ffff800021240748,ffff8000212407a0) at sys_fcntl+0xad9
syscall(ffff800021240810) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021240810) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xbf3dbb3f6e0, count: -8
ddb{1}> show registers
rdi 0x1
rsi 0xdeaf4152deaf4152
rbp 0xffff800021240460
rbx 0xdeaf4152deaf4152
rdx 0x2
rcx 0xfffffd806f12ba28
rax 0xdeaf4152deaf4152
r8 0xffff8000212406c0
r9 0x50
r10 0x9b41b2fc8c57cff1
r11 0xbd3e2e9c34f4ccc5
r12 0
r13 0x1
r14 0xffff800021240470
r15 0xdeaf4152deaf4152
rip 0xffffffff812d943b lf_findoverlap+0xfb
cs 0x8
rflags 0x10202 __ALIGN_SIZE+0xf202
rsp 0xffff8000212403e0
ss 0x10
lf_findoverlap+0xfb: movq 0x18(%r15),%rax
ddb{1}> show proc
PROC (syz-executor4206730405) pid=331913 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=78, nice=20
forw=0xffffffffffffffff, list=0xffff8000211a2548,0xffff8000211a3518
process=0xffff8000ffff0440 user=0xffff80002123b000, vmspace=0xfffffd806d04f010
estcpu=36, cpticks=0, pctcpu=0.0
user=0, sys=0, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
7505 64982 51824 0 7 0 syz-executor4206730405
* 7505 331913 51824 0 7 0x4000000 syz-executor4206730405
69639 306162 73055 0 2 0 syz-executor4206730405
69639 228693 73055 0 2 0x4000000 syz-executor4206730405
11667 282347 17641 0 2 0 syz-executor4206730405
11667 361185 17641 0 3 0x4000080 fsleep syz-executor4206730405
70626 308236 2651 0 2 0 syz-executor4206730405
70626 165466 2651 0 3 0x4000080 lockf syz-executor4206730405
16334 111007 35273 0 2 0 syz-executor4206730405
16334 92089 35273 0 3 0x4000080 fsleep syz-executor4206730405
57464 84064 1986 0 2 0 syz-executor4206730405
57464 17307 1986 0 3 0x4000080 fsleep syz-executor4206730405
46624 372582 6739 0 3 0x80 nanoslp syz-executor4206730405
46624 188396 6739 0 3 0x4000080 lockf syz-executor4206730405
46624 453918 6739 0 3 0x4000080 fsleep syz-executor4206730405
6739 88584 76010 0 2 0 syz-executor4206730405
1986 164593 76010 0 3 0x80 nanoslp syz-executor4206730405
51824 305959 76010 0 3 0x80 nanoslp syz-executor4206730405
17641 146736 76010 0 3 0x80 nanoslp syz-executor4206730405
35273 183525 76010 0 3 0x80 nanoslp syz-executor4206730405
73055 382545 76010 0 2 0 syz-executor4206730405
2651 267937 76010 0 3 0x80 nanoslp syz-executor4206730405
29060 318136 76010 0 2 0 syz-executor4206730405
76010 80982 42029 0 3 0x82 nanoslp syz-executor4206730405
42029 157703 99721 0 3 0x10008a sigsusp ksh
99721 302909 42242 0 3 0x9a kqread sshd
28651 181035 1 0 3 0x100083 ttyin getty
42242 333045 1 0 3 0x88 kqread sshd
68765 45830 19793 73 3 0x1100090 kqread syslogd
19793 232760 1 0 3 0x100082 netio syslogd
57501 443796 1 0 3 0x100080 kqread resolvd
98510 11291 50463 77 3 0x100092 kqread dhcpleased
5913 448816 50463 77 3 0x100092 kqread dhcpleased
50463 157137 1 0 3 0x80 kqread dhcpleased
90325 456473 0 0 3 0x14200 bored smr
57703 495689 0 0 2 0x14200 zerothread
29754 291937 0 0 3 0x14200 aiodoned aiodoned
35726 204254 0 0 3 0x14200 syncer update
23855 509986 0 0 3 0x14200 cleaner cleaner
13840 36644 0 0 3 0x14200 reaper reaper
14497 370506 0 0 3 0x14200 pgdaemon pagedaemon
66801 337104 0 0 3 0x14200 bored viomb
32529 440157 0 0 3 0x40014200 acpi0 acpi0
36550 363439 0 0 3 0x40014200 idle1
73106 389552 0 0 3 0x14200 bored softnet
91313 264749 0 0 3 0x14200 bored systqmp
61720 421402 0 0 3 0x14200 bored systq
68293 130312 0 0 3 0x40014200 bored softclock
9407 196709 0 0 3 0x40014200 idle0
1 494704 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 7505 (syz-executor4206730405) thread 0xffff8000211a2fc8 (331913)
exclusive rwlock lockflk r = 0 (0xffffffff82910aa0)
#0 witness_lock+0x44d
#1 lf_advlock+0x189 sys/kern/vfs_lockf.c:263
#2 VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628
#3 sys_fcntl+0xad9
#4 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#4 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#5 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10151 6389K 6419K 78643K 11241 0
pcb 13 8K 8K 78643K 13 0
rtable 62 2K 2K 78643K 108 0
ifaddr 24 7K 7K 78643K 24 0
counters 40 33K 33K 78643K 40 0
ioctlops 0 0K 2K 78643K 25 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 5 0
vnodes 1166 73K 73K 78643K 1179 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 7 12K 17K 78643K 14209 0
proc 55 78K 79K 78643K 226 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 11 0K 0K 78643K 11 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 73 334K 334K 78643K 73 0
exec 0 0K 2K 78643K 391 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 92 5K 5K 78643K 24560 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 3 0K 0K 78643K 3 0
temp 18 4705K 4769K 78643K 2270 0
kqueue 11 16K 18K 78643K 24 0
SYN cache 2 16K 16K 78643K 2 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 22 0 0 1 0 1 1 0 8 0
rtpcb 120 17 0 14 1 0 1 1 0 8 0
rtentry 112 23 0 1 1 0 1 1 0 8 0
unpcb 136 33 0 20 1 0 1 1 0 8 0
syncache 296 5 0 5 2 2 0 1 0 8 0
tcpcb 736 8 0 5 1 0 1 1 0 8 0
arp 120 2 0 0 1 0 1 1 0 8 0
inpcb 312 25 0 19 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 96 0 0 6 0 6 6 0 8 0
art_table 32 97 0 0 1 0 1 1 0 8 0
art_node 16 22 0 2 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1416 0 38 87 0 87 87 0 8 0
ffsino 272 1416 0 38 92 0 92 92 0 8 0
nchpl 144 1603 0 47 58 0 58 58 0 8 0
uvmvnodes 80 1425 0 0 30 0 30 30 0 8 0
vnodes 224 1425 0 0 84 0 84 84 0 8 0
namei 1024 23119 0 23119 2 1 1 1 0 8 1
percpumem 16 32 0 0 1 0 1 1 0 8 0
scxspl 216 3989 0 3989 17 16 1 8 0 8 1
plimitpl 152 15 0 9 1 0 1 1 0 8 0
sigapl 424 5037 0 4994 5 0 5 5 0 8 0
futexpl 64 14770 0 14766 1 0 1 1 0 8 0
knotepl 120 48 0 0 2 0 2 2 0 8 0
kqueuepl 216 20 0 13 1 0 1 1 0 8 0
pipepl 336 79 0 76 2 1 1 1 0 8 0
fdescpl 496 5023 0 4995 5 1 4 4 0 8 0
filepl 152 15251 0 15186 3 0 3 3 0 8 0
lockfpl 104 14114 0 14104 1 0 1 1 0 8 0
lockfspl 48 4693 0 4688 1 0 1 1 0 8 0
sessionpl 144 17 0 9 1 0 1 1 0 8 0
pgrppl 48 17 0 9 1 0 1 1 0 8 0
ucredpl 96 14272 0 14262 1 0 1 1 0 8 0
zombiepl 144 4995 0 4994 2 1 1 1 0 8 0
processpl 1064 5037 0 4994 4 1 3 3 0 8 0
procpl 672 9885 0 9834 5 0 5 5 0 8 0
sockpl 480 75 0 53 3 0 3 3 0 8 0
mcl8k 8192 2 0 0 1 0 1 1 0 8 0
mcl4k 4096 2 0 0 1 0 1 1 0 8 0
mcl2k 2048 70 0 0 7 0 7 7 0 8 0
mtagpl 96 2 0 0 1 0 1 1 0 8 0
mbufpl 256 114 0 0 7 0 7 7 0 8 0
bufpl 288 1943 0 87 133 0 133 133 0 8 0
anonpl 24 736637 0 733806 24 5 19 20 0 186 0
amapchunkpl 152 52270 0 52103 10 2 8 8 0 158 1
amappl16 200 4817 0 4810 1 0 1 1 0 8 0
amappl13 176 32 0 31 2 1 1 1 0 8 0
amappl12 168 4 0 3 1 0 1 1 0 8 0
amappl11 160 61 0 47 1 0 1 1 0 8 0
amappl10 152 1 0 1 1 1 0 1 0 8 0
amappl9 144 493 0 491 1 0 1 1 0 8 0
amappl8 136 5080 0 5063 2 1 1 1 0 8 0
amappl7 128 51 0 48 1 0 1 1 0 8 0
amappl6 120 92 0 82 1 0 1 1 0 8 0
amappl5 112 82 0 74 1 0 1 1 0 8 0
amappl4 104 567 0 547 1 0 1 1 0 8 0
amappl3 96 9187 0 9154 1 0 1 1 0 8 0
amappl2 88 5155 0 5109 2 0 2 2 0 8 0
amappl1 80 98254 0 97727 14 2 12 12 0 8 0
amappl 88 19571 0 19501 2 0 2 2 0 92 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 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 5023 0 4995 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 5023 0 4995 1 0 1 1 0 8 0
vmmpekpl 168 30626 0 30611 2 0 2 2 0 8 0
vmmpepl 168 342152 0 340786 69 5 64 64 0 357 4
vmsppl 368 5022 0 4995 3 0 3 3 0 8 0
rwobjpl 56 106852 0 104761 30 0 30 30 0 8 0
pdppl 4096 10053 0 9990 83 18 65 65 0 8 2
pvpl 32 1054446 0 1049322 52 8 44 45 0 265 0
pmappl 248 5022 0 4995 3 1 2 2 0 8 0
extentpl 40 58 0 38 1 0 1 1 0 8 0
phpool 112 433 0 22 12 0 12 12 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
ddb{0}> trace
x86_ipi_db(ffffffff82986ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
end of kernel
end trace frame: 0x7f7ffffc9180, count: -3
ddb{0}> machine ddbcpu 1
Stopped at lf_findoverlap+0xfb: movq 0x18(%r15),%rax
ddb{1}> trace
lf_findoverlap(fffffd806f12b6e8,fffffd806f12ba28,2,ffff800021240470) at lf_findoverlap+0xfb sys/kern/vfs_lockf.c:659
lf_deadlock(fffffd806f12ba28) at lf_deadlock+0x1f6 lf_getblock sys/kern/vfs_lockf.c:622 [inline]
lf_deadlock(fffffd806f12ba28) at lf_deadlock+0x1f6 sys/kern/vfs_lockf.c:841
lf_setlock(fffffd806f12ba28) at lf_setlock+0x168 sys/kern/vfs_lockf.c:359
lf_advlock(ffff800000bb7c20,0,fffffd806d8ac3e8,8,ffff8000212406c0,50) at lf_advlock+0x3a7 sys/kern/vfs_lockf.c:301
VOP_ADVLOCK(fffffd806e57a948,fffffd806d8ac3e8,8,ffff8000212406c0,50) at VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628
sys_fcntl(ffff8000211a2fc8,ffff800021240748,ffff8000212407a0) at sys_fcntl+0xad9
syscall(ffff800021240810) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021240810) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xbf3dbb3f6e0, count: -8

Reply all
Reply to author
Forward
0 new messages