EXT4-fs (loop8): encrypted files will use data=ordered instead of data journaling mode EXT4-fs (loop8): 1 truncate cleaned up EXT4-fs (loop8): mounted filesystem without journal. Quota mode: none. EXT4-fs error (device loop8): ext4_search_dir:1549: inode #12: block 7: comm syz.8.4480: bad entry in directory: inode out of bounds - offset=0, inode=16777215, rec_len=16, size=56 fake=0 ================================================================== BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:930 [inline] BUG: KASAN: use-after-free in enqueue_timer+0xa6/0x480 kernel/time/timer.c:611 Write of size 8 at addr ffff8881225004c0 by task syz.8.4480/17864 CPU: 1 PID: 17864 Comm: syz.8.4480 Not tainted 6.1.118-syzkaller-00081-g616d7c64fd84 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report_generic.c:356 hlist_add_head include/linux/list.h:930 [inline] enqueue_timer+0xa6/0x480 kernel/time/timer.c:611 internal_add_timer kernel/time/timer.c:640 [inline] __mod_timer+0x8d3/0xcf0 kernel/time/timer.c:1121 mod_timer+0x1f/0x30 kernel/time/timer.c:1172 ext4_update_super+0xa41/0xe50 fs/ext4/super.c:6067 ext4_commit_super+0xe3/0x4b0 fs/ext4/super.c:6086 ext4_handle_error+0x5d8/0x870 fs/ext4/super.c:678 __ext4_error_inode+0x327/0x5e0 fs/ext4/super.c:811 __ext4_check_dir_entry+0x6d2/0x880 fs/ext4/dir.c:117 ext4_search_dir+0x164/0x1b0 fs/ext4/namei.c:1548 ext4_find_inline_entry+0x2b6/0x6a0 fs/ext4/inline.c:1725 __ext4_find_entry+0x2b0/0x1af0 fs/ext4/namei.c:1617 ext4_lookup_entry fs/ext4/namei.c:1774 [inline] ext4_lookup+0x176/0x740 fs/ext4/namei.c:1842 lookup_open fs/namei.c:3459 [inline] open_last_lookups fs/namei.c:3549 [inline] path_openat+0x10fd/0x2d60 fs/namei.c:3779 do_filp_open+0x230/0x480 fs/namei.c:3809 do_sys_openat2+0x151/0x870 fs/open.c:1341 do_sys_open fs/open.c:1357 [inline] __do_sys_open fs/open.c:1365 [inline] __se_sys_open fs/open.c:1361 [inline] __x64_sys_open+0x221/0x270 fs/open.c:1361 x64_sys_call+0x36/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:3 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fca56385d29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fca57116038 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007fca56575fa0 RCX: 00007fca56385d29 RDX: 0000000000000000 RSI: 0000000000141840 RDI: 00000000200002c0 RBP: 00007fca56401b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fca56575fa0 R15: 00007ffc373e13e8 Allocated by task 17330: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:379 [inline] __kasan_kmalloc+0x9c/0xb0 mm/kasan/common.c:388 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:938 [inline] __kmalloc+0xb4/0x1e0 mm/slab_common.c:951 kmalloc include/linux/slab.h:562 [inline] kzalloc include/linux/slab.h:693 [inline] __register_sysctl_table+0x141/0x1060 fs/proc/proc_sysctl.c:1341 register_net_sysctl+0x246/0x260 net/sysctl_net.c:169 ipv4_sysctl_init_net+0x158/0x280 net/ipv4/sysctl_net_ipv4.c:1420 ops_init+0x1cd/0x480 net/core/net_namespace.c:138 setup_net+0x4ca/0xd60 net/core/net_namespace.c:335 copy_net_ns+0x35f/0x5b0 net/core/net_namespace.c:481 create_new_namespaces+0x416/0x670 kernel/nsproxy.c:110 copy_namespaces+0x1d1/0x220 kernel/nsproxy.c:178 copy_process+0x12e2/0x3530 kernel/fork.c:2372 kernel_clone+0x229/0x890 kernel/fork.c:2785 __do_sys_clone kernel/fork.c:2928 [inline] __se_sys_clone kernel/fork.c:2912 [inline] __x64_sys_clone+0x231/0x280 kernel/fork.c:2912 x64_sys_call+0x1b0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 10217: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x131/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1745 [inline] slab_free_freelist_hook mm/slub.c:1771 [inline] slab_free mm/slub.c:3686 [inline] kmem_cache_free_bulk+0x59c/0x780 mm/slub.c:3807 kfree_bulk include/linux/slab.h:469 [inline] kfree_rcu_work+0x2ae/0x760 kernel/rcu/tree.c:3131 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299 worker_thread+0xa60/0x1260 kernel/workqueue.c:2446 kthread+0x26d/0x300 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb4/0xc0 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496 kvfree_call_rcu+0x9f/0x800 kernel/rcu/tree.c:3445 drop_sysctl_table+0x311/0x450 fs/proc/proc_sysctl.c:1727 unregister_sysctl_table+0x76/0x120 fs/proc/proc_sysctl.c:1765 unregister_net_sysctl_table+0x15/0x20 net/sysctl_net.c:175 ipv4_sysctl_exit_net+0x82/0x90 net/ipv4/sysctl_net_ipv4.c:1445 ops_exit_list net/core/net_namespace.c:172 [inline] cleanup_net+0x64b/0xbf0 net/core/net_namespace.c:604 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299 worker_thread+0xa60/0x1260 kernel/workqueue.c:2446 kthread+0x26d/0x300 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888122500000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1216 bytes inside of 4096-byte region [ffff888122500000, ffff888122501000) The buggy address belongs to the physical page: page:ffffea0004894000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x122500 head:ffffea0004894000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 dead000000000001 ffff888100043380 raw: 0000000000000000 0000000000040004 00000001ffffffff 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 103, tgid 103 (udevd), ts 1080713873021, free_ts 1077288181799 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2590 prep_new_page+0x1b/0x110 mm/page_alloc.c:2597 get_page_from_freelist+0x2f41/0x2fc0 mm/page_alloc.c:4462 __alloc_pages+0x234/0x610 mm/page_alloc.c:5759 alloc_slab_page+0x6c/0xf0 allocate_slab mm/slub.c:1962 [inline] new_slab+0x90/0x3e0 mm/slub.c:2015 ___slab_alloc+0x6f9/0xb80 mm/slub.c:3203 __slab_alloc+0x5d/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] __kmem_cache_alloc_node+0x207/0x2a0 mm/slub.c:3462 __do_kmalloc_node mm/slab_common.c:937 [inline] __kmalloc_node+0xa3/0x1e0 mm/slab_common.c:945 kmalloc_node include/linux/slab.h:583 [inline] kvmalloc_node+0x221/0x640 mm/util.c:592 kvmalloc include/linux/slab.h:710 [inline] seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x1ff/0xd00 fs/seq_file.c:210 kernfs_fop_read_iter+0x145/0x470 fs/kernfs/file.c:279 call_read_iter include/linux/fs.h:2268 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x801/0xae0 fs/read_write.c:470 ksys_read+0x199/0x2c0 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:621 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1498 [inline] free_pcp_prepare mm/page_alloc.c:1572 [inline] free_unref_page_prepare+0x83d/0x850 mm/page_alloc.c:3511 free_unref_page+0xb2/0x5c0 mm/page_alloc.c:3607 free_the_page mm/page_alloc.c:798 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5848 __free_slab+0xce/0x1a0 mm/slub.c:2039 free_slab mm/slub.c:2054 [inline] discard_slab mm/slub.c:2060 [inline] __unfreeze_partials+0x165/0x1a0 mm/slub.c:2609 put_cpu_partial+0xa9/0x100 mm/slub.c:2685 __slab_free+0x1c8/0x280 mm/slub.c:3563 do_slab_free mm/slub.c:3640 [inline] ___cache_free+0xc6/0xd0 mm/slub.c:3696 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0xc5/0x140 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x15a/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:310 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:768 slab_alloc_node mm/slub.c:3421 [inline] kmem_cache_alloc_node+0x188/0x330 mm/slub.c:3468 __alloc_skb+0xcc/0x2d0 net/core/skbuff.c:505 alloc_skb include/linux/skbuff.h:1290 [inline] nlmsg_new include/net/netlink.h:991 [inline] rtmsg_ifinfo_build_skb+0x7f/0x180 net/core/rtnetlink.c:3963 rtmsg_ifinfo_event net/core/rtnetlink.c:3999 [inline] rtmsg_ifinfo+0x78/0x120 net/core/rtnetlink.c:4008 Memory state around the buggy address: ffff888122500380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888122500400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888122500480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888122500500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888122500580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== EXT4-fs error (device loop8): ext4_find_dest_de:2115: inode #12: block 7: comm syz.8.4480: bad entry in directory: inode out of bounds - offset=0, inode=16777215, rec_len=16, size=56 fake=0 incfs: Can't find or create .index dir in ./file0 incfs: mount failed -117 EXT4-fs error (device loop8): ext4_search_dir:1549: inode #12: block 7: comm syz.8.4480: bad entry in directory: inode out of bounds - offset=0, inode=16777215, rec_len=16, size=56 fake=0