syzbot


general protection fault in unpin_user_pages

Status: fixed on 2020/07/17 17:58
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+118ac0af4ac7f785a45b@syzkaller.appspotmail.com
Fix commit: f78cdbd75a57 rds: fix crash in rds_info_getsockopt()
First crash: 1670d, last: 1667d
Cause bisection: introduced by (bisect log) :
commit dbfe7d74376e187f3c6eaff822e85176bc2cd06e
Author: John Hubbard <jhubbard@nvidia.com>
Date: Sun May 17 01:23:36 2020 +0000

  rds: convert get_user_pages() --> pin_user_pages()

Crash: general protection fault in unpin_user_pages (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] rds: fix crash in rds_info_getsockopt() 3 (3) 2020/05/20 21:08
general protection fault in unpin_user_pages 0 (1) 2020/05/20 18:12

Sample crash report:
RBP: 0000000000000004 R08: 0000000020000000 R09: 00007ffcb8e40031
R10: 0000000020c35fff R11: 0000000000000246 R12: 0000000000401e40
R13: 0000000000401ed0 R14: 0000000000000000 R15: 0000000000000000
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 7038 Comm: syz-executor593 Not tainted 5.7.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:unpin_user_pages+0x38/0x80 mm/gup.c:338
Code: 56 d3 ff 31 ff 4c 89 e6 e8 a5 57 d3 ff 4d 85 e4 74 3f 49 bd 00 00 00 00 00 fc ff df 31 ed e8 ff 55 d3 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 75 2b 48 8b 3b 48 83 c5 01 48 83 c3 08 e8 51 f8 ff
RSP: 0018:ffffc90002537cc8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff819fdc9b
RDX: 0000000000000000 RSI: ffffffff819fdcb1 RDI: 0000000000000007
RBP: 0000000000000000 R08: ffff88809ff6e0c0 R09: ffffed1015ce7164
R10: ffff8880ae738b1b R11: ffffed1015ce7163 R12: 0000000000000011
R13: dffffc0000000000 R14: 0000000000000011 R15: 0000000020c35fff
FS:  0000000000d95880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6870abd000 CR3: 000000009a8e7000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 rds_info_getsockopt+0x291/0x410 net/rds/info.c:237
 rds_getsockopt+0x172/0x2d0 net/rds/af_rds.c:502
 __sys_getsockopt+0x14b/0x2e0 net/socket.c:2172
 __do_sys_getsockopt net/socket.c:2187 [inline]
 __se_sys_getsockopt net/socket.c:2184 [inline]
 __x64_sys_getsockopt+0xba/0x150 net/socket.c:2184
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x440559
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 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcb8e48ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007ffcb8e48eb0 RCX: 0000000000440559
RDX: 0000000000002710 RSI: 0000000000000114 RDI: 0000000000000003
RBP: 0000000000000004 R08: 0000000020000000 R09: 00007ffcb8e40031
R10: 0000000020c35fff R11: 0000000000000246 R12: 0000000000401e40
R13: 0000000000401ed0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace c9d832ffc8da59ec ]---
RIP: 0010:unpin_user_pages+0x38/0x80 mm/gup.c:338
Code: 56 d3 ff 31 ff 4c 89 e6 e8 a5 57 d3 ff 4d 85 e4 74 3f 49 bd 00 00 00 00 00 fc ff df 31 ed e8 ff 55 d3 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 75 2b 48 8b 3b 48 83 c5 01 48 83 c3 08 e8 51 f8 ff
RSP: 0018:ffffc90002537cc8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff819fdc9b
RDX: 0000000000000000 RSI: ffffffff819fdcb1 RDI: 0000000000000007
RBP: 0000000000000000 R08: ffff88809ff6e0c0 R09: ffffed1015ce7164
R10: ffff8880ae738b1b R11: ffffed1015ce7163 R12: 0000000000000011
R13: dffffc0000000000 R14: 0000000000000011 R15: 0000000020c35fff
FS:  0000000000d95880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbc58039178 CR3: 000000009a8e7000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/18 03:35 net-next-old dbfe7d74376e 37bccd4e .config console log report syz C ci-upstream-net-kasan-gce
2020/05/20 16:32 net-next-old 4f65e2f483b6 1255f02a .config console log report ci-upstream-net-kasan-gce
2020/05/20 16:26 net-next-old 4f65e2f483b6 1255f02a .config console log report ci-upstream-net-kasan-gce
2020/05/20 09:54 net-next-old 2de499258659 67fa1f59 .config console log report ci-upstream-net-kasan-gce
2020/05/20 07:52 net-next-old 2de499258659 67fa1f59 .config console log report ci-upstream-net-kasan-gce
2020/05/19 19:29 net-next-old 5cdfe8306631 6d882fd2 .config console log report ci-upstream-net-kasan-gce
2020/05/19 14:34 net-next-old 5cdfe8306631 6d882fd2 .config console log report ci-upstream-net-kasan-gce
2020/05/19 10:03 net-next-old 5cdfe8306631 684d3606 .config console log report ci-upstream-net-kasan-gce
2020/05/18 19:30 net-next-old dbfe7d74376e 684d3606 .config console log report ci-upstream-net-kasan-gce
2020/05/18 17:49 net-next-old dbfe7d74376e 684d3606 .config console log report ci-upstream-net-kasan-gce
2020/05/18 17:31 net-next-old dbfe7d74376e 684d3606 .config console log report ci-upstream-net-kasan-gce
2020/05/18 07:52 net-next-old dbfe7d74376e 37bccd4e .config console log report ci-upstream-net-kasan-gce
2020/05/18 03:17 net-next-old dbfe7d74376e 37bccd4e .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.