syzbot


general protection fault in lock_vma_under_rcu

Status: upstream: reported syz repro on 2025/02/25 08:10
Subsystems: io-uring mm
[Documentation on labels]
Reported-by: syzbot+556fda2d78f9b0daa141@syzkaller.appspotmail.com
Fix commit: mm: fix a crash due to vma_end_read() that should have been removed
Patched on: [], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 17d, last: 13d
Cause bisection: introduced by (bisect log) :
commit 0670f2f4d6ff1cd6aa351389130ba7bbafb02320
Author: Suren Baghdasaryan <surenb@google.com>
Date: Thu Feb 13 22:46:49 2025 +0000

  mm: replace vm_lock and detached flag with a reference count

Crash: BUG: unable to handle kernel NULL pointer dereference in lock_vma_under_rcu (log)
Repro: syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [io-uring?] [mm?] general protection fault in lock_vma_under_rcu 3 (6) 2025/02/25 09:03
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/02/25 08:43 14m eadavis@qq.com patch linux-next error
2025/02/25 08:37 10m eadavis@qq.com patch linux-next error

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 UID: 0 PID: 27018 Comm: syz.1.4414 Not tainted 6.14.0-rc3-next-20250218-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:vma_refcount_put include/linux/mm.h:712 [inline]
RIP: 0010:vma_end_read include/linux/mm.h:811 [inline]
RIP: 0010:lock_vma_under_rcu+0x578/0xac0 mm/memory.c:6454
Code: be 5d b1 ff 49 be 00 00 00 00 00 fc ff df 4d 85 ff 74 0d 49 81 ff 01 f0 ff ff 0f 82 a3 02 00 00 49 83 ff f5 0f 85 55 03 00 00 <41> 80 3e 00 74 0a bf 05 00 00 00 e8 28 df 18 00 4c 8b 34 25 05 00
RSP: 0000:ffffc9000b837d80 EFLAGS: 00010246
RAX: fffffffffffffff5 RBX: 0000000000000000 RCX: ffff888079eb8000
RDX: ffff888079eb8000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000b837ed8 R08: ffffffff8210a26a R09: 1ffff110068be328
R10: dffffc0000000000 R11: ffffed10068be329 R12: ffffc9000b837e10
R13: ffff88802890aa20 R14: dffffc0000000000 R15: fffffffffffffff5
FS:  00005555908b1500(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000400000002fc0 CR3: 0000000011df6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 do_user_addr_fault arch/x86/mm/fault.c:1328 [inline]
 handle_page_fault arch/x86/mm/fault.c:1480 [inline]
 exc_page_fault+0x17b/0x920 arch/x86/mm/fault.c:1538
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7f617a954ed8
Code: fc 89 37 c3 c5 fa 6f 06 c5 fa 6f 4c 16 f0 c5 fa 7f 07 c5 fa 7f 4c 17 f0 c3 66 0f 1f 84 00 00 00 00 00 48 8b 4c 16 f8 48 8b 36 <48> 89 37 48 89 4c 17 f8 c3 c5 fe 6f 54 16 e0 c5 fe 6f 5c 16 c0 c5
RSP: 002b:00007ffc20f24718 EFLAGS: 00010246
RAX: 0000400000002fc0 RBX: 0000000000000004 RCX: 0031313230386c6e
RDX: 0000000000000008 RSI: 0031313230386c6e RDI: 0000400000002fc0
RBP: 0000000000000000 R08: 00007f617a800000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000009 R12: 00007f617aba5fac
R13: 00007f617aba5fa0 R14: fffffffffffffffe R15: 0000000000000006
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:vma_refcount_put include/linux/mm.h:712 [inline]
RIP: 0010:vma_end_read include/linux/mm.h:811 [inline]
RIP: 0010:lock_vma_under_rcu+0x578/0xac0 mm/memory.c:6454
Code: be 5d b1 ff 49 be 00 00 00 00 00 fc ff df 4d 85 ff 74 0d 49 81 ff 01 f0 ff ff 0f 82 a3 02 00 00 49 83 ff f5 0f 85 55 03 00 00 <41> 80 3e 00 74 0a bf 05 00 00 00 e8 28 df 18 00 4c 8b 34 25 05 00
RSP: 0000:ffffc9000b837d80 EFLAGS: 00010246
RAX: fffffffffffffff5 RBX: 0000000000000000 RCX: ffff888079eb8000
RDX: ffff888079eb8000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000b837ed8 R08: ffffffff8210a26a R09: 1ffff110068be328
R10: dffffc0000000000 R11: ffffed10068be329 R12: ffffc9000b837e10
R13: ffff88802890aa20 R14: dffffc0000000000 R15: fffffffffffffff5
FS:  00005555908b1500(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff182f3cf98 CR3: 0000000011df6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	5d                   	pop    %rbp
   1:	b1 ff                	mov    $0xff,%cl
   3:	49 be 00 00 00 00 00 	movabs $0xdffffc0000000000,%r14
   a:	fc ff df
   d:	4d 85 ff             	test   %r15,%r15
  10:	74 0d                	je     0x1f
  12:	49 81 ff 01 f0 ff ff 	cmp    $0xfffffffffffff001,%r15
  19:	0f 82 a3 02 00 00    	jb     0x2c2
  1f:	49 83 ff f5          	cmp    $0xfffffffffffffff5,%r15
  23:	0f 85 55 03 00 00    	jne    0x37e
* 29:	41 80 3e 00          	cmpb   $0x0,(%r14) <-- trapping instruction
  2d:	74 0a                	je     0x39
  2f:	bf 05 00 00 00       	mov    $0x5,%edi
  34:	e8 28 df 18 00       	call   0x18df61
  39:	4c                   	rex.WR
  3a:	8b                   	.byte 0x8b
  3b:	34 25                	xor    $0x25,%al
  3d:	05                   	.byte 0x5

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/22 23:43 linux-next e5d3fd687aac d34966d1 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in lock_vma_under_rcu
2025/02/24 14:15 linux-next e5d3fd687aac d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in lock_vma_under_rcu
2025/02/21 07:58 linux-next e5d3fd687aac 0808a665 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in lock_vma_under_rcu
* Struck through repros no longer work on HEAD.