RSP: 002b:00007f3d7b7ba028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f3d7ac25fa0 RCX: 00007f3d7a99fb19 RDX: 0000200000000d00 RSI: 0000200000000cc0 RDI: 0000000000000000 RBP: 00007f3d7b7ba090 R08: 0000200000000d40 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007f3d7ac26038 R14: 00007f3d7ac25fa0 R15: 00007ffc640c8838 ================================================================== BUG: KASAN: slab-use-after-free in jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602 Read of size 4 at addr ffff8880139a3528 by task syz.4.597/7728 CPU: 0 UID: 0 PID: 7728 Comm: syz.4.597 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602 jffs2_do_clear_inode+0x58/0x390 fs/jffs2/readinode.c:1418 evict+0x624/0xb50 fs/inode.c:822 jffs2_new_inode+0x48a/0xd20 fs/jffs2/fs.c:-1 jffs2_mkdir+0x189/0xec0 fs/jffs2/dir.c:483 vfs_mkdir+0x411/0x660 fs/namei.c:5428 ovl_do_mkdir fs/overlayfs/overlayfs.h:261 [inline] ovl_workdir_create+0x4b8/0x970 fs/overlayfs/super.c:366 ovl_make_workdir fs/overlayfs/super.c:718 [inline] ovl_get_workdir+0x339/0x1980 fs/overlayfs/super.c:876 ovl_fill_super_creds fs/overlayfs/super.c:1488 [inline] ovl_fill_super+0x1771/0x46a0 fs/overlayfs/super.c:1611 get_tree_super fs/super.c:1360 [inline] get_tree_nodev+0xbe/0x150 fs/super.c:1380 vfs_get_tree+0x92/0x2a0 fs/super.c:1881 fc_mount fs/namespace.c:1282 [inline] do_new_mount_fc fs/namespace.c:3910 [inline] do_new_mount+0x325/0xb00 fs/namespace.c:3986 do_mount fs/namespace.c:4350 [inline] __do_sys_mount fs/namespace.c:4565 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4542 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x00007f3d7a99fb19 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3d7b7ba028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f3d7ac25fa0 RCX: 00007f3d7a99fb19 RDX: 0000200000000d00 RSI: 0000200000000cc0 RDI: 0000000000000000 RBP: 00007f3d7b7ba090 R08: 0000200000000d40 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007f3d7ac26038 R14: 00007f3d7ac25fa0 R15: 00007ffc640c8838 Allocated by task 7345: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3f/0x90 mm/kasan/common.c:79 unpoison_slab_object mm/kasan/common.c:354 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:380 kasan_slab_alloc include/linux/kasan.h:257 [inline] slab_post_alloc_hook mm/slub.c:4716 [inline] slab_alloc_node mm/slub.c:5029 [inline] kmem_cache_alloc_noprof+0x2b4/0x600 mm/slub.c:5043 jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978 jffs2_sum_process_sum_data fs/jffs2/summary.c:418 [inline] jffs2_sum_scan_sumnode+0x498/0x2870 fs/jffs2/summary.c:640 jffs2_scan_eraseblock fs/jffs2/scan.c:546 [inline] jffs2_scan_medium+0x882/0x7240 fs/jffs2/scan.c:151 jffs2_build_filesystem fs/jffs2/build.c:112 [inline] jffs2_do_mount_fs+0x775/0x22b0 fs/jffs2/build.c:416 jffs2_do_fill_super+0x555/0xc60 fs/jffs2/fs.c:574 mtd_get_sb+0x195/0x420 drivers/mtd/mtdsuper.c:59 get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:143 vfs_get_tree+0x92/0x2a0 fs/super.c:1881 fc_mount fs/namespace.c:1282 [inline] do_new_mount_fc fs/namespace.c:3910 [inline] do_new_mount+0x325/0xb00 fs/namespace.c:3986 do_mount fs/namespace.c:4350 [inline] __do_sys_mount fs/namespace.c:4565 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4542 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5641: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3f/0x90 mm/kasan/common.c:79 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:599 poison_slab_object mm/kasan/common.c:267 [inline] __kasan_slab_free+0x70/0x90 mm/kasan/common.c:299 kasan_slab_free include/linux/kasan.h:239 [inline] slab_free_hook mm/slub.c:2778 [inline] slab_free mm/slub.c:6613 [inline] kmem_cache_free+0x184/0x660 mm/slub.c:6740 jffs2_free_ino_caches+0xec/0x1c0 fs/jffs2/nodelist.c:497 jffs2_put_super+0x6c/0x170 fs/jffs2/super.c:335 generic_shutdown_super+0x140/0x2d0 fs/super.c:723 kill_mtd_super+0x23/0x70 drivers/mtd/mtdsuper.c:176 jffs2_kill_sb+0x96/0xb0 fs/jffs2/super.c:350 deactivate_locked_super+0xbe/0x110 fs/super.c:558 cleanup_mnt+0x204/0x2a0 fs/namespace.c:1396 task_work_run+0x1d9/0x260 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline] do_syscall_64+0x32c/0x530 arch/x86/entry/syscall_64.c:107 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880139a3500 which belongs to the cache jffs2_inode_cache of size 48 The buggy address is located 40 bytes inside of freed 48-byte region [ffff8880139a3500, ffff8880139a3530) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880139a34c0 pfn:0x139a3 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff888140ea7b40 ffff88801fba5048 ffffea00004e6b90 raw: ffff8880139a34c0 0000000200400030 00000000f5000000 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6876, tgid 6873 (syz.2.341), ts 119573194776 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1874 prep_new_page+0x22/0xb0 mm/page_alloc.c:1882 get_page_from_freelist+0x22a1/0x22e0 mm/page_alloc.c:3964 __alloc_frozen_pages_noprof+0x211/0x450 mm/page_alloc.c:5506 alloc_slab_page mm/slub.c:3382 [inline] allocate_slab+0x7d/0x5e0 mm/slub.c:3497 new_slab mm/slub.c:3548 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7522 refill_sheaf mm/slub.c:2915 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4807 alloc_from_pcs mm/slub.c:4883 [inline] slab_alloc_node mm/slub.c:5017 [inline] kmem_cache_alloc_noprof+0x394/0x600 mm/slub.c:5043 jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978 jffs2_scan_inode_node fs/jffs2/scan.c:1025 [inline] jffs2_scan_eraseblock fs/jffs2/scan.c:814 [inline] jffs2_scan_medium+0x35ac/0x7240 fs/jffs2/scan.c:151 jffs2_build_filesystem fs/jffs2/build.c:112 [inline] jffs2_do_mount_fs+0x775/0x22b0 fs/jffs2/build.c:416 jffs2_do_fill_super+0x555/0xc60 fs/jffs2/fs.c:574 mtd_get_sb+0x195/0x420 drivers/mtd/mtdsuper.c:59 get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:143 vfs_get_tree+0x92/0x2a0 fs/super.c:1881 fc_mount fs/namespace.c:1282 [inline] do_new_mount_fc fs/namespace.c:3910 [inline] do_new_mount+0x325/0xb00 fs/namespace.c:3986 page last free pid 5641 tgid 5641 ts 119571333903 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1416 [inline] __free_frozen_pages+0xd1a/0xe10 mm/page_alloc.c:2972 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x92e/0x1230 kernel/rcu/tree.c:2919 handle_softirqs+0x265/0x8d0 kernel/softirq.c:669 __do_softirq kernel/softirq.c:703 [inline] invoke_softirq kernel/softirq.c:542 [inline] __irq_exit_rcu+0xc6/0x220 kernel/softirq.c:786 irq_exit_rcu+0x9/0x30 kernel/softirq.c:809 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1073 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1073 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 Memory state around the buggy address: ffff8880139a3400: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc ffff8880139a3480: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc >ffff8880139a3500: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc ^ ffff8880139a3580: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc ffff8880139a3600: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc ==================================================================