syzbot


KASAN: global-out-of-bounds Read in handle_mm_fault

Status: auto-obsoleted due to no activity on 2025/07/21 09:13
First crash: 128d, last: 128d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in handle_mm_fault mm 19 C done 107 405d 408d 1/29 upstream: reported C repro on 2024/07/16 08:29

Sample crash report:
==================================================================
BUG: KASAN: global-out-of-bounds in __get_fault_gfp_mask mm/memory.c:2337 [inline]
BUG: KASAN: global-out-of-bounds in __handle_mm_fault mm/memory.c:4111 [inline]
BUG: KASAN: global-out-of-bounds in handle_mm_fault+0x396/0x4920 mm/memory.c:4220
Read of size 8 at addr ffffffff8659a558 by task syz.0.1544/6305

CPU: 1 PID: 6305 Comm: syz.0.1544 Not tainted 5.4.290-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1d8/0x241 lib/dump_stack.c:118
 print_address_description+0x8c/0x600 mm/kasan/report.c:384
 __kasan_report+0xf3/0x120 mm/kasan/report.c:516
 kasan_report+0x30/0x60 mm/kasan/common.c:653
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
 __get_fault_gfp_mask mm/memory.c:2337 [inline]
 __handle_mm_fault mm/memory.c:4111 [inline]
 handle_mm_fault+0x396/0x4920 mm/memory.c:4220
 faultin_page mm/gup.c:654 [inline]
 __get_user_pages+0xc0b/0x13b0 mm/gup.c:874
 get_dump_page+0x116/0x1a0 mm/gup.c:1363
 elf_core_dump+0x3de9/0x4740 fs/binfmt_elf.c:2349
 do_coredump+0x20fb/0x2f00 fs/coredump.c:801
 get_signal+0xdef/0x14b0 kernel/signal.c:2732
 do_signal+0xb3/0xf10 arch/x86/kernel/signal.c:809
 exit_to_usermode_loop+0xc4/0x1b0 arch/x86/entry/common.c:159
 prepare_exit_to_usermode+0x19c/0x200 arch/x86/entry/common.c:194
 ret_from_intr+0x1c/0x1c
RIP: 0033:0x7f02b4566171
Code: 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 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f
RSP: 002b:0000000000000020 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007f02b478e160 RCX: 00007f02b4566169
RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000011
RBP: 00007f02b45e8a68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f02b478e160 R15: 00007ffc1d508af8

The buggy address belongs to the variable:
 pernet_ops_rwsem+0x58/0x60

Memory state around the buggy address:
 ffffffff8659a400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff8659a480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffff8659a500: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 00
                                                    ^
 ffffffff8659a580: 00 00 fa fa fa fa fa fa 00 fa fa fa 00 00 fa fa
 ffffffff8659a600: 00 00 00 00 00 00 00 00 fa fa fa fa 04 fa fa fa
==================================================================
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 6305 Comm: syz.0.1544 Tainted: G    B             5.4.290-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:mapping_gfp_mask include/linux/pagemap.h:105 [inline]
RIP: 0010:__get_fault_gfp_mask mm/memory.c:2337 [inline]
RIP: 0010:__handle_mm_fault mm/memory.c:4111 [inline]
RIP: 0010:handle_mm_fault+0x3a4/0x4920 mm/memory.c:4220
Code: 81 c3 f0 00 00 00 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 8a d5 08 00 48 8b 1b 48 83 c3 18 48 89 d8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 2b 3f 00 00 41 bc c0 00 00 00 44 0b 23
RSP: 0018:ffff8881d95d70a0 EFLAGS: 00010206
RAX: 0000000000000003 RBX: 0000000000000018 RCX: ffff8881e7f01f80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffff8881d95d72d0 R08: ffffffff813b9dbb R09: 0000000000000003
R10: fffffbfff0d29e5c R11: dffffc0000000001 R12: ffff8881d95d7180
R13: dffffc0000000000 R14: ffff8881e0adf128 R15: ffff8881d95d718c
FS:  00007f02b2b8d6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0c9dd18038 CR3: 00000001e6771000 CR4: 00000000003406b0
DR0: 0000200000000300 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
 faultin_page mm/gup.c:654 [inline]
 __get_user_pages+0xc0b/0x13b0 mm/gup.c:874
 get_dump_page+0x116/0x1a0 mm/gup.c:1363
 elf_core_dump+0x3de9/0x4740 fs/binfmt_elf.c:2349
 do_coredump+0x20fb/0x2f00 fs/coredump.c:801
 get_signal+0xdef/0x14b0 kernel/signal.c:2732
 do_signal+0xb3/0xf10 arch/x86/kernel/signal.c:809
 exit_to_usermode_loop+0xc4/0x1b0 arch/x86/entry/common.c:159
 prepare_exit_to_usermode+0x19c/0x200 arch/x86/entry/common.c:194
 ret_from_intr+0x1c/0x1c
RIP: 0033:0x7f02b4566171
Code: 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 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f
RSP: 002b:0000000000000020 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007f02b478e160 RCX: 00007f02b4566169
RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000011
RBP: 00007f02b45e8a68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f02b478e160 R15: 00007ffc1d508af8
Modules linked in:
---[ end trace cc98058368dff68f ]---
RIP: 0010:mapping_gfp_mask include/linux/pagemap.h:105 [inline]
RIP: 0010:__get_fault_gfp_mask mm/memory.c:2337 [inline]
RIP: 0010:__handle_mm_fault mm/memory.c:4111 [inline]
RIP: 0010:handle_mm_fault+0x3a4/0x4920 mm/memory.c:4220
Code: 81 c3 f0 00 00 00 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 8a d5 08 00 48 8b 1b 48 83 c3 18 48 89 d8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 2b 3f 00 00 41 bc c0 00 00 00 44 0b 23
RSP: 0018:ffff8881d95d70a0 EFLAGS: 00010206
RAX: 0000000000000003 RBX: 0000000000000018 RCX: ffff8881e7f01f80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffff8881d95d72d0 R08: ffffffff813b9dbb R09: 0000000000000003
R10: fffffbfff0d29e5c R11: dffffc0000000001 R12: ffff8881d95d7180
R13: dffffc0000000000 R14: ffff8881e0adf128 R15: ffff8881d95d718c
FS:  00007f02b2b8d6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0c9e849d60 CR3: 00000001e6771000 CR4: 00000000003406a0
DR0: 0000200000000300 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
----------------
Code disassembly (best guess):
   0:	81 c3 f0 00 00 00    	add    $0xf0,%ebx
   6:	48 89 d8             	mov    %rbx,%rax
   9:	48 c1 e8 03          	shr    $0x3,%rax
   d:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
  12:	74 08                	je     0x1c
  14:	48 89 df             	mov    %rbx,%rdi
  17:	e8 8a d5 08 00       	call   0x8d5a6
  1c:	48 8b 1b             	mov    (%rbx),%rbx
  1f:	48 83 c3 18          	add    $0x18,%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 28       	movzbl (%rax,%r13,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 2b 3f 00 00    	jne    0x3f62
  37:	41 bc c0 00 00 00    	mov    $0xc0,%r12d
  3d:	44 0b 23             	or     (%rbx),%r12d

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/22 09:07 android12-5.4 41adfeb3d639 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: global-out-of-bounds Read in handle_mm_fault
* Struck through repros no longer work on HEAD.