syzbot


KASAN: slab-out-of-bounds Read in ext4_enable_quotas

Status: auto-obsoleted due to no activity on 2023/08/13 11:53
Reported-by: syzbot+edc7f40ba8a70e298ad1@syzkaller.appspotmail.com
First crash: 586d, last: 586d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ext4_enable_quotas f2fs C error error 29 574d 787d 0/28 auto-obsoleted due to no activity on 2023/08/22 15:17
linux-6.1 KASAN: slab-out-of-bounds Read in ext4_enable_quotas (2) 1 448d 448d 0/3 auto-obsoleted due to no activity on 2023/12/09 07:13
linux-6.1 KASAN: slab-out-of-bounds Read in ext4_enable_quotas 2 589d 596d 0/3 auto-obsoleted due to no activity on 2023/08/09 14:45

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in lockdep_set_quota_inode fs/ext4/super.c:6231 [inline]
BUG: KASAN: slab-out-of-bounds in ext4_quota_enable fs/ext4/super.c:6362 [inline]
BUG: KASAN: slab-out-of-bounds in ext4_enable_quotas+0x4b4/0xab4 fs/ext4/super.c:6389
Read of size 8 at addr ffff0000dfa9af58 by task syz-executor.5/30820

CPU: 0 PID: 30820 Comm: syz-executor.5 Not tainted 5.15.107-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call trace:
 dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x174/0x1e4 mm/kasan/report.c:451
 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309
 lockdep_set_quota_inode fs/ext4/super.c:6231 [inline]
 ext4_quota_enable fs/ext4/super.c:6362 [inline]
 ext4_enable_quotas+0x4b4/0xab4 fs/ext4/super.c:6389
 ext4_fill_super+0x7c94/0x868c fs/ext4/super.c:4949
 mount_bdev+0x26c/0x368 fs/super.c:1378
 ext4_mount+0x44/0x58 fs/ext4/super.c:6568
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:610
 vfs_get_tree+0x90/0x274 fs/super.c:1508
 do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
 path_mount+0x590/0x104c fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount fs/namespace.c:3522 [inline]
 __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Allocated by task 14131:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 __kasan_slab_alloc+0x8c/0xcc mm/kasan/common.c:467
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x74/0x3f4 mm/slab.h:519
 slab_alloc_node mm/slub.c:3220 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 kmem_cache_alloc+0x1dc/0x45c mm/slub.c:3233
 f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2644 [inline]
 f2fs_alloc_inode+0x138/0x5d8 fs/f2fs/super.c:1350
 alloc_inode fs/inode.c:236 [inline]
 iget_locked+0x180/0x720 fs/inode.c:1202
 f2fs_iget+0x5c/0x53b8 fs/f2fs/inode.c:489
 f2fs_fill_super+0x5058/0x6520 fs/f2fs/super.c:4231
 mount_bdev+0x26c/0x368 fs/super.c:1378
 f2fs_mount+0x44/0x58 fs/f2fs/super.c:4478
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:610
 vfs_get_tree+0x90/0x274 fs/super.c:1508
 do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
 path_mount+0x590/0x104c fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount fs/namespace.c:3522 [inline]
 __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Last potentially related work creation:
 kasan_save_stack+0x38/0x68 mm/kasan/common.c:38
 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348
 __call_rcu kernel/rcu/tree.c:2993 [inline]
 call_rcu+0x118/0xb40 kernel/rcu/tree.c:3073
 destroy_inode fs/inode.c:291 [inline]
 evict+0x5fc/0x68c fs/inode.c:602
 iput_final fs/inode.c:1663 [inline]
 iput+0x744/0x824 fs/inode.c:1689
 f2fs_fill_super+0x5410/0x6520 fs/f2fs/super.c:4414
 mount_bdev+0x26c/0x368 fs/super.c:1378
 f2fs_mount+0x44/0x58 fs/f2fs/super.c:4478
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:610
 vfs_get_tree+0x90/0x274 fs/super.c:1508
 do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
 path_mount+0x590/0x104c fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount fs/namespace.c:3522 [inline]
 __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

The buggy address belongs to the object at ffff0000dfa9a600
 which belongs to the cache f2fs_inode_cache of size 2304
The buggy address is located 88 bytes to the right of
 2304-byte region [ffff0000dfa9a600, ffff0000dfa9af00)
The buggy address belongs to the page:
page:000000007b65bcb7 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000dfa9d580 pfn:0x11fa98
head:000000007b65bcb7 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff0000d3e6fd01
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c65f1b00
raw: ffff0000dfa9d580 00000000800d0006 00000001ffffffff ffff0000d3e6fd01
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000dfa9ae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff0000dfa9ae80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000dfa9af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                    ^
 ffff0000dfa9af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff0000dfa9b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
EXT4-fs warning (device loop5): ext4_enable_quotas:6397: Failed to enable quota tracking (type=0, err=-13, ino=3). Please run e2fsck to fix.
EXT4-fs (loop5): mount failed

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/15 11:53 linux-5.15.y 4fdad925aa1a ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ext4_enable_quotas
* Struck through repros no longer work on HEAD.