EXT4-fs (loop0): encrypted files will use data=ordered instead of data journaling mode EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. ================================================================== BUG: KASAN: slab-out-of-bounds in jffs2_sum_add_kvec+0x125a/0x15d0 fs/jffs2/summary.c:261 Read of size 4 at addr ffff888029f0ccbc by task syz-executor.0/5637 CPU: 0 PID: 5637 Comm: syz-executor.0 Not tainted 6.9.0-rc5-syzkaller-00355-g2c8159388952 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 jffs2_sum_add_kvec+0x125a/0x15d0 fs/jffs2/summary.c:261 jffs2_flash_direct_writev+0xa8/0xd0 fs/jffs2/writev.c:22 jffs2_flash_writev+0x9b4/0xec0 fs/jffs2/wbuf.c:805 save_xattr_datum+0x44e/0x790 fs/jffs2/xattr.c:317 create_xattr_datum fs/jffs2/xattr.c:387 [inline] do_jffs2_setxattr+0xa4a/0x1630 fs/jffs2/xattr.c:1173 __vfs_setxattr+0x173/0x1e0 fs/xattr.c:200 __vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:234 __vfs_setxattr_locked+0x182/0x260 fs/xattr.c:295 vfs_setxattr+0x146/0x350 fs/xattr.c:321 do_setxattr+0x146/0x170 fs/xattr.c:629 setxattr+0x15d/0x180 fs/xattr.c:652 path_setxattr+0x179/0x1e0 fs/xattr.c:671 __do_sys_setxattr fs/xattr.c:687 [inline] __se_sys_setxattr fs/xattr.c:683 [inline] __x64_sys_setxattr+0xc4/0x160 fs/xattr.c:683 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fded427de69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fded50170c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007fded43abf80 RCX: 00007fded427de69 RDX: 0000000020000900 RSI: 0000000020000100 RDI: 00000000200000c0 RBP: 00007fded42ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000feeb R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fded43abf80 R15: 00007ffe02b106b8 Allocated by task 5612: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3966 [inline] __kmalloc+0x1f9/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] kzalloc include/linux/slab.h:749 [inline] jffs2_do_mount_fs+0x84b/0x2460 fs/jffs2/build.c:387 jffs2_do_fill_super+0x3d4/0xa60 fs/jffs2/fs.c:573 jffs2_fill_super+0x283/0x370 fs/jffs2/super.c:289 mtd_get_sb+0x2ce/0x490 drivers/mtd/mtdsuper.c:57 mtd_get_sb_by_nr drivers/mtd/mtdsuper.c:88 [inline] get_tree_mtd+0x6ce/0x860 drivers/mtd/mtdsuper.c:141 vfs_get_tree+0x8f/0x380 fs/super.c:1779 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x297/0x320 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888029f0c000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 956 bytes to the right of allocated 2304-byte region [ffff888029f0c000, ffff888029f0c900) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29f08 head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff80000000840(slab|head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffffff() raw: 00fff80000000840 ffff888015042140 ffffea0000a93200 dead000000000002 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 head: 00fff80000000840 ffff888015042140 ffffea0000a93200 dead000000000002 head: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 head: 00fff80000000003 ffffea0000a7c201 ffffea0000a7c248 00000000ffffffff head: 0000000800000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4654, tgid 799444987 (v4l_id), ts 4654, free_ts 39432570420 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3317 __alloc_pages+0x22b/0x2460 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x66d/0x1790 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x3b4/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] tomoyo_realpath_from_path+0xb9/0x720 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x2a7/0x3b0 security/tomoyo/file.c:771 tomoyo_file_open+0x71/0x90 security/tomoyo/tomoyo.c:334 security_file_open+0x78/0x630 security/security.c:2961 do_dentry_open+0x583/0x18c0 fs/open.c:942 do_open fs/namei.c:3642 [inline] path_openat+0x1dfb/0x2990 fs/namei.c:3799 do_filp_open+0x1dc/0x430 fs/namei.c:3826 do_sys_openat2+0x17a/0x1e0 fs/open.c:1406 do_sys_open fs/open.c:1421 [inline] __do_sys_openat fs/open.c:1437 [inline] __se_sys_openat fs/open.c:1432 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1432 page last free pid 4529 tgid 4529 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2347 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2487 __put_partials+0x14c/0x170 mm/slub.c:2906 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3798 [inline] slab_alloc_node mm/slub.c:3845 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc_node+0x1e9/0x480 mm/slub.c:3973 kmalloc_node include/linux/slab.h:648 [inline] kvmalloc_node+0x9d/0x1a0 mm/util.c:634 kvmalloc include/linux/slab.h:766 [inline] seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x830/0x12c0 fs/seq_file.c:210 kernfs_fop_read_iter+0x41a/0x590 fs/kernfs/file.c:279 call_read_iter include/linux/fs.h:2104 [inline] new_sync_read fs/read_write.c:395 [inline] vfs_read+0x6c0/0xb80 fs/read_write.c:476 ksys_read+0x12f/0x260 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888029f0cb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029f0cc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888029f0cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888029f0cd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029f0cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================