================================================================== BUG: KASAN: slab-use-after-free in ext4_discard_work+0xa1/0x7f0 fs/ext4/mballoc.c:3645 Read of size 8 at addr ffff88807bfec3f0 by task kworker/u8:12/1466 CPU: 1 UID: 0 PID: 1466 Comm: kworker/u8:12 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Workqueue: events_unbound ext4_discard_work 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 ext4_discard_work+0xa1/0x7f0 fs/ext4/mballoc.c:3645 process_one_work kernel/workqueue.c:3495 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 12861: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3f/0x90 mm/kasan/common.c:79 poison_kmalloc_redzone mm/kasan/common.c:412 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:429 kasan_kmalloc include/linux/kasan.h:267 [inline] __kmalloc_cache_noprof+0x31c/0x600 mm/slub.c:5680 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] ext4_alloc_sbi fs/ext4/super.c:4424 [inline] ext4_fill_super+0x118/0x6630 fs/ext4/super.c:5886 get_tree_bdev_flags+0x436/0x500 fs/super.c:1821 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:4563 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 12861: 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:2780 [inline] slab_free mm/slub.c:6637 [inline] kfree+0x1c7/0x650 mm/slub.c:6930 ext4_free_sbi fs/ext4/super.c:4417 [inline] ext4_fill_super+0x2962/0x6630 fs/ext4/super.c:5924 get_tree_bdev_flags+0x436/0x500 fs/super.c:1821 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:4563 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 __kasan_record_aux_stack+0xc5/0xe0 mm/kasan/generic.c:561 insert_work+0x3d/0x330 kernel/workqueue.c:2356 __queue_work+0xd3c/0x1360 kernel/workqueue.c:2546 queue_work_on+0x106/0x1d0 kernel/workqueue.c:2599 queue_work include/linux/workqueue.h:700 [inline] ext4_process_freed_data+0xa15/0xab0 fs/ext4/mballoc.c:4037 ext4_journal_commit_callback+0x99/0x620 fs/ext4/super.c:526 jbd2_journal_commit_transaction+0x4902/0x5c60 fs/jbd2/commit.c:1147 jbd2_journal_destroy+0x25f/0x7e0 fs/jbd2/journal.c:2120 ext4_journal_destroy+0xfb/0x130 fs/ext4/ext4_jbd2.h:456 __ext4_fill_super fs/ext4/super.c:5845 [inline] ext4_fill_super+0x546f/0x6630 fs/ext4/super.c:5899 get_tree_bdev_flags+0x436/0x500 fs/super.c:1821 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:4563 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 __kasan_record_aux_stack+0xc5/0xe0 mm/kasan/generic.c:561 insert_work+0x3d/0x330 kernel/workqueue.c:2356 __queue_work+0xd3c/0x1360 kernel/workqueue.c:2546 queue_work_on+0x106/0x1d0 kernel/workqueue.c:2599 queue_work include/linux/workqueue.h:700 [inline] schedule_work include/linux/workqueue.h:761 [inline] ext4_handle_error+0x63b/0x940 fs/ext4/super.c:734 __ext4_error+0x24d/0x360 fs/ext4/super.c:848 ext4_init_orphan_info+0xb75/0xda0 fs/ext4/orphan.c:625 __ext4_fill_super fs/ext4/super.c:5750 [inline] ext4_fill_super+0x5b11/0x6630 fs/ext4/super.c:5899 get_tree_bdev_flags+0x436/0x500 fs/super.c:1821 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:4563 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807bfec000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 1008 bytes inside of freed 8192-byte region [ffff88807bfec000, ffff88807bfee000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7bfe8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813ff2c280 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813ff2c280 dead000000000100 dead000000000122 head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 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 5338, tgid 5338 (dhcpcd-run-hook), ts 50822988154 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1873 prep_new_page+0x22/0xb0 mm/page_alloc.c:1881 get_page_from_freelist+0x22a1/0x22e0 mm/page_alloc.c:3963 __alloc_frozen_pages_noprof+0x211/0x450 mm/page_alloc.c:5505 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab+0x7d/0x5e0 mm/slub.c:3499 new_slab mm/slub.c:3550 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7546 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] __kmalloc_cache_noprof+0x396/0x600 mm/slub.c:5676 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0x10ef/0x1f60 security/tomoyo/audit.c:262 tomoyo_supervisor+0x35f/0x1550 security/tomoyo/common.c:2232 tomoyo_audit_env_log security/tomoyo/environ.c:37 [inline] tomoyo_env_perm+0x151/0x1f0 security/tomoyo/environ.c:64 tomoyo_environ security/tomoyo/domain.c:673 [inline] tomoyo_find_next_domain+0x1332/0x1a90 security/tomoyo/domain.c:889 tomoyo_bprm_check_security+0x11b/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x85/0x240 security/security.c:834 search_binary_handler fs/exec.c:1767 [inline] exec_binprm fs/exec.c:1809 [inline] bprm_execve+0x888/0x1590 fs/exec.c:1865 do_execveat_common+0x99f/0xbd0 fs/exec.c:1963 page last free pid 30 tgid 30 ts 50814152040 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1415 [inline] free_pages_prepare+0x9eb/0xaf0 mm/page_alloc.c:1460 __free_contig_range_common+0x174/0x340 mm/page_alloc.c:7136 __free_contig_range mm/page_alloc.c:7181 [inline] free_pages_bulk+0x48/0x120 mm/page_alloc.c:5389 vm_area_free_pages mm/vmalloc.c:3498 [inline] vfree+0x22c/0x490 mm/vmalloc.c:3547 delayed_vfree_work+0x55/0x80 mm/vmalloc.c:3451 process_one_work kernel/workqueue.c:3495 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88807bfec280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807bfec300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807bfec380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807bfec400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807bfec480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================