[v5.15] BUG: unable to handle kernel paging request in copy_from_kernel_nofault

3 views
Skip to first unread message

syzbot

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

syzbot found the following issue on:

HEAD commit: 80529b4968a8 Linux 5.15.138
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16b61150e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=c431dbb457f792c5
dashboard link: https://syzkaller.appspot.com/bug?extid=96daa2fe3463c3f8e0b0
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=1321a6b8e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1442afc4e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8c87dd6ae2e4/disk-80529b49.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2a47ef8335f7/vmlinux-80529b49.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e8d50f725356/bzImage-80529b49.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+96daa2...@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 c691067 P4D c691067 PUD c693067 PMD c6b6067 PTE 800000000c609165
Oops: 0001 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 38 Comm: kworker/1:1 Not tainted 5.15.138-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Workqueue: events bpf_prog_free_deferred
RIP: 0010:copy_from_kernel_nofault+0x7d/0x2d0 mm/maccess.c:37
Code: 01 84 c0 0f 85 ed 01 00 00 41 ff 06 bf 07 00 00 00 4c 89 ee e8 d4 f2 d5 ff 49 83 fd 07 76 5c 4c 89 fb 49 83 c5 f8 49 83 c7 08 <49> 8b 2c 24 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 80
RSP: 0018:ffffc900010dfa00 EFLAGS: 00010292
RAX: 0000000000000000 RBX: ffffc900010dfa68 RCX: ffff888014d83b80
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000007
RBP: ffffc900010dfa70 R08: ffffffff81aa335c R09: fffffbfff1f79c21
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffff600000
R13: 0000000000000000 R14: ffff888014d85308 R15: ffffc900010dfa70
FS: 0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000001d8fa000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bpf_probe_read_kernel_common kernel/trace/bpf_trace.c:220 [inline]
____bpf_probe_read_kernel kernel/trace/bpf_trace.c:229 [inline]
bpf_probe_read_kernel+0x26/0x70 kernel/trace/bpf_trace.c:226
bpf_prog_bd8b22826c103b08+0x3a/0x65c
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_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1920
__bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:118
trace_kfree include/trace/events/kmem.h:118 [inline]
kfree+0x22f/0x270 mm/slub.c:4549
__vunmap+0x977/0xa20 mm/vmalloc.c:2626
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</TASK>
Modules linked in:
CR2: ffffffffff600000
---[ end trace c4788fdc6a5c6e02 ]---
RIP: 0010:copy_from_kernel_nofault+0x7d/0x2d0 mm/maccess.c:37
Code: 01 84 c0 0f 85 ed 01 00 00 41 ff 06 bf 07 00 00 00 4c 89 ee e8 d4 f2 d5 ff 49 83 fd 07 76 5c 4c 89 fb 49 83 c5 f8 49 83 c7 08 <49> 8b 2c 24 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 80
RSP: 0018:ffffc900010dfa00 EFLAGS: 00010292
RAX: 0000000000000000 RBX: ffffc900010dfa68 RCX: ffff888014d83b80
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000007
RBP: ffffc900010dfa70 R08: ffffffff81aa335c R09: fffffbfff1f79c21
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffff600000
R13: 0000000000000000 R14: ffff888014d85308 R15: ffffc900010dfa70
FS: 0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600000 CR3: 000000001d8fa000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 01 84 c0 0f 85 ed 01 add %eax,0x1ed850f(%rax,%rax,8)
7: 00 00 add %al,(%rax)
9: 41 ff 06 incl (%r14)
c: bf 07 00 00 00 mov $0x7,%edi
11: 4c 89 ee mov %r13,%rsi
14: e8 d4 f2 d5 ff call 0xffd5f2ed
19: 49 83 fd 07 cmp $0x7,%r13
1d: 76 5c jbe 0x7b
1f: 4c 89 fb mov %r15,%rbx
22: 49 83 c5 f8 add $0xfffffffffffffff8,%r13
26: 49 83 c7 08 add $0x8,%r15
* 2a: 49 8b 2c 24 mov (%r12),%rbp <-- trapping instruction
2e: 48 89 d8 mov %rbx,%rax
31: 48 c1 e8 03 shr $0x3,%rax
35: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
3c: fc ff df
3f: 80 .byte 0x80


---
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,
Mar 27, 2024, 9:25:03 PMMar 27
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit e8a67fe34b76a49320b33032228a794f40b0316b
Author: Hou Tao <hou...@huawei.com>
Date: Fri Feb 2 10:39:34 2024 +0000

x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11238921180000
start commit: 458ce51d0356 Linux 5.15.149
git tree: linux-5.15.y
kernel config: https://syzkaller.appspot.com/x/.config?x=8c016b4e71f1c777
dashboard link: https://syzkaller.appspot.com/bug?extid=96daa2fe3463c3f8e0b0
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=116e10e4180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10562c74180000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault()

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