[Android 6.1] BUG: unable to handle kernel paging request in bpf_probe_read_compat_str

1 view
Skip to first unread message

syzbot

unread,
Jan 22, 2024, 6:16:26 PMJan 22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 21c71a7d0e96 ANDROID: GKI: Add symbol list for Nothing
git tree: android14-6.1
console+strace: https://syzkaller.appspot.com/x/log.txt?x=113a94d7e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=9db9ce076d8e6216
dashboard link: https://syzkaller.appspot.com/bug?extid=2537bd060028e740f62a
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1103d9e3e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12459ee3e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0935e1107d30/disk-21c71a7d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/88ea7d8f11be/vmlinux-21c71a7d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4fbf81e2d85e/bzImage-21c71a7d.xz

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

BUG: unable to handle page fault for address: ffffffffff600000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 6c12067 P4D 6c12067 PUD 6c14067 PMD 6c16067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 295 Comm: syz-executor154 Not tainted 6.1.57-syzkaller-00059-g21c71a7d0e96 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:strncpy_from_kernel_nofault+0x92/0x1e0 mm/maccess.c:91
Code: d0 48 c1 e8 03 48 89 45 c0 42 0f b6 04 30 84 c0 48 89 55 c8 0f 85 eb 00 00 00 ff 02 45 31 e4 48 8b 55 d0 4c 8b 7d b8 49 89 dd <42> 8a 1c 23 4a 8d 3c 22 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0
RSP: 0018:ffffc90000dd7a68 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff88811c913cc0
RDX: ffffc90000dd7b08 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc90000dd7ab0 R08: ffffffff8138c709 R09: ffffed1023922799
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000008
FS: 00005555567d0380(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 00000001214fe000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bpf_probe_read_kernel_str_common kernel/trace/bpf_trace.c:265 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:313 [inline]
bpf_probe_read_compat_str+0x112/0x180 kernel/trace/bpf_trace.c:306
bpf_prog_f17ebaf3f5f7baf8+0x3a/0x3c
bpf_dispatcher_nop_func include/linux/bpf.h:982 [inline]
__bpf_prog_run include/linux/filter.h:600 [inline]
bpf_prog_run include/linux/filter.h:607 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2275 [inline]
bpf_trace_run4+0x18d/0x2f0 kernel/trace/bpf_trace.c:2316
__bpf_trace_sched_switch+0xe/0x10 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x12f7/0x1540 kernel/sched/core.c:6722
schedule+0xc3/0x180 kernel/sched/core.c:6801
ptrace_stop+0x54f/0x930 kernel/signal.c:2329
ptrace_do_notify kernel/signal.c:2366 [inline]
ptrace_notify+0x225/0x350 kernel/signal.c:2378
ptrace_report_syscall include/linux/ptrace.h:420 [inline]
ptrace_report_syscall_exit include/linux/ptrace.h:482 [inline]
syscall_exit_work kernel/entry/common.c:252 [inline]
syscall_exit_to_user_mode_prepare kernel/entry/common.c:279 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:284 [inline]
syscall_exit_to_user_mode+0xa2/0x140 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f6a5701fb39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff6cc658d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: 0000000000000004 RBX: 0000000000000000 RCX: 00007f6a5701fb39
RDX: 0000000000000010 RSI: 0000000020000280 RDI: 0000000000000011
RBP: 0000000000000000 R08: 0000000000000006 R09: 0000000000000006
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000003a28
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
</TASK>
Modules linked in:
CR2: ffffffffff600000
---[ end trace 0000000000000000 ]---
RIP: 0010:strncpy_from_kernel_nofault+0x92/0x1e0 mm/maccess.c:91
Code: d0 48 c1 e8 03 48 89 45 c0 42 0f b6 04 30 84 c0 48 89 55 c8 0f 85 eb 00 00 00 ff 02 45 31 e4 48 8b 55 d0 4c 8b 7d b8 49 89 dd <42> 8a 1c 23 4a 8d 3c 22 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0
RSP: 0018:ffffc90000dd7a68 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff88811c913cc0
RDX: ffffc90000dd7b08 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc90000dd7ab0 R08: ffffffff8138c709 R09: ffffed1023922799
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000008
FS: 00005555567d0380(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 00000001214fe000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: d0 48 c1 rorb -0x3f(%rax)
3: e8 03 48 89 45 call 0x4589480b
8: c0 42 0f b6 rolb $0xb6,0xf(%rdx)
c: 04 30 add $0x30,%al
e: 84 c0 test %al,%al
10: 48 89 55 c8 mov %rdx,-0x38(%rbp)
14: 0f 85 eb 00 00 00 jne 0x105
1a: ff 02 incl (%rdx)
1c: 45 31 e4 xor %r12d,%r12d
1f: 48 8b 55 d0 mov -0x30(%rbp),%rdx
23: 4c 8b 7d b8 mov -0x48(%rbp),%r15
27: 49 89 dd mov %rbx,%r13
* 2a: 42 8a 1c 23 mov (%rbx,%r12,1),%bl <-- trapping instruction
2e: 4a 8d 3c 22 lea (%rdx,%r12,1),%rdi
32: 48 89 f8 mov %rdi,%rax
35: 48 c1 e8 03 shr $0x3,%rax
39: 42 0f b6 04 30 movzbl (%rax,%r14,1),%eax
3e: 84 c0 test %al,%al


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jan 22, 2024, 10:08:20 PMJan 22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1c3a1f32bcbd Revert "ipv6: remove max_size check inline wi..
git tree: android13-5.15-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=10d42307e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f12c43c1b163cb3e
dashboard link: https://syzkaller.appspot.com/bug?extid=dde0d9748541e35abe36
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a2f5e3e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=149a67e7e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7db92ca8e89d/disk-1c3a1f32.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a8beec1a66f8/vmlinux-1c3a1f32.xz
kernel image: https://storage.googleapis.com/syzbot-assets/73ad73589e74/bzImage-1c3a1f32.xz

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

BUG: unable to handle page fault for address: ffffffffff600000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0001) - permissions violation
PGD 6812067 P4D 6812067 PUD 6814067 PMD 6816067 PTE 8000000006809165
Oops: 0001 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 14 Comm: rcu_preempt Not tainted 5.15.147-syzkaller-00327-g1c3a1f32bcbd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:strncpy_from_kernel_nofault+0x92/0x1e0 mm/maccess.c:92
Code: d0 48 c1 e8 03 48 89 45 c0 42 0f b6 04 30 84 c0 48 89 55 c8 0f 85 eb 00 00 00 ff 02 45 31 e4 48 8b 55 d0 4c 8b 7d b8 49 89 dd <42> 8a 1c 23 4a 8d 3c 22 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0
RSP: 0018:ffffc900000e78c8 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff8881002693c0
RDX: ffffc900000e7968 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc900000e7910 R08: ffffffff8135f40d R09: ffffed102004d279
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000008
FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000011e4ce000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bpf_probe_read_kernel_str_common kernel/trace/bpf_trace.c:255 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:303 [inline]
bpf_probe_read_compat_str+0x112/0x180 kernel/trace/bpf_trace.c:296
bpf_prog_f17ebaf3f5f7baf8+0x3a/0xa00
bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
__bpf_prog_run include/linux/filter.h:625 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1883 [inline]
bpf_trace_run3+0x11e/0x250 kernel/trace/bpf_trace.c:1921
__bpf_trace_sched_switch+0xb/0x10 include/trace/events/sched.h:220
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0x133d/0x1580 kernel/sched/core.c:6509
schedule+0x11f/0x1e0 kernel/sched/core.c:6595
schedule_timeout+0x18c/0x370 kernel/time/timer.c:1890
rcu_gp_fqs_loop+0x2af/0xf80 kernel/rcu/tree.c:1972
rcu_gp_kthread+0xa4/0x350 kernel/rcu/tree.c:2145
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</TASK>
Modules linked in:
CR2: ffffffffff600000
---[ end trace b275ba0c1aeea0e0 ]---
RIP: 0010:strncpy_from_kernel_nofault+0x92/0x1e0 mm/maccess.c:92
Code: d0 48 c1 e8 03 48 89 45 c0 42 0f b6 04 30 84 c0 48 89 55 c8 0f 85 eb 00 00 00 ff 02 45 31 e4 48 8b 55 d0 4c 8b 7d b8 49 89 dd <42> 8a 1c 23 4a 8d 3c 22 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0
RSP: 0018:ffffc900000e78c8 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff8881002693c0
RDX: ffffc900000e7968 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc900000e7910 R08: ffffffff8135f40d R09: ffffed102004d279
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000008
FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000011e4ce000 CR4: 00000000003506b0
Reply all
Reply to author
Forward
0 new messages