syzbot


BUG: unable to handle kernel paging request in __pte_offset_map_lock

Status: fixed on 2024/01/20 21:18
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+89edd67979b52675ddec@syzkaller.appspotmail.com
Fix commit: 9aa1345d66b8 mm: fix oops when filemap_map_pmd() without prealloc_pte
First crash: 210d, last: 196d
Discussions (5)
Title Replies (including bot) Last reply
[PATCH] mm: fix oops when filemap_map_pmd() without prealloc_pte 2 (2) 2023/11/28 18:18
Re: [PATCH] mm/pgtable: return null if no ptl in __pte_offset_map_lock 3 (3) 2023/11/17 09:16
[syzbot] [mm?] BUG: unable to handle kernel paging request in __pte_offset_map_lock 3 (11) 2023/11/17 06:24
[PATCH] mm/pgtable: return null if no ptl in __pte_offset_map_lock 4 (4) 2023/11/15 19:04
[syzbot] Monthly mm report (Nov 2023) 0 (1) 2023/11/15 03:00
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in __pte_offset_map_lock mm C done 27 1d21h 14d 0/26 upstream: reported C repro on 2024/05/05 18:37
Last patch testing requests (8)
Created Duration User Patch Repo Result
2023/11/17 05:42 25m hughd@google.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b85ea95d086471afb4ad062012a4d73cd328fa86 OK log
2023/11/16 07:40 18m hughd@google.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b85ea95d086471afb4ad062012a4d73cd328fa86 report log
2023/11/14 18:25 21m jose.pekkarinen@foxhound.fi patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 03d1179639b1515dce087335c1fb5c962908683b report log
2023/11/14 17:10 26m jose.pekkarinen@foxhound.fi patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 03d1179639b1515dce087335c1fb5c962908683b report log
2023/11/14 15:43 22m jose.pekkarinen@foxhound.fi patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 03d1179639b1515dce087335c1fb5c962908683b report log
2023/11/14 11:47 18m jose.pekkarinen@foxhound.fi patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 03d1179639b1515dce087335c1fb5c962908683b report log
2023/11/14 11:30 20m jose.pekkarinen@foxhound.fi patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 03d1179639b1515dce087335c1fb5c962908683b report log
2023/11/05 23:45 20m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log

Sample crash report:
Unable to handle kernel paging request at virtual address dfff800000000004
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
Mem abort info:
  ESR = 0x0000000096000005
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x05: level 1 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
  CM = 0, WnR = 0, TnD = 0, TagAccess = 0
  GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[dfff800000000004] address between user and kernel address ranges
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 7952 Comm: syz-executor682 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
lr : lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
sp : ffff800098f26d40
x29: ffff800098f27000 x28: ffff8000808df4bc x27: ffff7000131e4e18
x26: 1ffff00011c340b9 x25: 0000000000000000 x24: 0000000000000000
x23: ffff7000131e4dd0 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 0000000000000022 x18: ffff800098f27750
x17: 0000ffff833dafff x16: ffff80008a632120 x15: 0000000000000001
x14: ffff80008e1a05d0 x13: ffff800098f26e80 x12: dfff800000000000
x11: ffff800080319468 x10: ffff80008e1a05cc x9 : 00000000000000f3
x8 : 0000000000000004 x7 : ffff8000808df4bc x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000022
Call trace:
 __lock_acquire+0x104/0x75e8 kernel/locking/lockdep.c:5004
 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 __pte_offset_map_lock+0x154/0x360 mm/pgtable-generic.c:373
 pte_offset_map_lock include/linux/mm.h:2939 [inline]
 filemap_map_pages+0x698/0x11f0 mm/filemap.c:3582
 do_fault_around mm/memory.c:4525 [inline]
 do_read_fault mm/memory.c:4558 [inline]
 do_fault mm/memory.c:4705 [inline]
 do_pte_missing mm/memory.c:3669 [inline]
 handle_pte_fault mm/memory.c:4978 [inline]
 __handle_mm_fault mm/memory.c:5119 [inline]
 handle_mm_fault+0x326c/0x49fc mm/memory.c:5284
 faultin_page mm/gup.c:956 [inline]
 __get_user_pages+0x3e0/0xa24 mm/gup.c:1239
 populate_vma_page_range+0x254/0x328 mm/gup.c:1666
 __mm_populate+0x240/0x3d8 mm/gup.c:1775
 mm_populate include/linux/mm.h:3305 [inline]
 vm_mmap_pgoff+0x2bc/0x3d4 mm/util.c:551
 ksys_mmap_pgoff+0xd0/0x5b0 mm/mmap.c:1400
 __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
 __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
 __arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
Code: b006f948 b943a108 34000208 d343fe68 (386c6908) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	b006f948 	adrp	x8, 0xdf29000
   4:	b943a108 	ldr	w8, [x8, #928]
   8:	34000208 	cbz	w8, 0x48
   c:	d343fe68 	lsr	x8, x19, #3
* 10:	386c6908 	ldrb	w8, [x8, x12] <-- trapping instruction

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/22 22:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 78124b0c1d10 361b23dc .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in __pte_offset_map_lock
2023/10/22 15:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 78124b0c1d10 361b23dc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in __pte_offset_map_lock
* Struck through repros no longer work on HEAD.