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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A97CC433EF for ; Tue, 21 Jun 2022 15:10:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F2C106B0072; Tue, 21 Jun 2022 11:10:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EDC116B0073; Tue, 21 Jun 2022 11:10:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DCBAD8E0001; Tue, 21 Jun 2022 11:10:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CE8D96B0072 for ; Tue, 21 Jun 2022 11:10:24 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 9EB2660FC1 for ; Tue, 21 Jun 2022 15:10:24 +0000 (UTC) X-FDA: 79602579168.01.48101B8 Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by imf23.hostedemail.com (Postfix) with ESMTP id 348DD1400A6 for ; Tue, 21 Jun 2022 15:10:24 +0000 (UTC) Received: by mail-io1-f70.google.com with SMTP id e195-20020a6bb5cc000000b0066cc9ece80fso7766557iof.5 for ; Tue, 21 Jun 2022 08:10:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:date:in-reply-to:message-id:subject :from:to; bh=orJv/QF6/hQyCVCkoKcPGnTko1ommFIuCUIXzQv7jwI=; b=eeubZmhVVPmdHfP+qsbx6TfYXKp6ftiJuVg+tUShNd+H8qQ/y5vmmiyP0XKk1h6Cv7 tjFIEtVSLQoh4RW1FHjLJL3k/lbIVk0oiDuHE8Go5uJrws8RSOePMGRGYMTHJ8tkF2pS J7J3Jx/O03BCw/xvoN2j9XIEL0Ii9NSQejiWIeIhT8N17TWWp9TRD1O5fvm3T+ttLFyV yqOtCo7P1dRtbMtxrXC7d55gFl8V7NHNujzXs3MJsYkassrlTud9iPoZujI1zHUpU39O WDYCWN5PZ1yE5ktlK92ncNjlchh0jowSqssOQ73Njr5AEXM1pIZxe+lsxOj2XhvquWlT 5S8Q== X-Gm-Message-State: AJIora8ybUL5o9U7LZqzD8XrfNsZPN8DRCdhTFKwBNuV2z4bgxdpmDQC eym6OGM+UYHa90eLqoL6fsgJlMVCo8Rz+WSBeBCo1O8fOo5o X-Google-Smtp-Source: AGRyM1uQePVfTEOaeMTn3UjYHAfWksYYYP9NNjLMDbV9XXmg8SbP7RQv1ctWcAVbgaMBbfkmJYBmZfY0sUmZ9N6xFYOzCpoj0C5G MIME-Version: 1.0 X-Received: by 2002:a05:6e02:1c86:b0:2d9:333f:5b9d with SMTP id w6-20020a056e021c8600b002d9333f5b9dmr1266033ill.36.1655824223607; Tue, 21 Jun 2022 08:10:23 -0700 (PDT) Date: Tue, 21 Jun 2022 08:10:23 -0700 In-Reply-To: <0000000000003189f305e19f5d3e@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000a8a4a905e1f69ec4@google.com> Subject: Re: [syzbot] KASAN: null-ptr-deref Read in hugepage_vma_check From: syzbot To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, shy828301@gmail.com, syzkaller-bugs@googlegroups.com, willy@infradead.org Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655824224; a=rsa-sha256; cv=none; b=ItAG53M5SgxEFsCqEO9LmGTKdL+NrRBRW+vRW6sMLEv8LPEdwrWmFTbzWg4c+jGraVn5hz R8O9Z3iM/ARLZS/+7/xVGcZYhmkxnlV4HqUoa3TEr/J3wdp3qH52//3kKVVjyJoC4FQVZq +fgpcRpIUZMFpIHtXALCI67GZBJGwQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655824224; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references; bh=orJv/QF6/hQyCVCkoKcPGnTko1ommFIuCUIXzQv7jwI=; b=zOXs9SGe/QUzfcoWeu6DI+zTw+Bn1lCPPuIy/u+3+/tUBTUo1021XnBTdDdiRijsPA8Hai 09mYiQfBG/dhH393m5paM06xIh9jeNCTZiaGeIlkIMdy3gFC9Z/0hmvz66bqYyQhSOcmlu vW35/8ReVWRTt5uWdUq0vDyUbn/fCMU= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=appspotmail.com (policy=none); spf=pass (imf23.hostedemail.com: domain of 3X9-xYgkbAAIu01mcnngtcrrkf.iqqingwugteqpvgpv.eqo@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com designates 209.85.166.70 as permitted sender) smtp.mailfrom=3X9-xYgkbAAIu01mcnngtcrrkf.iqqingwugteqpvgpv.eqo@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=appspotmail.com (policy=none); spf=pass (imf23.hostedemail.com: domain of 3X9-xYgkbAAIu01mcnngtcrrkf.iqqingwugteqpvgpv.eqo@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com designates 209.85.166.70 as permitted sender) smtp.mailfrom=3X9-xYgkbAAIu01mcnngtcrrkf.iqqingwugteqpvgpv.eqo@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 348DD1400A6 X-Stat-Signature: bw3dguddf7bj1r8gsrcmzx4cog46uy4r X-HE-Tag: 1655824224-124677 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: syzbot has found a reproducer for the following issue on: HEAD commit: 34d1d36073ea Add linux-next specific files for 20220621 git tree: linux-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=15a34140080000 kernel config: https://syzkaller.appspot.com/x/.config?x=b24b62d1c051cfc8 dashboard link: https://syzkaller.appspot.com/bug?extid=4d875b4d2e2b60bae9b4 compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14097a3ff00000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1466c63ff00000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+4d875b4d2e2b60bae9b4@syzkaller.appspotmail.com ================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: null-ptr-deref in test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline] BUG: KASAN: null-ptr-deref in hugepage_vma_check+0x8e/0x750 mm/huge_memory.c:82 Read of size 8 at addr 00000000000005a8 by task syz-executor405/3606 CPU: 0 PID: 3606 Comm: syz-executor405 Not tainted 5.19.0-rc3-next-20220621-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 kasan_report+0xbe/0x1f0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:71 [inline] test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline] hugepage_vma_check+0x8e/0x750 mm/huge_memory.c:82 show_smap+0x1c6/0x470 fs/proc/task_mmu.c:866 traverse.part.0+0xcf/0x5f0 fs/seq_file.c:111 traverse fs/seq_file.c:101 [inline] seq_read_iter+0x90f/0x1280 fs/seq_file.c:195 seq_read+0x337/0x4b0 fs/seq_file.c:162 do_loop_readv_writev fs/read_write.c:763 [inline] do_loop_readv_writev fs/read_write.c:750 [inline] do_iter_read+0x4f8/0x750 fs/read_write.c:805 vfs_readv+0xe5/0x150 fs/read_write.c:923 do_preadv fs/read_write.c:1015 [inline] __do_sys_preadv fs/read_write.c:1065 [inline] __se_sys_preadv fs/read_write.c:1060 [inline] __x64_sys_preadv+0x22b/0x310 fs/read_write.c:1060 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fcb44a75239 Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffedce269f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcb44a75239 RDX: 0000000000000001 RSI: 00000000200006c0 RDI: 0000000000000003 RBP: 00007ffedce26a00 R08: 0000000000000000 R09: 65732f636f72702f R10: 00000000fffffffe R11: 0000000000000246 R12: 00007fcb44a39120 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ==================================================================