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

0 views
Skip to first unread message

syzbot

unread,
Feb 3, 2024, 1:51:35 AMFeb 3
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 76f0396b5761 ANDROID: ABI: Update oplus symbol list
git tree: android14-6.1
console+strace: https://syzkaller.appspot.com/x/log.txt?x=151109b7e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=54c503ca94c7e582
dashboard link: https://syzkaller.appspot.com/bug?extid=7edeec9cffc7f9d0df55
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=11310560180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=147b6588180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ad4d016223d7/disk-76f0396b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8af164299a14/vmlinux-76f0396b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b9404ea48f78/bzImage-76f0396b.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+7edeec...@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: 0 PID: 91 Comm: klogd Not tainted 6.1.68-syzkaller-00170-g76f0396b5761 #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:ffffc900007b79b8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff88810e44e540
RDX: ffffc900007b7a40 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc900007b7a00 R08: ffffffff8138ca8d R09: fffff520000f6f61
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000005
FS: 00007fbd91120380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000010f56a000 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:265 [inline]
____bpf_probe_read_kernel_str kernel/trace/bpf_trace.c:274 [inline]
bpf_probe_read_kernel_str+0x2a/0x70 kernel/trace/bpf_trace.c:271
bpf_prog_ef3a4661c9d1378e+0x42/0x44
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_run2+0x133/0x290 kernel/trace/bpf_trace.c:2314
__bpf_trace_kfree+0x6f/0x90 include/trace/events/kmem.h:94
trace_kfree include/trace/events/kmem.h:94 [inline]
kfree+0xce/0xf0 mm/slab_common.c:996
syslog_print+0x577/0x600 kernel/printk/printk.c:1594
do_syslog+0x732/0x7f0 kernel/printk/printk.c:1681
__do_sys_syslog kernel/printk/printk.c:1773 [inline]
__se_sys_syslog kernel/printk/printk.c:1771 [inline]
__x64_sys_syslog+0x7c/0x90 kernel/printk/printk.c:1771
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fbd91281fa7
Code: 73 01 c3 48 8b 0d 81 ce 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 67 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 51 ce 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffcc6a1aa68 EFLAGS: 00000206 ORIG_RAX: 0000000000000067
RAX: ffffffffffffffda RBX: 00007fbd914204a0 RCX: 00007fbd91281fa7
RDX: 00000000000003ff RSI: 00007fbd914204a0 RDI: 0000000000000002
RBP: 0000000000000000 R08: 0000000000000002 R09: be13a6e5b57f9cbd
R10: 0000000000004000 R11: 0000000000000206 R12: 00007fbd914204a0
R13: 00007fbd91410212 R14: 00007fbd91420573 R15: 00007fbd91420573
</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:ffffc900007b79b8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff88810e44e540
RDX: ffffc900007b7a40 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc900007b7a00 R08: ffffffff8138ca8d R09: fffff520000f6f61
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000005
FS: 00007fbd91120380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000010f56a000 CR4: 00000000003506b0
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,
Feb 5, 2024, 5:23:32 PMFeb 5
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3802b45594e1 Revert "clk: fixed-rate: add devm_clk_hw_regi..
git tree: android13-5.15-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=11659118180000
kernel config: https://syzkaller.appspot.com/x/.config?x=71b415a99493d134
dashboard link: https://syzkaller.appspot.com/bug?extid=72489cfa4c396c17d343
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=10d8e000180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12a095b7e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/dd4d3bdb87f1/disk-3802b455.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a6dd15e230e4/vmlinux-3802b455.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ca3496f788a9/bzImage-3802b455.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+72489c...@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: 1 PID: 89 Comm: klogd Not tainted 5.15.148-syzkaller-00704-g3802b45594e1 #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:ffffc900001cf9d8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff88810c7e13c0
RDX: ffffc900001cfa60 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc900001cfa20 R08: ffffffff8135f3ed R09: fffff940008edbc7
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000005
FS: 00007fcc167e9380(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000010c72e000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
bpf_probe_read_kernel_str_common kernel/trace/bpf_trace.c:255 [inline]
____bpf_probe_read_kernel_str kernel/trace/bpf_trace.c:264 [inline]
bpf_probe_read_kernel_str+0x2a/0x70 kernel/trace/bpf_trace.c:261
bpf_prog_ef3a4661c9d1378e+0x42/0x4b4
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_run2+0xec/0x210 kernel/trace/bpf_trace.c:1920
__bpf_trace_kfree+0x6f/0x90 include/trace/events/kmem.h:118
trace_kfree include/trace/events/kmem.h:118 [inline]
kfree+0x1f3/0x220 mm/slub.c:4569
skb_free_head net/core/skbuff.c:656 [inline]
skb_release_data+0x8a9/0xa80 net/core/skbuff.c:678
skb_release_all net/core/skbuff.c:743 [inline]
__kfree_skb+0x50/0x70 net/core/skbuff.c:757
sk_wmem_free_skb include/net/sock.h:1634 [inline]
tcp_rtx_queue_unlink_and_free+0x203/0x720 include/net/tcp.h:1907
tcp_clean_rtx_queue net/ipv4/tcp_input.c:3343 [inline]
tcp_ack+0x23e0/0x68a0 net/ipv4/tcp_input.c:3900
tcp_rcv_established+0xcd6/0x1ac0 net/ipv4/tcp_input.c:5904
tcp_v4_do_rcv+0x3d7/0xa00 net/ipv4/tcp_ipv4.c:1722
tcp_v4_rcv+0x23dd/0x2a70 net/ipv4/tcp_ipv4.c:2125
ip_protocol_deliver_rcu+0x32f/0x710 net/ipv4/ip_input.c:204
ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline]
NF_HOOK include/linux/netfilter.h:305 [inline]
ip_local_deliver+0x2c6/0x590 net/ipv4/ip_input.c:252
dst_input include/net/dst.h:454 [inline]
ip_sublist_rcv_finish net/ipv4/ip_input.c:577 [inline]
ip_list_rcv_finish net/ipv4/ip_input.c:628 [inline]
ip_sublist_rcv+0x7e2/0x980 net/ipv4/ip_input.c:636
ip_list_rcv+0x422/0x470 net/ipv4/ip_input.c:671
__netif_receive_skb_list_ptype net/core/dev.c:5535 [inline]
__netif_receive_skb_list_core+0x6b1/0x890 net/core/dev.c:5583
__netif_receive_skb_list net/core/dev.c:5635 [inline]
netif_receive_skb_list_internal+0x967/0xcc0 net/core/dev.c:5726
gro_normal_list net/core/dev.c:5880 [inline]
napi_complete_done+0x344/0x770 net/core/dev.c:6618
virtqueue_napi_complete drivers/net/virtio_net.c:357 [inline]
virtnet_poll+0xbee/0x1260 drivers/net/virtio_net.c:1592
__napi_poll+0xc4/0x5a0 net/core/dev.c:7042
napi_poll net/core/dev.c:7109 [inline]
net_rx_action+0x47d/0xc50 net/core/dev.c:7196
__do_softirq+0x26d/0x5bf kernel/softirq.c:565
invoke_softirq kernel/softirq.c:425 [inline]
__irq_exit_rcu+0x50/0xf0 kernel/softirq.c:648
irq_exit_rcu+0x9/0x10 kernel/softirq.c:660
sysvec_call_function_single+0x97/0xb0 arch/x86/kernel/smp.c:243
</IRQ>
<TASK>
asm_sysvec_call_function_single+0x1b/0x20 arch/x86/include/asm/idtentry.h:646
RIP: 0010:_compound_head include/linux/page-flags.h:201 [inline]
RIP: 0010:virt_to_head_page include/linux/mm.h:948 [inline]
RIP: 0010:__ksize+0x4d/0xe0 mm/slub.c:4553
Code: 09 48 8b 15 45 fc cf 04 eb 0a 48 ba 00 00 00 80 7f 77 00 00 48 01 d0 48 2d 00 00 00 80 48 c1 e8 0c 48 c1 e0 06 48 8b 7c 08 08 <40> f6 c7 01 75 51 48 01 c1 48 89 cf 48 8b 47 08 48 89 f9 a8 01 75
RSP: 0018:ffffc900009d7860 EFLAGS: 00000206
RAX: 0000000004773cc0 RBX: ffff88811dcf3800 RCX: ffffea0000000000
RDX: 0000777f80000000 RSI: fffffffeddde5800 RDI: ffffea0004773c01
RBP: ffffc900009d7860 R08: ffffffff81b24141 R09: 000000000000000b
R10: ffffc900009d7550 R11: dffffc0000000001 R12: 0000000000400cc0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88811dcf3800
ksize+0x35/0x50 mm/slab_common.c:1331
__alloc_skb+0x168/0x550 net/core/skbuff.c:435
alloc_skb include/linux/skbuff.h:1183 [inline]
alloc_skb_with_frags+0xa6/0x680 net/core/skbuff.c:6156
sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2525
unix_dgram_sendmsg+0x6fd/0x2090 net/unix/af_unix.c:1812
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
__sys_sendto+0x564/0x720 net/socket.c:2058
__do_sys_sendto net/socket.c:2070 [inline]
__se_sys_sendto net/socket.c:2066 [inline]
__x64_sys_sendto+0xe5/0x100 net/socket.c:2066
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fcc1694b9b5
Code: 8b 44 24 08 48 83 c4 28 48 98 c3 48 98 c3 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 26 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 7a 48 8b 15 44 c4 0c 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffd0f975728 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcc1694b9b5
RDX: 000000000000012f RSI: 000055b177ae98a0 RDI: 0000000000000003
RBP: 000055b177ae42c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000013
R13: 00007fcc16ad9212 R14: 00007ffd0f975828 R15: 0000000000000000
</TASK>
Modules linked in:
CR2: ffffffffff600000
---[ end trace 6d987446d3744679 ]---
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:ffffc900001cf9d8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffff600000 RCX: ffff88810c7e13c0
RDX: ffffc900001cfa60 RSI: ffffffffff600000 RDI: ffffffffff600000
RBP: ffffc900001cfa20 R08: ffffffff8135f3ed R09: fffff940008edbc7
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffffff600000 R14: dffffc0000000000 R15: 0000000000000005
FS: 00007fcc167e9380(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000010c72e000 CR4: 00000000003506a0
Reply all
Reply to author
Forward
0 new messages