syzbot


general protection fault in madvise_cold_or_pageout_pte_range

Status: fixed on 2020/10/13 07:59
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+ecf80462cb7d5d552bc7@syzkaller.appspotmail.com
Fix commit: ce2684254bd4 mm: validate pmd after splitting
First crash: 1520d, last: 1508d
Cause bisection: introduced by (bisect log) :
commit 1a4e58cce84ee88129d5d49c064bd2852b481357
Author: Minchan Kim <minchan@kernel.org>
Date: Wed Sep 25 23:49:15 2019 +0000

  mm: introduce MADV_PAGEOUT

Crash: general protection fault in madvise_cold_pte_range (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.8 00/99] 5.8.13-rc1 review 110 (110) 2020/10/01 19:24
[PATCH 5.4 000/388] 5.4.69-rc1 review 392 (392) 2020/09/30 14:29
general protection fault in madvise_cold_or_pageout_pte_range 3 (4) 2020/09/26 08:36
Last patch testing requests (1)
Created Duration User Patch Repo Result
2020/09/14 12:36 9m anmol.karan123@gmail.com upstream report log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
CPU: 1 PID: 6854 Comm: syz-executor329 Not tainted 5.9.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__lock_acquire+0xd38/0x5780 kernel/locking/lockdep.c:4311
Code: 69 0b 41 bf 01 00 00 00 0f 86 8e 00 00 00 89 05 0e 10 69 0b e9 83 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 df 31 00 00 49 81 3e 00 15 9a 8c 0f 84 95 f3 ff
RSP: 0018:ffffc90005327700 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000003 RSI: 0000000000000000 RDI: 0000000000000018
RBP: ffff88809d60e3c0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000018 R15: 0000000000000000
FS:  000000000160d880(0000) GS:ffff8880ae500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002100003f CR3: 000000009e24b000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 lock_acquire+0x1f3/0xaf0 kernel/locking/lockdep.c:5029
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151
 spin_lock include/linux/spinlock.h:354 [inline]
 madvise_cold_or_pageout_pte_range+0xb0d/0x2f10 mm/madvise.c:389
 walk_pmd_range mm/pagewalk.c:89 [inline]
 walk_pud_range mm/pagewalk.c:160 [inline]
 walk_p4d_range mm/pagewalk.c:193 [inline]
 walk_pgd_range mm/pagewalk.c:229 [inline]
 __walk_page_range+0xeed/0x22c0 mm/pagewalk.c:331
 walk_page_range+0x20d/0x400 mm/pagewalk.c:427
 madvise_pageout_page_range mm/madvise.c:521 [inline]
 madvise_pageout+0x21b/0x390 mm/madvise.c:557
 madvise_vma mm/madvise.c:946 [inline]
 do_madvise.part.0+0x659/0x1d00 mm/madvise.c:1145
 do_madvise mm/madvise.c:1169 [inline]
 __do_sys_madvise mm/madvise.c:1171 [inline]
 __se_sys_madvise mm/madvise.c:1169 [inline]
 __x64_sys_madvise+0xd9/0x110 mm/madvise.c:1169
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4440e9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 db d7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffaa5be0a8 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004440e9
RDX: 0000000000000015 RSI: 0000000000600003 RDI: 0000000020000000
RBP: 00000000006ce018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000401d50
R13: 0000000000401de0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 06ad33b1be53d83b ]---
RIP: 0010:__lock_acquire+0xd38/0x5780 kernel/locking/lockdep.c:4311
Code: 69 0b 41 bf 01 00 00 00 0f 86 8e 00 00 00 89 05 0e 10 69 0b e9 83 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 df 31 00 00 49 81 3e 00 15 9a 8c 0f 84 95 f3 ff
RSP: 0018:ffffc90005327700 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000003 RSI: 0000000000000000 RDI: 0000000000000018
RBP: ffff88809d60e3c0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000018 R15: 0000000000000000
FS:  000000000160d880(0000) GS:ffff8880ae500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002100003f CR3: 000000009e24b000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/24 08:52 upstream c9c9e6a49f89 54289b08 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/09/23 20:44 upstream 805c6d3c1921 287cd75a .config console log report syz C ci-upstream-kasan-gce-root
2020/09/12 20:39 upstream 729e3d091984 ce441f06 .config console log report syz C ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.