From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f207.google.com (mail-il1-f207.google.com [209.85.166.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADCD81B0F11 for ; Thu, 2 Jan 2025 14:45:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.207 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735829126; cv=none; b=DC+7ZFvEuZwK38ZJRaiIf+lRofd7854BQwTmqBXIqHLZHFyj6e+ZoAOD4aUR4SfdRpToj6/ET1iZTARzfCyjP41+smdrmgl7ddGDZIG1IJlaCODfR1j8kOK0cP5Bi6LvuWpUI8S2VAdZm04GVgUUH8evhThHbmtOhUrZj6INkLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735829126; c=relaxed/simple; bh=Z9t6PNm3DS/ePoZAaw2EZOmMP89pA85r62UORJTBhWg=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=uR4yL8tSNUVR6HMDq4HF4/UgaNK0exbvugOt3lI/qbyC1KrWum9VcaMoDURH8qAqs9FwO0a3QIovV3yrytGruyOot28jmpTLWsP3KxmjJxwzMc1/OWeDI+C5tDp0gJz0gm7GEiiuu0J8+sy8WtkMgM5prknXO04mgBexCb2xsMY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f207.google.com with SMTP id e9e14a558f8ab-3a9d195e6e5so100360285ab.2 for ; Thu, 02 Jan 2025 06:45:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735829123; x=1736433923; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ivsULfK+ZzTvO3DbL6uC7rzsm5SWLQfsBE/DdKr1YKE=; b=mZMf5sss0sNOz4I81U07SgXybiSfhnD8i0tzbCr13MWfaxF6LYRy0/07s4VF82iVZr 7prQgQLlnqt8r6setZ7DC+/QCfvaXGKVgqlYx8kyQftTievMFjBEKo2tBsdWlNrc+WP5 ewvG/vO3OH3Khvz7jOUlJeYHIv+Z8A2S0uZIA5lsM1whdWTgOBJELdWIn9i7XADl2oDm UhOAr4+OYcn+zJGFcyY45aygELWKesilaFiu+o/nU38tjEA36uZ5yXr3i2niukEKe5qt I8/AePX9RrfNh8wFmDgOi0Q5K0WjETLM8HKFqfdSFevsR6NOp1BmZPXJIGj5lYnAIZI4 T5sw== X-Forwarded-Encrypted: i=1; AJvYcCV06DOe8b2eJCNPjKRvzdnqimZNrQeO0A0ue23Fw8fWwYvZ2WE8wZrCMKFm8KyAaiSs/39yoxfuU8yDKI4=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+iE064CvBpqUfnlwAjiH7Qocg3TtgB3hCqSoTirqUEPbGkrk/ zOvLdtFfGCkQ56ogCl78cjYhK//RP6ModX4uhq4Z63yAR5SCsnJLwOjuW/xO0Vc9gpNV8j415Qz OVm/8/cFXYheuo0E9w5yFGX0zh6jqFyB8AiEzgj0HCWmwu0P9PqjxPrI= X-Google-Smtp-Source: AGHT+IHWVLojWEw6PZvqD+plZze52iNLZPYUFfLRbFh4e8I6/s0I4K8Rq5emaVlJiL6WwBB3V+YGE28vWQ0X9rOWmBSQVoN2+E5h Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a92:ca09:0:b0:3a7:8d8e:e730 with SMTP id e9e14a558f8ab-3c2d54348admr275238395ab.22.1735829123455; Thu, 02 Jan 2025 06:45:23 -0800 (PST) Date: Thu, 02 Jan 2025 06:45:23 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6776a683.050a0220.3a8527.0042.GAE@google.com> Subject: [syzbot] [f2fs?] KASAN: slab-out-of-bounds Read in f2fs_getxattr From: syzbot To: chao@kernel.org, jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 573067a5a685 Merge branch 'for-next/core' into for-kernelci git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci console output: https://syzkaller.appspot.com/x/log.txt?x=108aa818580000 kernel config: https://syzkaller.appspot.com/x/.config?x=cd7202b56d469648 dashboard link: https://syzkaller.appspot.com/bug?extid=f5e74075e096e757bdbf compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: arm64 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10b9cac4580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=178bb0b0580000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/9d3b5c855aa0/disk-573067a5.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/0c06fc1ead83/vmlinux-573067a5.xz kernel image: https://storage.googleapis.com/syzbot-assets/3390e59b9e4b/Image-573067a5.gz.xz mounted in repro: https://storage.googleapis.com/syzbot-assets/eddf26185633/mount_0.gz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+f5e74075e096e757bdbf@syzkaller.appspotmail.com F2FS-fs (loop0): invalid crc value F2FS-fs (loop0): Found nat_bits in checkpoint F2FS-fs (loop0): Mounted with checkpoint version = 1b41e954 ================================================================== BUG: KASAN: slab-out-of-bounds in __find_xattr fs/f2fs/xattr.c:235 [inline] BUG: KASAN: slab-out-of-bounds in __find_inline_xattr fs/f2fs/xattr.c:261 [inline] BUG: KASAN: slab-out-of-bounds in lookup_all_xattrs fs/f2fs/xattr.c:345 [inline] BUG: KASAN: slab-out-of-bounds in f2fs_getxattr+0xf5c/0x1064 fs/f2fs/xattr.c:533 Read of size 4 at addr ffff0000cc09b278 by task syz-executor773/6410 CPU: 0 UID: 0 PID: 6410 Comm: syz-executor773 Not tainted 6.13.0-rc3-syzkaller-g573067a5a685 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 __find_xattr fs/f2fs/xattr.c:235 [inline] __find_inline_xattr fs/f2fs/xattr.c:261 [inline] lookup_all_xattrs fs/f2fs/xattr.c:345 [inline] f2fs_getxattr+0xf5c/0x1064 fs/f2fs/xattr.c:533 f2fs_xattr_generic_get+0x130/0x174 fs/f2fs/xattr.c:63 __vfs_getxattr+0x394/0x3c0 fs/xattr.c:423 smk_fetch+0xc8/0x150 security/smack/smack_lsm.c:306 smack_d_instantiate+0x594/0x880 security/smack/smack_lsm.c:3615 security_d_instantiate+0x100/0x204 security/security.c:4070 d_splice_alias+0x70/0x310 fs/dcache.c:3001 f2fs_lookup+0x4c8/0x948 fs/f2fs/namei.c:523 lookup_open fs/namei.c:3627 [inline] open_last_lookups fs/namei.c:3748 [inline] path_openat+0xf7c/0x2b14 fs/namei.c:3984 do_filp_open+0x1e8/0x404 fs/namei.c:4014 do_sys_openat2+0x124/0x1b8 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_openat fs/open.c:1433 [inline] __se_sys_openat fs/open.c:1428 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1428 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 6410: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:568 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4298 [inline] __kmalloc_noprof+0x32c/0x54c mm/slub.c:4310 kmalloc_noprof include/linux/slab.h:905 [inline] f2fs_kmalloc fs/f2fs/f2fs.h:3428 [inline] f2fs_kzalloc+0x124/0x254 fs/f2fs/f2fs.h:3447 xattr_alloc fs/f2fs/xattr.c:34 [inline] lookup_all_xattrs fs/f2fs/xattr.c:333 [inline] f2fs_getxattr+0xc60/0x1064 fs/f2fs/xattr.c:533 f2fs_xattr_generic_get+0x130/0x174 fs/f2fs/xattr.c:63 __vfs_getxattr+0x394/0x3c0 fs/xattr.c:423 smk_fetch+0xc8/0x150 security/smack/smack_lsm.c:306 smack_d_instantiate+0x594/0x880 security/smack/smack_lsm.c:3615 security_d_instantiate+0x100/0x204 security/security.c:4070 d_splice_alias+0x70/0x310 fs/dcache.c:3001 f2fs_lookup+0x4c8/0x948 fs/f2fs/namei.c:523 lookup_open fs/namei.c:3627 [inline] open_last_lookups fs/namei.c:3748 [inline] path_openat+0xf7c/0x2b14 fs/namei.c:3984 do_filp_open+0x1e8/0x404 fs/namei.c:4014 do_sys_openat2+0x124/0x1b8 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_openat fs/open.c:1433 [inline] __se_sys_openat fs/open.c:1428 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1428 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at ffff0000cc09b260 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 12 bytes to the right of allocated 12-byte region [ffff0000cc09b260, ffff0000cc09b26c) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10c09b flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c0001640 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cc09b100: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ffff0000cc09b180: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc >ffff0000cc09b200: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc ^ ffff0000cc09b280: 00 06 fc fc fa fb fc fc fa fb fc fc fa fb fc fc ffff0000cc09b300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb 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. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup