[v5.15] WARNING in bpf_probe_read_user

0 views
Skip to first unread message

syzbot

unread,
Nov 4, 2023, 2:36:22 PM11/4/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 12952a23a5da Linux 5.15.137
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14e5a6eb680000
kernel config: https://syzkaller.appspot.com/x/.config?x=fec74236cf840914
dashboard link: https://syzkaller.appspot.com/bug?extid=9fef5b251417ebc881c0
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d0102e80bd83/disk-12952a23.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ad4bb1832eb8/vmlinux-12952a23.xz
kernel image: https://storage.googleapis.com/syzbot-assets/530bbc85fac0/bzImage-12952a23.xz

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 20 at mm/maccess.c:226 copy_from_user_nofault+0x15c/0x1c0
Modules linked in:
CPU: 1 PID: 20 Comm: ksoftirqd/1 Not tainted 5.15.137-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:copy_from_user_nofault+0x15c/0x1c0 mm/maccess.c:226
Code: db 48 c7 c0 f2 ff ff ff 48 0f 44 c5 eb 0c e8 2b e7 d5 ff 48 c7 c0 f2 ff ff ff 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 14 e7 d5 ff <0f> 0b e9 1e ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c ef fe ff
RSP: 0018:ffffc90000da78a8 EFLAGS: 00010246
RAX: ffffffff81aa3b3c RBX: 0000000000000000 RCX: ffff8880129f0000
RDX: 0000000080000101 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff81aa3a4d R09: fffffbfff1f79a21
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000008 R14: 0000000000000000 R15: ffffc90000da7908
FS: 0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30721000 CR3: 000000008884e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bpf_probe_read_user_common kernel/trace/bpf_trace.c:157 [inline]
____bpf_probe_read_user kernel/trace/bpf_trace.c:166 [inline]
bpf_probe_read_user+0x26/0x70 kernel/trace/bpf_trace.c:163
bpf_prog_d20f016a5d369cb4+0x35/0xf5c
bpf_dispatcher_nop_func include/linux/bpf.h:776 [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+0x1d1/0x380 kernel/trace/bpf_trace.c:1921
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138
trace_kmem_cache_free include/trace/events/kmem.h:138 [inline]
kmem_cache_free+0x1ce/0x1f0 mm/slub.c:3516
rcu_do_batch kernel/rcu/tree.c:2510 [inline]
rcu_core+0xa15/0x1650 kernel/rcu/tree.c:2750
__do_softirq+0x3b3/0x93a kernel/softirq.c:558
run_ksoftirqd+0xc1/0x120 kernel/softirq.c:921
smpboot_thread_fn+0x51b/0x9d0 kernel/smpboot.c:164
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</TASK>


---
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 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,
Nov 4, 2023, 7:32:25 PM11/4/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 12952a23a5da Linux 5.15.137
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15f9440f680000
kernel config: https://syzkaller.appspot.com/x/.config?x=fec74236cf840914
dashboard link: https://syzkaller.appspot.com/bug?extid=9fef5b251417ebc881c0
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=11b387f3680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=139108df680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7e2dc2318d41/disk-12952a23.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/753b1c98a896/vmlinux-12952a23.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2ed1ab0d1e32/bzImage-12952a23.xz

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

------------[ cut here ]------------
WARNING: CPU: 0 PID: 14 at mm/maccess.c:226 copy_from_user_nofault+0x15c/0x1c0
Modules linked in:
CPU: 0 PID: 14 Comm: ksoftirqd/0 Not tainted 5.15.137-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:copy_from_user_nofault+0x15c/0x1c0 mm/maccess.c:226
Code: db 48 c7 c0 f2 ff ff ff 48 0f 44 c5 eb 0c e8 2b e7 d5 ff 48 c7 c0 f2 ff ff ff 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 14 e7 d5 ff <0f> 0b e9 1e ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c ef fe ff
RSP: 0018:ffffc90000d378a8 EFLAGS: 00010246
RAX: ffffffff81aa3b3c RBX: 0000000000000000 RCX: ffff88813fe21dc0
RDX: 0000000080000101 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff81aa3a4d R09: fffffbfff1f79a21
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000008 R14: 0000000000000000 R15: ffffc90000d37908
FS: 0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555b04ca8 CR3: 000000000c68e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bpf_probe_read_user_common kernel/trace/bpf_trace.c:157 [inline]
____bpf_probe_read_user kernel/trace/bpf_trace.c:166 [inline]
bpf_probe_read_user+0x26/0x70 kernel/trace/bpf_trace.c:163
</TASK>
Kernel panic - not syncing: kernel: panic_on_warn set ...
CPU: 0 PID: 14 Comm: ksoftirqd/0 Not tainted 5.15.137-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
panic+0x318/0x84d kernel/panic.c:309
__warn+0x2b2/0x300
report_bug+0x1b7/0x2e0 lib/bug.c:199
handle_bug+0x3d/0x70 arch/x86/kernel/traps.c:239
exc_invalid_op+0x16/0x40 arch/x86/kernel/traps.c:259
asm_exc_invalid_op+0x16/0x20 arch/x86/include/asm/idtentry.h:566
RIP: 0010:copy_from_user_nofault+0x15c/0x1c0 mm/maccess.c:226
Code: db 48 c7 c0 f2 ff ff ff 48 0f 44 c5 eb 0c e8 2b e7 d5 ff 48 c7 c0 f2 ff ff ff 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 14 e7 d5 ff <0f> 0b e9 1e ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c ef fe ff
RSP: 0018:ffffc90000d378a8 EFLAGS: 00010246
RAX: ffffffff81aa3b3c RBX: 0000000000000000 RCX: ffff88813fe21dc0
RDX: 0000000080000101 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff81aa3a4d R09: fffffbfff1f79a21
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000008 R14: 0000000000000000 R15: ffffc90000d37908
bpf_probe_read_user_common kernel/trace/bpf_trace.c:157 [inline]
____bpf_probe_read_user kernel/trace/bpf_trace.c:166 [inline]
bpf_probe_read_user+0x26/0x70 kernel/trace/bpf_trace.c:163
</TASK>
Kernel Offset: disabled
Rebooting in 86400 seconds..


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

syzbot

unread,
Nov 5, 2023, 7:54:07 PM11/5/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit d319f344561de23e810515d109c7278919bff7b0
git tree: upstream
Author: Alexei Starovoitov <a...@kernel.org>
Date: Mon Apr 10 17:43:44 2023 +0000

mm: Fix copy_from_user_nofault().

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=174ea00f680000
Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages