KASAN: vmalloc-out-of-bounds Read in init_srcu_struct_fields

5 views
Skip to first unread message

syzbot

unread,
Dec 26, 2021, 4:27:19 PM12/26/21
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c4d08791d941 Merge 5.10.87 into android12-5.10-lts
git tree: android12-5.10-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=11d44295b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8906a0a34d7ecc3a
dashboard link: https://syzkaller.appspot.com/bug?extid=fb4e94bb01f9ca704eaf
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2

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+fb4e94...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: vmalloc-out-of-bounds in init_srcu_struct_nodes kernel/rcu/srcutree.c:153 [inline]
BUG: KASAN: vmalloc-out-of-bounds in init_srcu_struct_fields+0xfa4/0x1360 kernel/rcu/srcutree.c:183
Read of size 4 at addr ffffc9000267a3e0 by task syz-executor.1/22067

CPU: 0 PID: 22067 Comm: syz-executor.1 Not tainted 5.10.87-syzkaller-00611-gc4d08791d941 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
print_address_description+0x8d/0x3d0 mm/kasan/report.c:233
__kasan_report+0x142/0x220 mm/kasan/report.c:419
kasan_report+0x51/0x70 mm/kasan/report.c:436
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
init_srcu_struct_nodes kernel/rcu/srcutree.c:153 [inline]
init_srcu_struct_fields+0xfa4/0x1360 kernel/rcu/srcutree.c:183
init_srcu_struct+0x3b/0x60 kernel/rcu/srcutree.c:216
kvm_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:770 [inline]
kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:3990 [inline]
kvm_dev_ioctl+0x2c3/0x1710 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4042
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0x115/0x190 fs/ioctl.c:739
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fcf3b2ebe99
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcf3a3ff168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcf3b3ff1d0 RCX: 00007fcf3b2ebe99
RDX: 0000000000000000 RSI: 000000000000ae01 RDI: 0000000000000005
RBP: 00007fcf3b345ff1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffae1f8c0f R14: 00007fcf3a3ff300 R15: 0000000000022000


Memory state around the buggy address:
ffffc9000267a280: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc9000267a300: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc9000267a380: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
^
ffffc9000267a400: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc9000267a480: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================
BUG: unable to handle page fault for address: ffffc9000267a3e0
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067 P4D 100000067 PUD 10012d067 PMD 14f93f067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 22067 Comm: syz-executor.1 Tainted: G B 5.10.87-syzkaller-00611-gc4d08791d941 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:init_srcu_struct_nodes kernel/rcu/srcutree.c:153 [inline]
RIP: 0010:init_srcu_struct_fields+0xea8/0x1360 kernel/rcu/srcutree.c:183
Code: 0e d0 4d 00 48 ba 00 00 00 00 00 fc ff df 48 8b 1b 48 83 c3 58 48 89 d8 48 c1 e8 03 8a 04 10 84 c0 0f 85 e7 00 00 00 44 89 f9 <2b> 0b b8 01 00 00 00 d3 e0 4c 63 f0 49 8d 9c 24 38 01 00 00 48 89
RSP: 0018:ffffc900025dfcc8 EFLAGS: 00010286
RAX: ffff88815c36bb01 RBX: ffffc9000267a3e0 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000246 RDI: 0000000000000001
RBP: ffffc900025dfd58 R08: ffffffff813fceb4 R09: fffffbfff0dc89b9
R10: fffffbfff0dc89b9 R11: 0000000000000000 R12: ffff8881f7000000
R13: ffffc900026851f0 R14: 0000000000000000 R15: 0000000000000000
FS: 00007fcf3a3ff700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000267a3e0 CR3: 000000015d5f6000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
init_srcu_struct+0x3b/0x60 kernel/rcu/srcutree.c:216
kvm_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:770 [inline]
kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:3990 [inline]
kvm_dev_ioctl+0x2c3/0x1710 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4042
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0x115/0x190 fs/ioctl.c:739
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fcf3b2ebe99
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcf3a3ff168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcf3b3ff1d0 RCX: 00007fcf3b2ebe99
RDX: 0000000000000000 RSI: 000000000000ae01 RDI: 0000000000000005
RBP: 00007fcf3b345ff1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffae1f8c0f R14: 00007fcf3a3ff300 R15: 0000000000022000
Modules linked in:
CR2: ffffc9000267a3e0
---[ end trace 1d6ff0af2e86b1c8 ]---
RIP: 0010:init_srcu_struct_nodes kernel/rcu/srcutree.c:153 [inline]
RIP: 0010:init_srcu_struct_fields+0xea8/0x1360 kernel/rcu/srcutree.c:183
Code: 0e d0 4d 00 48 ba 00 00 00 00 00 fc ff df 48 8b 1b 48 83 c3 58 48 89 d8 48 c1 e8 03 8a 04 10 84 c0 0f 85 e7 00 00 00 44 89 f9 <2b> 0b b8 01 00 00 00 d3 e0 4c 63 f0 49 8d 9c 24 38 01 00 00 48 89
RSP: 0018:ffffc900025dfcc8 EFLAGS: 00010286
RAX: ffff88815c36bb01 RBX: ffffc9000267a3e0 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000246 RDI: 0000000000000001
RBP: ffffc900025dfd58 R08: ffffffff813fceb4 R09: fffffbfff0dc89b9
R10: fffffbfff0dc89b9 R11: 0000000000000000 R12: ffff8881f7000000
R13: ffffc900026851f0 R14: 0000000000000000 R15: 0000000000000000
FS: 00007fcf3a3ff700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000267a3e0 CR3: 000000015d5f6000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
0: d0 4d 00 rorb 0x0(%rbp)
3: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
a: fc ff df
d: 48 8b 1b mov (%rbx),%rbx
10: 48 83 c3 58 add $0x58,%rbx
14: 48 89 d8 mov %rbx,%rax
17: 48 c1 e8 03 shr $0x3,%rax
1b: 8a 04 10 mov (%rax,%rdx,1),%al
1e: 84 c0 test %al,%al
20: 0f 85 e7 00 00 00 jne 0x10d
26: 44 89 f9 mov %r15d,%ecx
* 29: 2b 0b sub (%rbx),%ecx <-- trapping instruction
2b: b8 01 00 00 00 mov $0x1,%eax
30: d3 e0 shl %cl,%eax
32: 4c 63 f0 movslq %eax,%r14
35: 49 8d 9c 24 38 01 00 lea 0x138(%r12),%rbx
3c: 00
3d: 48 rex.W
3e: 89 .byte 0x89


---
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 25, 2022, 5:25:24 PM4/25/22
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages