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 8950EC54EE9 for ; Sun, 25 Sep 2022 17:19:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C580B8E001F; Sun, 25 Sep 2022 13:19:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C06328E0007; Sun, 25 Sep 2022 13:19:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF5488E001F; Sun, 25 Sep 2022 13:19:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A01B78E0007 for ; Sun, 25 Sep 2022 13:19:35 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 74F321A0211 for ; Sun, 25 Sep 2022 17:19:35 +0000 (UTC) X-FDA: 79951269510.07.500A9D8 Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) by imf09.hostedemail.com (Postfix) with ESMTP id 20C30140004 for ; Sun, 25 Sep 2022 17:19:34 +0000 (UTC) Received: by mail-il1-f198.google.com with SMTP id o5-20020a056e02102500b002ddcc65029cso3668220ilj.8 for ; Sun, 25 Sep 2022 10:19:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=PsXujgeal9wQJe4mJZK5lU6/DKbFJBuwezONBEQonpI=; b=Iy0+x9737ztyqEW3wwe0HBDB7aRkIGV4iS3KSHbR60Xvc11eDN8oAqQTbNfHuh8O7P H5KX74MXC+1jSmswFbbLc+7tm552E/fuVl8MycD9PPOz/5IvroU6ASlmJEbiMDe68POX V8HRtQ8oOX7ibNJMCXGyMXqr2FT5a+PF/DkKkeVuu/W/s4aTsVHDk7ZtWuJpQFE1w/VC sY/KXKeF83TOzG4gH7yebkWxmHmktxNupVZ4cQyC/4Z1oe6pV8VLXfW7o1Ybkeq4rPhI W9cxUYN4p9vpt5xcqcGs+M3rkVBgDkqj+FCLlYyTExc0vkcJYlv3MY1GbYcVQHEBn+AX 18uA== X-Gm-Message-State: ACrzQf1qrTc7qGbJssSi2/g3eObnpaJQffkAheaMBhOPf09weVIxubZf 2Zvo/d3v72iEJcqq83pgDqZn19eKL9n+QD9kZrKEgQBpMDb7 X-Google-Smtp-Source: AMsMyM7069qTVbupernHxdT4XXjI4Q8RUU1QVOflKJDDM3SGa18vFDi2+V8otOAakax0XDDeOF+24cOX4QLZfjqbwh3/mLY2WFu7 MIME-Version: 1.0 X-Received: by 2002:a05:6638:388a:b0:35a:e02d:ca1e with SMTP id b10-20020a056638388a00b0035ae02dca1emr9750526jav.133.1664126374463; Sun, 25 Sep 2022 10:19:34 -0700 (PDT) Date: Sun, 25 Sep 2022 10:19:34 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000694eea05e9839d2d@google.com> Subject: [syzbot] KASAN: null-ptr-deref Write in alloc_buddy_huge_page From: syzbot To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, mike.kravetz@oracle.com, nathan@kernel.org, ndesaulniers@google.com, songmuchun@bytedance.com, syzkaller-bugs@googlegroups.com, trix@redhat.com Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664126375; a=rsa-sha256; cv=none; b=aONbjWq7EQItJsPftTBA1iNleOBVe+u4Qs27ni5q3zwpSWopjMHsb8txK+PKLfxoKLgs7O KbCtwEaP0OH4zmtTsf9/2S8Nlow8DsPgor9kKA9ftYYu5JM8bK3VZ/yOnVIa6V6dDGcOQv thjnktTu8aZ4feHgdCsxdV2qVWYc8wE= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=appspotmail.com (policy=none); spf=pass (imf09.hostedemail.com: domain of 3po0wYwkbAKMVbcNDOOHUDSSLG.JRRJOHXVHUFRQWHQW.FRP@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com designates 209.85.166.198 as permitted sender) smtp.mailfrom=3po0wYwkbAKMVbcNDOOHUDSSLG.JRRJOHXVHUFRQWHQW.FRP@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664126375; 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: references; bh=PsXujgeal9wQJe4mJZK5lU6/DKbFJBuwezONBEQonpI=; b=ojxXvvPkZxK1fGR0AtaBqa2J/7kQC8MnpzRNF6NMNwV/nDRBwkinm08BWyLVBY2Px9/86h K/zHMDQDtHdrXQf+BJCkFDHiSvA1ZI6I+OafPun+Cqa/S4aq8vDdZwAalA5EYST+OyhT67 NXC0/nbGL00jACfYjOkXPLNdE+UeUY0= X-Stat-Signature: 8ukr17mrmxqg9nj1qfqpmornoqffb8nb X-Rspam-User: Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=appspotmail.com (policy=none); spf=pass (imf09.hostedemail.com: domain of 3po0wYwkbAKMVbcNDOOHUDSSLG.JRRJOHXVHUFRQWHQW.FRP@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com designates 209.85.166.198 as permitted sender) smtp.mailfrom=3po0wYwkbAKMVbcNDOOHUDSSLG.JRRJOHXVHUFRQWHQW.FRP@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 20C30140004 X-HE-Tag: 1664126374-517720 X-Bogosity: Ham, tests=bogofilter, spamicity=0.002451, 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 issue on: HEAD commit: aaa11ce2ffc8 Add linux-next specific files for 20220923 git tree: linux-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=16ea4288880000 kernel config: https://syzkaller.appspot.com/x/.config?x=186d1ff305f10294 dashboard link: https://syzkaller.appspot.com/bug?extid=db491b09f5907cdb5984 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=134606ef080000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16c83cff080000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+db491b09f5907cdb5984@syzkaller.appspotmail.com ================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:102 [inline] BUG: KASAN: null-ptr-deref in atomic_cmpxchg include/linux/atomic/atomic-instrumented.h:503 [inline] BUG: KASAN: null-ptr-deref in page_ref_freeze include/linux/page_ref.h:318 [inline] BUG: KASAN: null-ptr-deref in alloc_buddy_huge_page.isra.0+0x103/0x230 mm/hugetlb.c:1960 Write of size 4 at addr 0000000000000034 by task syz-executor107/3608 CPU: 0 PID: 3608 Comm: syz-executor107 Not tainted 6.0.0-rc6-next-20220923-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 kasan_report+0xbb/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_write include/linux/instrumented.h:102 [inline] atomic_cmpxchg include/linux/atomic/atomic-instrumented.h:503 [inline] page_ref_freeze include/linux/page_ref.h:318 [inline] alloc_buddy_huge_page.isra.0+0x103/0x230 mm/hugetlb.c:1960 alloc_fresh_huge_page+0x395/0x530 mm/hugetlb.c:2013 alloc_surplus_huge_page+0x139/0x2f0 mm/hugetlb.c:2227 alloc_buddy_huge_page_with_mpol mm/hugetlb.c:2304 [inline] alloc_huge_page+0xbf6/0x1180 mm/hugetlb.c:2919 hugetlb_no_page mm/hugetlb.c:5571 [inline] hugetlb_fault+0x1056/0x1e60 mm/hugetlb.c:5796 follow_hugetlb_page+0x3f3/0x1850 mm/hugetlb.c:6291 __get_user_pages+0x2cb/0xf10 mm/gup.c:1146 __get_user_pages_locked mm/gup.c:1378 [inline] __get_user_pages_remote+0x18f/0x830 mm/gup.c:2131 pin_user_pages_remote+0x6c/0xb0 mm/gup.c:3189 process_vm_rw_single_vec mm/process_vm_access.c:105 [inline] process_vm_rw_core.constprop.0+0x43b/0x980 mm/process_vm_access.c:215 process_vm_rw+0x29c/0x300 mm/process_vm_access.c:283 __do_sys_process_vm_writev mm/process_vm_access.c:303 [inline] __se_sys_process_vm_writev mm/process_vm_access.c:298 [inline] __x64_sys_process_vm_writev+0xdf/0x1b0 mm/process_vm_access.c:298 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+0x63/0xcd RIP: 0033:0x7ff4166016c9 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:00007fff99de70c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000137 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007ff4166016c9 RDX: 0000000000000001 RSI: 0000000020000000 RDI: 0000000000000e18 RBP: 00007fff99de70e0 R08: 000000000000023a R09: 0000000000000000 R10: 0000000020121000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ================================================================== --- This report 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 issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. syzbot can test patches for this issue, for details see: https://goo.gl/tpsmEJ#testing-patches