From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=3.0 tests=FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4677C433DF for ; Wed, 20 May 2020 18:12:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 44DF320671 for ; Wed, 20 May 2020 18:12:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44DF320671 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 784FA80007; Wed, 20 May 2020 14:12:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7363C900002; Wed, 20 May 2020 14:12:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6719180007; Wed, 20 May 2020 14:12:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id 4F9D2900002 for ; Wed, 20 May 2020 14:12:17 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E4D04181AEF23 for ; Wed, 20 May 2020 18:12:16 +0000 (UTC) X-FDA: 76837891872.03.crush39_30fc3b39d381c X-HE-Tag: crush39_30fc3b39d381c X-Filterd-Recvd-Size: 7335 Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Wed, 20 May 2020 18:12:16 +0000 (UTC) Received: by mail-il1-f197.google.com with SMTP id p81so3437395ill.5 for ; Wed, 20 May 2020 11:12:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=+ftmxr79gDcB9k8pr/AIQ9vrfM5009Yqd32Ubdl2t9g=; b=lWqBRLajhLEgBpHuskY3lm2sTuR5YwmwA6QO8T4O0UMiYX2yrtAFuK6/+fLy6e2Tae uyVdBuaUe67+Go1sj07tU/JctG14/sLuShvkWpHfwWof062QawBByNMaYsJkueCRNV4U w+fakBnWfX4E9yqnFl2N2GwYocGSCVAiFWAk0fP7YF7RkDZ2qa1Tf0UCjmAMRIQdCPCX cD2XNNeA5yUY3i+/qmR3W+b0Q4xUPAoK8dfiGdLStrHVmDJgE/8+XDmZPfoVmx4szUXD 6QYtD8xz/8JVi1Yp8+IUDbLdoXC0cJX5PTmMJkicS43s8zy8yG+J0Ia6nVTmKqPIUsDg tBxQ== X-Gm-Message-State: AOAM532dAoRcYrCV6vUZTTKeMXbhE7722OizMhnM+7WnsrmGIBypzM8H /caB5LPQXbtelivNtlK0jQLxvNhr7NoaeVaVYX5MxtoL1GEi X-Google-Smtp-Source: ABdhPJzXSZ/EqbcKubHsOn2N59N7VYkouBS+q85pvXnoAF9hczJOPQFJMSNbnH6SCiHnOONuuEfDC4j+bzVTnG4BgLqkvmmC/T2T MIME-Version: 1.0 X-Received: by 2002:a05:6602:1616:: with SMTP id x22mr4594960iow.70.1589998335872; Wed, 20 May 2020 11:12:15 -0700 (PDT) Date: Wed, 20 May 2020 11:12:15 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000000d71e05a6185662@google.com> Subject: general protection fault in unpin_user_pages From: syzbot To: akpm@linux-foundation.org, davem@davemloft.net, jhubbard@nvidia.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, rds-devel@oss.oracle.com, santosh.shilimkar@oracle.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello, syzbot found the following crash on: HEAD commit: dbfe7d74 rds: convert get_user_pages() --> pin_user_pages() git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=10218e6e100000 kernel config: https://syzkaller.appspot.com/x/.config?x=3df83be5e281f34b dashboard link: https://syzkaller.appspot.com/bug?extid=118ac0af4ac7f785a45b compiler: gcc (GCC) 9.0.0 20181231 (experimental) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=117ca33a100000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16a9044a100000 The bug was bisected to: commit dbfe7d74376e187f3c6eaff822e85176bc2cd06e Author: John Hubbard Date: Sun May 17 01:23:36 2020 +0000 rds: convert get_user_pages() --> pin_user_pages() bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10e3d84a100000 final crash: https://syzkaller.appspot.com/x/report.txt?x=12e3d84a100000 console output: https://syzkaller.appspot.com/x/log.txt?x=14e3d84a100000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+118ac0af4ac7f785a45b@syzkaller.appspotmail.com Fixes: dbfe7d74376e ("rds: convert get_user_pages() --> pin_user_pages()") 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 --- This bug is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this bug report. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#bisection syzbot can test patches for this bug, for details see: https://goo.gl/tpsmEJ#testing-patches