================================================================== BUG: KASAN: use-after-free in ext4_get_inode_usage+0x3a1/0x520 fs/ext4/xattr.c:817 Read of size 4 at addr ffff88812b2d0070 by task syz.3.226/1163 CPU: 1 PID: 1163 Comm: syz.3.226 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_get_inode_usage+0x3a1/0x520 fs/ext4/xattr.c:817 __dquot_transfer+0x192/0x20d0 fs/quota/dquot.c:2017 dquot_transfer+0x2f1/0x460 fs/quota/dquot.c:2169 ext4_setattr+0x715/0x1950 fs/ext4/inode.c:5577 notify_change+0xab3/0xe40 fs/attr.c:410 chown_common+0x335/0x500 fs/open.c:675 vfs_fchown fs/open.c:742 [inline] ksys_fchown+0xef/0x160 fs/open.c:753 __do_sys_fchown fs/open.c:761 [inline] __se_sys_fchown fs/open.c:759 [inline] __x64_sys_fchown+0x7a/0x90 fs/open.c:759 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f598fd67e59 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:00007f598e7c2028 EFLAGS: 00000246 ORIG_RAX: 000000000000005d RAX: ffffffffffffffda RBX: 00007f598ffe0fa0 RCX: 00007f598fd67e59 RDX: 000000000000ee01 RSI: 0000000000000000 RDI: 000000000000000a RBP: 00007f598fdfdd6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f598ffe1038 R14: 00007f598ffe0fa0 R15: 00007fff675d9c18 Allocated by task 518: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x162/0x2d0 mm/slub.c:2965 kmem_cache_zalloc include/linux/slab.h:657 [inline] __kernfs_new_node+0xe3/0x6b0 fs/kernfs/dir.c:662 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:739 __kernfs_create_file+0x4e/0x270 fs/kernfs/file.c:987 sysfs_add_file_mode_ns+0x29a/0x350 fs/sysfs/file.c:306 sysfs_merge_group+0x182/0x320 fs/sysfs/group.c:343 dpm_sysfs_add+0xe0/0x290 drivers/base/power/sysfs.c:707 device_add+0x54a/0xc10 drivers/base/core.c:3230 device_register+0x1d/0x20 drivers/base/core.c:3347 usb_create_ep_devs+0x148/0x270 drivers/usb/core/endpoint.c:169 create_intf_ep_devs drivers/usb/core/message.c:1304 [inline] usb_set_configuration+0x1b64/0x1f80 drivers/usb/core/message.c:2225 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x148/0x260 drivers/usb/core/driver.c:294 really_probe+0x3d8/0xa90 drivers/base/dd.c:562 driver_probe_device+0xe7/0x190 drivers/base/dd.c:752 __device_attach_driver+0x282/0x3f0 drivers/base/dd.c:863 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:433 __device_attach+0x2a8/0x410 drivers/base/dd.c:932 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:493 device_add+0x8db/0xc10 drivers/base/core.c:3273 usb_new_device+0xce3/0x1470 drivers/usb/core/hub.c:2654 hub_port_connect drivers/usb/core/hub.c:5499 [inline] hub_port_connect_change drivers/usb/core/hub.c:5639 [inline] port_event drivers/usb/core/hub.c:5805 [inline] hub_event+0x2922/0x4420 drivers/usb/core/hub.c:5887 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301 worker_thread+0xa6a/0x13c0 kernel/workqueue.c:2447 kthread+0x346/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Freed by task 518: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kmem_cache_free+0x100/0x2d0 mm/slub.c:3224 kernfs_put+0x310/0x480 fs/kernfs/dir.c:547 kernfs_remove_by_name_ns+0xea/0x160 fs/kernfs/dir.c:1599 kernfs_remove_by_name include/linux/kernfs.h:623 [inline] sysfs_unmerge_group+0xd4/0x130 fs/sysfs/group.c:369 rpm_sysfs_remove drivers/base/power/sysfs.c:826 [inline] dpm_sysfs_remove+0x77/0xc0 drivers/base/power/sysfs.c:835 device_del+0x2a6/0xef0 drivers/base/core.c:3430 device_unregister+0x15/0x40 drivers/base/core.c:3486 usb_remove_ep_devs+0x50/0x80 drivers/usb/core/endpoint.c:188 remove_intf_ep_devs drivers/usb/core/message.c:1318 [inline] usb_disable_device+0x31f/0x750 drivers/usb/core/message.c:1469 usb_disconnect+0x31e/0x850 drivers/usb/core/hub.c:2310 hub_port_connect drivers/usb/core/hub.c:5338 [inline] hub_port_connect_change drivers/usb/core/hub.c:5639 [inline] port_event drivers/usb/core/hub.c:5805 [inline] hub_event+0x1aec/0x4420 drivers/usb/core/hub.c:5887 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301 process_scheduled_works kernel/workqueue.c:2363 [inline] worker_thread+0xcf8/0x13c0 kernel/workqueue.c:2449 kthread+0x346/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88812b2d0000 which belongs to the cache kernfs_node_cache of size 144 The buggy address is located 112 bytes inside of 144-byte region [ffff88812b2d0000, ffff88812b2d0090) The buggy address belongs to the page: page:ffffea0004acb400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12b2d0 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff88810018a180 raw: 0000000000000000 0000000000130013 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 5, ts 27636676889, free_ts 27594180275 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x223b/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2a6/0x450 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x1ac/0x2d0 mm/slub.c:2965 kmem_cache_zalloc include/linux/slab.h:657 [inline] __kernfs_new_node+0xe3/0x6b0 fs/kernfs/dir.c:662 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:739 __kernfs_create_file+0x4e/0x270 fs/kernfs/file.c:987 sysfs_add_file_mode_ns+0x29a/0x350 fs/sysfs/file.c:306 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x495/0xd00 fs/sysfs/group.c:149 internal_create_groups fs/sysfs/group.c:189 [inline] sysfs_create_groups+0x58/0x120 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2364 [inline] device_add_attrs+0x155/0x430 drivers/base/core.c:2523 device_add+0x504/0xc10 drivers/base/core.c:3224 usb_new_device+0xce3/0x1470 drivers/usb/core/hub.c:2654 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x129/0x9c0 mm/page_alloc.c:3443 release_pages+0xe52/0xea0 mm/swap.c:1103 __pagevec_release+0x71/0xe0 mm/swap.c:1123 pagevec_release include/linux/pagevec.h:88 [inline] truncate_inode_pages_range+0x819/0x16d0 mm/truncate.c:367 truncate_inode_pages+0x24/0x30 mm/truncate.c:473 kill_bdev fs/block_dev.c:86 [inline] __blkdev_put+0x337/0x7c0 fs/block_dev.c:1795 blkdev_put+0x2d6/0x3c0 fs/block_dev.c:1863 kill_block_super+0xb8/0xf0 fs/super.c:1472 deactivate_locked_super+0xa0/0x100 fs/super.c:335 deactivate_super+0xaf/0xe0 fs/super.c:366 cleanup_mnt+0x45b/0x510 fs/namespace.c:1123 __cleanup_mnt+0x19/0x20 fs/namespace.c:1130 task_work_run+0x127/0x190 kernel/task_work.c:189 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xa90/0x2500 kernel/exit.c:872 do_group_exit+0x141/0x310 kernel/exit.c:986 Memory state around the buggy address: ffff88812b2cff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812b2cff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812b2d0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88812b2d0080: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb ffff88812b2d0100: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================