================================================================== BUG: KASAN: slab-out-of-bounds in ext4_read_inline_data fs/ext4/inline.c:199 [inline] BUG: KASAN: slab-out-of-bounds in ext4_convert_inline_data_nolock+0x31a/0xd80 fs/ext4/inline.c:1204 Read of size 20 at addr ffff88801e11d1a3 by task syz-executor.1/17672 CPU: 0 PID: 17672 Comm: syz-executor.1 Not tainted 6.3.0-rc3-syzkaller-00031-g1e760fa3596e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x163/0x540 mm/kasan/report.c:430 kasan_report+0x176/0x1b0 mm/kasan/report.c:536 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 ext4_read_inline_data fs/ext4/inline.c:199 [inline] ext4_convert_inline_data_nolock+0x31a/0xd80 fs/ext4/inline.c:1204 ext4_convert_inline_data+0x4da/0x620 fs/ext4/inline.c:2065 ext4_fallocate+0x14d/0x2050 fs/ext4/extents.c:4701 vfs_fallocate+0x54b/0x6b0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xbd/0x100 fs/open.c:353 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f245c48c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f245d2a6168 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f245c5abf80 RCX: 00007f245c48c0f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f245c4e7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000008000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff6a3fddff R14: 00007f245d2a6300 R15: 0000000000022000 Allocated by task 1: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:769 slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x11f/0x2e0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [inline] __kernfs_new_node+0xdf/0x740 fs/kernfs/dir.c:611 kernfs_new_node+0x99/0x170 fs/kernfs/dir.c:673 __kernfs_create_file+0x49/0x2e0 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x24a/0x300 fs/sysfs/file.c:294 sysfs_merge_group+0x1fd/0x450 fs/sysfs/group.c:342 dpm_sysfs_add+0xd3/0x280 drivers/base/power/sysfs.c:707 device_add+0x787/0x1060 drivers/base/core.c:3549 device_add_disk+0x3f8/0xfd0 block/genhd.c:461 add_disk include/linux/blkdev.h:754 [inline] brd_alloc+0x4ae/0x6c0 drivers/block/brd.c:409 brd_init+0x104/0x1d0 drivers/block/brd.c:471 do_one_initcall+0x23d/0x7d0 init/main.c:1310 do_initcall_level+0x157/0x210 init/main.c:1383 do_initcalls+0x3f/0x80 init/main.c:1399 kernel_init_freeable+0x477/0x630 init/main.c:1638 kernel_init+0x1d/0x2a0 init/main.c:1526 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88801e11d0e8 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 19 bytes to the right of allocated 168-byte region [ffff88801e11d0e8, ffff88801e11d190) The buggy address belongs to the physical page: page:ffffea0000784740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1e11d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888140008dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000110011 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 1, tgid 1 (swapper/0), ts 8484913223, free_ts 8483209240 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x3246/0x33c0 mm/page_alloc.c:4325 __alloc_pages+0x255/0x670 mm/page_alloc.c:5591 alloc_page_interleave+0x22/0x1d0 mm/mempolicy.c:2116 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [inline] __kernfs_new_node+0xdf/0x740 fs/kernfs/dir.c:611 kernfs_new_node+0x99/0x170 fs/kernfs/dir.c:673 __kernfs_create_file+0x49/0x2e0 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x24a/0x300 fs/sysfs/file.c:294 sysfs_merge_group+0x1fd/0x450 fs/sysfs/group.c:342 dpm_sysfs_add+0xd3/0x280 drivers/base/power/sysfs.c:707 device_add+0x787/0x1060 drivers/base/core.c:3549 device_add_disk+0x3f8/0xfd0 block/genhd.c:461 add_disk include/linux/blkdev.h:754 [inline] brd_alloc+0x4ae/0x6c0 drivers/block/brd.c:409 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare mm/page_alloc.c:1503 [inline] free_unref_page_prepare+0xe2f/0xe70 mm/page_alloc.c:3387 free_unref_page+0x37/0x3f0 mm/page_alloc.c:3482 vfree+0x186/0x2e0 mm/vmalloc.c:2742 free_partitions block/partitions/core.c:118 [inline] check_partition block/partitions/core.c:177 [inline] blk_add_partitions block/partitions/core.c:602 [inline] bdev_disk_changed+0x89e/0x1460 block/partitions/core.c:688 blkdev_get_whole+0x2fb/0x380 block/bdev.c:607 blkdev_get_by_dev+0x31f/0xa30 block/bdev.c:744 disk_scan_partitions+0x1c3/0x2b0 block/genhd.c:384 device_add_disk+0xcaf/0xfd0 block/genhd.c:521 add_disk include/linux/blkdev.h:754 [inline] brd_alloc+0x4ae/0x6c0 drivers/block/brd.c:409 brd_init+0x104/0x1d0 drivers/block/brd.c:471 do_one_initcall+0x23d/0x7d0 init/main.c:1310 do_initcall_level+0x157/0x210 init/main.c:1383 do_initcalls+0x3f/0x80 init/main.c:1399 kernel_init_freeable+0x477/0x630 init/main.c:1638 kernel_init+0x1d/0x2a0 init/main.c:1526 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88801e11d080: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 ffff88801e11d100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801e11d180: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ^ ffff88801e11d200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ffff88801e11d280: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 ==================================================================