syzbot


KASAN: wild-memory-access Read in page_remove_rmap

Status: premoderation: reported syz repro on 2025/12/03 06:27
Reported-by: syzbot+446650ab2bdefa5e3a61@syzkaller.appspotmail.com
First crash: 5d18h, last: 7h28m

Sample crash report:
==================================================================
BUG: KASAN: wild-memory-access in instrument_atomic_read include/linux/instrumented.h:71 [inline]
BUG: KASAN: wild-memory-access in atomic_read include/asm-generic/atomic-instrumented.h:27 [inline]
BUG: KASAN: wild-memory-access in lock_page_memcg+0xa6/0x1c0 mm/memcontrol.c:2153
Read of size 4 at addr 00ff8881001409c0 by task syz.8.1010/3345

CPU: 0 PID: 3345 Comm: syz.8.1010 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118
 __kasan_report mm/kasan/report.c:439 [inline]
 kasan_report+0xd8/0x130 mm/kasan/report.c:452
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x280/0x290 mm/kasan/generic.c:189
 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 atomic_read include/asm-generic/atomic-instrumented.h:27 [inline]
 lock_page_memcg+0xa6/0x1c0 mm/memcontrol.c:2153
 page_remove_rmap+0x2e/0xe70 mm/rmap.c:1346
 zap_pte_range mm/memory.c:1315 [inline]
 zap_pmd_range mm/memory.c:1435 [inline]
 zap_pud_range mm/memory.c:1464 [inline]
 zap_p4d_range mm/memory.c:1485 [inline]
 unmap_page_range+0x103c/0x20c0 mm/memory.c:1506
 unmap_single_vma mm/memory.c:1551 [inline]
 unmap_vmas+0x248/0x340 mm/memory.c:1583
 exit_mmap+0x2dc/0x540 mm/mmap.c:3385
 __mmput+0x93/0x2f0 kernel/fork.c:1153
 mmput+0x4e/0x150 kernel/fork.c:1176
 exit_mm kernel/exit.c:539 [inline]
 do_exit+0x9ae/0x2480 kernel/exit.c:859
 do_group_exit+0x141/0x310 kernel/exit.c:986
 get_signal+0xf7d/0x12e0 kernel/signal.c:2793
 arch_do_signal_or_restart+0xbf/0x10f0 arch/x86/kernel/signal.c:805
 handle_signal_work kernel/entry/common.c:145 [inline]
 exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:169
 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199
 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:274
 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f102c338749
Code: Unable to access opcode bytes at RIP 0x7f102c33871f.
RSP: 002b:00007f102c1870e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f102c58f098 RCX: 00007f102c338749
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f102c58f098
RBP: 00007f102c58f090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f102c58f128 R14: 00007ffc59275900 R15: 00007ffc592759e8
==================================================================
general protection fault, probably for non-canonical address 0xe01fed1020028138: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0x00ff8881001409c0-0x00ff8881001409c7]
CPU: 0 PID: 3345 Comm: syz.8.1010 Tainted: G    B             syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
RIP: 0010:arch_atomic_read arch/x86/include/asm/atomic.h:29 [inline]
RIP: 0010:atomic_read include/asm-generic/atomic-instrumented.h:28 [inline]
RIP: 0010:lock_page_memcg+0xb7/0x1c0 mm/memcontrol.c:2153
Code: 00 00 49 89 c6 4c 8d b8 c0 09 00 00 4c 89 ff be 04 00 00 00 e8 6a e3 fc ff 4c 89 f8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 75 69 41 83 3f 00 0f 8e d1 00 00 00 4d 8d a6 d0
RSP: 0018:ffffc90003877510 EFLAGS: 00010202
RAX: 001ff11020028138 RBX: ffffea0004f3aff8 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90003877538 R08: 0000000000000004 R09: 0000000000000003
R10: fffffbfff0d8f048 R11: 1ffffffff0d8f048 R12: 0000000000000001
R13: 1ffffd40009e75ff R14: 00ff888100140000 R15: 00ff8881001409c0
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000020000000a000 CR3: 000000000620f000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 page_remove_rmap+0x2e/0xe70 mm/rmap.c:1346
 zap_pte_range mm/memory.c:1315 [inline]
 zap_pmd_range mm/memory.c:1435 [inline]
 zap_pud_range mm/memory.c:1464 [inline]
 zap_p4d_range mm/memory.c:1485 [inline]
 unmap_page_range+0x103c/0x20c0 mm/memory.c:1506
 unmap_single_vma mm/memory.c:1551 [inline]
 unmap_vmas+0x248/0x340 mm/memory.c:1583
 exit_mmap+0x2dc/0x540 mm/mmap.c:3385
 __mmput+0x93/0x2f0 kernel/fork.c:1153
 mmput+0x4e/0x150 kernel/fork.c:1176
 exit_mm kernel/exit.c:539 [inline]
 do_exit+0x9ae/0x2480 kernel/exit.c:859
 do_group_exit+0x141/0x310 kernel/exit.c:986
 get_signal+0xf7d/0x12e0 kernel/signal.c:2793
 arch_do_signal_or_restart+0xbf/0x10f0 arch/x86/kernel/signal.c:805
 handle_signal_work kernel/entry/common.c:145 [inline]
 exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:169
 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199
 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:274
 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f102c338749
Code: Unable to access opcode bytes at RIP 0x7f102c33871f.
RSP: 002b:00007f102c1870e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f102c58f098 RCX: 00007f102c338749
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f102c58f098
RBP: 00007f102c58f090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f102c58f128 R14: 00007ffc59275900 R15: 00007ffc592759e8
Modules linked in:
---[ end trace e98c6074a4d232fd ]---
RIP: 0010:arch_atomic_read arch/x86/include/asm/atomic.h:29 [inline]
RIP: 0010:atomic_read include/asm-generic/atomic-instrumented.h:28 [inline]
RIP: 0010:lock_page_memcg+0xb7/0x1c0 mm/memcontrol.c:2153
Code: 00 00 49 89 c6 4c 8d b8 c0 09 00 00 4c 89 ff be 04 00 00 00 e8 6a e3 fc ff 4c 89 f8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 75 69 41 83 3f 00 0f 8e d1 00 00 00 4d 8d a6 d0
RSP: 0018:ffffc90003877510 EFLAGS: 00010202
RAX: 001ff11020028138 RBX: ffffea0004f3aff8 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90003877538 R08: 0000000000000004 R09: 0000000000000003
R10: fffffbfff0d8f048 R11: 1ffffffff0d8f048 R12: 0000000000000001
R13: 1ffffd40009e75ff R14: 00ff888100140000 R15: 00ff8881001409c0
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000020000000a000 CR3: 000000000620f000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	49 89 c6             	mov    %rax,%r14
   5:	4c 8d b8 c0 09 00 00 	lea    0x9c0(%rax),%r15
   c:	4c 89 ff             	mov    %r15,%rdi
   f:	be 04 00 00 00       	mov    $0x4,%esi
  14:	e8 6a e3 fc ff       	call   0xfffce383
  19:	4c 89 f8             	mov    %r15,%rax
  1c:	48 c1 e8 03          	shr    $0x3,%rax
  20:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  27:	fc ff df
* 2a:	0f b6 04 08          	movzbl (%rax,%rcx,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	75 69                	jne    0x9b
  32:	41 83 3f 00          	cmpl   $0x0,(%r15)
  36:	0f 8e d1 00 00 00    	jle    0x10d
  3c:	4d                   	rex.WRB
  3d:	8d                   	.byte 0x8d
  3e:	a6                   	cmpsb  %es:(%rdi),%ds:(%rsi)
  3f:	d0                   	.byte 0xd0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/03 06:26 android13-5.10-lts 9286af17ed5f d6526ea3 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: wild-memory-access Read in page_remove_rmap
2025/12/08 17:24 android13-5.10-lts 9286af17ed5f d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: wild-memory-access Read in page_remove_rmap
* Struck through repros no longer work on HEAD.