Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4695531rwb; Tue, 6 Sep 2022 11:08:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR55VDeOKWCNjxFgFYLCJvwTFgC0+qHK+8q+32Qu7qBCUGe1M1uAcU8vdM0Po6AuCFxbiXSz X-Received: by 2002:a17:907:9619:b0:730:8ebb:9e45 with SMTP id gb25-20020a170907961900b007308ebb9e45mr40524554ejc.628.1662487692449; Tue, 06 Sep 2022 11:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662487692; cv=none; d=google.com; s=arc-20160816; b=pOMyuyZEPzxXMoTRjNaZe4DciL5htI18A0so71hPLG6qVezmpdH+2Ly1K3IyzR+WP6 9FZAKGq14D4UpgGwl830XvQPhWhoQcPMM1ZqoKnPV9J+4hooKrPv/n2Otjt74Hq2r6ah CPBbeD5JQBYCa6AQAGwgwFpbcdeTZl0jpr6WY6HiMRXg3bIWN2anpJAGdJfJnVO0YACW Hb6kwbBq1/UIBo+JXafJXQgXEeup6vAUQtGsnw5noKJFZz6V37NOl2oBFwf/qePMZVI+ EQTmnUvdYWCu7PB44HRvLjJQ1cJUuKZHDWxnKdPPMMXXC19lHU7Cft406n8Bwj54L7u3 IbZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:date:mime-version; bh=r0CYA6h8y7DkAH+00GIM/04OP4+0TB3o7uk98HZnHx8=; b=TT4OzPR5Nld3kIC9Iwg9jBtahX3WdxBIJBm2dImXNmk/D3HTE9VC1uV32MhQ9CjtJs /NcYYrGmv9+/X8uDp8Crv92F5rMaYCJ8Hr5lbY277UQkPpasBDJS5MmI2tC9mS0PPGVo i9mgix8owN1sTolS4GaAJ/6wkoyBwfa39ecL3RCPW0b8ZhO1QFUwJtg9BtRIMoFUoGYs rpoXNezfFhbOkcdqAPsbN1/W+/9Zv+jrRIKajMthOhx+ONk9YE0wtsW/tvzXzDJLXcF0 TfYbEf+LBvp8SlYtlbVmM801olsdDZ4vyItzo2aPLPR2Lv6ZIPLrS8FTBeHSowjE4yGm Qs+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i34-20020a0564020f2200b0044e92814b58si4436736eda.112.2022.09.06.11.07.43; Tue, 06 Sep 2022 11:08:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233360AbiIFRIV (ORCPT + 99 others); Tue, 6 Sep 2022 13:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233233AbiIFRHo (ORCPT ); Tue, 6 Sep 2022 13:07:44 -0400 Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 095F780B4D for ; Tue, 6 Sep 2022 09:55:31 -0700 (PDT) Received: by mail-io1-f69.google.com with SMTP id b21-20020a5d8915000000b0068aaf634432so7253872ion.20 for ; Tue, 06 Sep 2022 09:55:31 -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=r0CYA6h8y7DkAH+00GIM/04OP4+0TB3o7uk98HZnHx8=; b=EcgLfJTgl0TbR63uLDUfQSmyo2LhzWMc4Dfl/RgRRNFVuX7Oel+2XU0BsuBv8micrK LtWlyq/QT2A8TVH3tCHr5sXJohluP95F1rmXqgjRSWfqGsV20/PZ6Ggz3sMMCiKtXWaZ 46NefwvXX6qnWArx1gP6IP0WfdTiND4cP44swaf/QJmLY5ei2CkxkirOCILo17j71ZyN JCNVGwcO9R58mrPJ9GrGH7mRfWLlg3xNOpTI3j0WQyU9UnjyTE6AGpnf+dxitkNYiBQb CXyDVPwvJvSRnFvGiIpUGF/3lAfhzbk0W6DUL0mNKxepaxJyApjVFMdv7VN64GsTA5Dq Cmfg== X-Gm-Message-State: ACgBeo0l6FaSUJFJvM1qYIRrj0QlXqjL9LqUsqx2aRit9ml0CKNhgOd7 zle+Sm4WDxOw6B+me0rzOS8nD3OJUh+pI7X4S57TsaMB6+nu MIME-Version: 1.0 X-Received: by 2002:a05:6e02:1a6f:b0:2e9:e161:b56d with SMTP id w15-20020a056e021a6f00b002e9e161b56dmr27197744ilv.62.1662483330429; Tue, 06 Sep 2022 09:55:30 -0700 (PDT) Date: Tue, 06 Sep 2022 09:55:30 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000005af92105e80510f2@google.com> Subject: [syzbot] KASAN: slab-out-of-bounds Read in ntfs_get_ea From: syzbot To: almaz.alexandrovich@paragon-software.com, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, nathan@kernel.org, ndesaulniers@google.com, ntfs3@lists.linux.dev, syzkaller-bugs@googlegroups.com, trix@redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: e47eb90a0a9a Add linux-next specific files for 20220901 git tree: linux-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=13a9f455080000 kernel config: https://syzkaller.appspot.com/x/.config?x=7933882276523081 dashboard link: https://syzkaller.appspot.com/bug?extid=c4d950787fd5553287b7 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=1550d5e5080000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=173664d7080000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+c4d950787fd5553287b7@syzkaller.appspotmail.com ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512) ntfs3: loop0: Mark volume as dirty due to NTFS errors ntfs3: loop0: Failed to load $Extend. ================================================================== BUG: KASAN: slab-out-of-bounds in unpacked_ea_size fs/ntfs3/xattr.c:26 [inline] BUG: KASAN: slab-out-of-bounds in unpacked_ea_size fs/ntfs3/xattr.c:23 [inline] BUG: KASAN: slab-out-of-bounds in find_ea fs/ntfs3/xattr.c:54 [inline] BUG: KASAN: slab-out-of-bounds in find_ea fs/ntfs3/xattr.c:44 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_get_ea+0x5ca/0x620 fs/ntfs3/xattr.c:230 Read of size 1 at addr ffff88801b66abbd by task syz-executor378/3604 CPU: 0 PID: 3604 Comm: syz-executor378 Not tainted 6.0.0-rc3-next-20220901-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 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 unpacked_ea_size fs/ntfs3/xattr.c:26 [inline] unpacked_ea_size fs/ntfs3/xattr.c:23 [inline] find_ea fs/ntfs3/xattr.c:54 [inline] find_ea fs/ntfs3/xattr.c:44 [inline] ntfs_get_ea+0x5ca/0x620 fs/ntfs3/xattr.c:230 ntfs_get_wsl_perm+0x117/0x360 fs/ntfs3/xattr.c:973 ntfs_read_mft fs/ntfs3/inode.c:355 [inline] ntfs_iget5+0xe65/0x3280 fs/ntfs3/inode.c:501 dir_search_u+0x36a/0x3f0 fs/ntfs3/dir.c:264 ntfs_lookup+0x174/0x1e0 fs/ntfs3/namei.c:83 __lookup_slow+0x24c/0x460 fs/namei.c:1685 lookup_slow fs/namei.c:1702 [inline] walk_component+0x33f/0x5a0 fs/namei.c:1993 lookup_last fs/namei.c:2450 [inline] path_lookupat+0x1ba/0x840 fs/namei.c:2474 filename_lookup+0x1ce/0x590 fs/namei.c:2503 vfs_statx+0x148/0x390 fs/stat.c:228 do_statx+0xd9/0x160 fs/stat.c:629 __do_sys_statx fs/stat.c:656 [inline] __se_sys_statx fs/stat.c:647 [inline] __x64_sys_statx+0x157/0x1b0 fs/stat.c:647 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:0x7f0f3fb82519 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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:00007ffcc68ced18 EFLAGS: 00000246 ORIG_RAX: 000000000000014c RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0f3fb82519 RDX: 0000000000000000 RSI: 0000000020003c40 RDI: 0000000000000005 RBP: 00007f0f3fb41d10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000080 R11: 0000000000000246 R12: 00007f0f3fb41da0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3604: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kasan_kmalloc include/linux/kasan.h:234 [inline] __do_kmalloc_node mm/slab_common.c:930 [inline] __kmalloc+0x54/0xc0 mm/slab_common.c:943 kmalloc include/linux/slab.h:564 [inline] ntfs_read_ea+0x3e4/0x850 fs/ntfs3/xattr.c:110 ntfs_get_ea+0x1ad/0x620 fs/ntfs3/xattr.c:222 ntfs_get_wsl_perm+0x117/0x360 fs/ntfs3/xattr.c:973 ntfs_read_mft fs/ntfs3/inode.c:355 [inline] ntfs_iget5+0xe65/0x3280 fs/ntfs3/inode.c:501 dir_search_u+0x36a/0x3f0 fs/ntfs3/dir.c:264 ntfs_lookup+0x174/0x1e0 fs/ntfs3/namei.c:83 __lookup_slow+0x24c/0x460 fs/namei.c:1685 lookup_slow fs/namei.c:1702 [inline] walk_component+0x33f/0x5a0 fs/namei.c:1993 lookup_last fs/namei.c:2450 [inline] path_lookupat+0x1ba/0x840 fs/namei.c:2474 filename_lookup+0x1ce/0x590 fs/namei.c:2503 vfs_statx+0x148/0x390 fs/stat.c:228 do_statx+0xd9/0x160 fs/stat.c:629 __do_sys_statx fs/stat.c:656 [inline] __se_sys_statx fs/stat.c:647 [inline] __x64_sys_statx+0x157/0x1b0 fs/stat.c:647 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 The buggy address belongs to the object at ffff88801b66ab80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 61 bytes inside of 64-byte region [ffff88801b66ab80, ffff88801b66abc0) The buggy address belongs to the physical page: page:ffffea00006d9a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b66a flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001fc0040 dead000000000002 ffff888011841640 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 2, tgid 2 (kthreadd), ts 6668566803, free_ts 0 prep_new_page mm/page_alloc.c:2534 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4284 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5542 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2280 alloc_slab_page mm/slub.c:1721 [inline] allocate_slab+0x228/0x370 mm/slub.c:1866 new_slab mm/slub.c:1919 [inline] ___slab_alloc+0xad0/0x1440 mm/slub.c:3100 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3198 slab_alloc_node mm/slub.c:3283 [inline] __kmem_cache_alloc_node+0x18a/0x3d0 mm/slub.c:3356 __do_kmalloc_node mm/slab_common.c:929 [inline] __kmalloc+0x44/0xc0 mm/slab_common.c:943 kmalloc include/linux/slab.h:564 [inline] kzalloc include/linux/slab.h:695 [inline] lsm_task_alloc security/security.c:615 [inline] security_task_alloc+0x10b/0x250 security/security.c:1655 copy_process+0x23de/0x7120 kernel/fork.c:2240 kernel_clone+0xe7/0xab0 kernel/fork.c:2678 kernel_thread+0xb5/0xf0 kernel/fork.c:2738 create_kthread kernel/kthread.c:399 [inline] kthreadd+0x4ea/0x750 kernel/kthread.c:746 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page_owner free stack trace missing Memory state around the buggy address: ffff88801b66aa80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88801b66ab00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88801b66ab80: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff88801b66ac00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88801b66ac80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ================================================================== --- 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