EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem without journal. Opts: nogrpid,resuid=0x000000000000ee01,debug_want_extra_isize=0x0000000000000068,debug,nombcache,quota,,errors=continue ================================================================== BUG: KASAN: use-after-free in ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1516 Read of size 1 at addr ffff88810d4cb900 by task syz-executor372/293 CPU: 1 PID: 293 Comm: syz-executor372 Not tainted 5.10.226-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1516 ext4_find_inline_entry+0x4b6/0x5e0 fs/ext4/inline.c:1700 __ext4_find_entry+0x2b0/0x1990 fs/ext4/namei.c:1589 ext4_lookup_entry fs/ext4/namei.c:1744 [inline] ext4_lookup+0x3c6/0xaa0 fs/ext4/namei.c:1812 __lookup_hash+0x143/0x290 fs/namei.c:1541 filename_create+0x202/0x750 fs/namei.c:3608 user_path_create fs/namei.c:3665 [inline] do_mknodat+0x187/0x450 fs/namei.c:3729 __do_sys_mknod fs/namei.c:3768 [inline] __se_sys_mknod fs/namei.c:3766 [inline] __x64_sys_mknod+0x80/0x90 fs/namei.c:3766 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f1b23f9d119 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 1f 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffcb015fc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f1b23f9d119 RDX: 0000000000000701 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f1b24013488 R08: 0000000000001501 R09: 00007fffcb016050 R10: 0000000000001505 R11: 0000000000000246 R12: 00007fffcb016050 R13: 00007fffcb016010 R14: 0000000000000003 R15: 0000000000000000 Allocated by task 133: 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+0xb1/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] alloc_skb_with_frags+0xa1/0x570 net/core/skbuff.c:5951 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2388 unix_dgram_sendmsg+0x700/0x1f90 net/unix/af_unix.c:1725 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] sock_write_iter+0x39b/0x530 net/socket.c:1018 do_iter_readv_writev+0x58e/0x790 do_iter_write+0x183/0x640 fs/read_write.c:866 vfs_writev+0x26e/0x510 fs/read_write.c:939 do_writev+0x1aa/0x340 fs/read_write.c:982 __do_sys_writev fs/read_write.c:1055 [inline] __se_sys_writev fs/read_write.c:1052 [inline] __x64_sys_writev+0x7d/0x90 fs/read_write.c:1052 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 132: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/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:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kmem_cache_free+0xa9/0x1e0 mm/slub.c:3219 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:695 [inline] consume_skb+0xb4/0x250 net/core/skbuff.c:851 skb_free_datagram+0x28/0xe0 net/core/datagram.c:325 unix_dgram_recvmsg+0xc97/0x1240 net/unix/af_unix.c:2233 sock_recvmsg_nosec net/socket.c:905 [inline] sock_recvmsg net/socket.c:923 [inline] sock_read_iter+0x353/0x480 net/socket.c:996 do_iter_readv_writev+0x58e/0x790 do_iter_read+0x177/0x650 fs/read_write.c:801 vfs_readv fs/read_write.c:921 [inline] do_readv+0x268/0x460 fs/read_write.c:958 __do_sys_readv fs/read_write.c:1049 [inline] __se_sys_readv fs/read_write.c:1046 [inline] __x64_sys_readv+0x7d/0x90 fs/read_write.c:1046 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88810d4cb8c0 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 64 bytes inside of 248-byte region [ffff88810d4cb8c0, ffff88810d4cb9b8) The buggy address belongs to the page: page:ffffea00043532c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d4cb flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888107d9cf00 raw: 0000000000000000 00000000000c000c 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 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 133, ts 5135146807, free_ts 5125660724 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] nlmsg_new include/net/netlink.h:953 [inline] inet6_rt_notify+0x2db/0x550 net/ipv6/route.c:6047 fib6_add_rt2node net/ipv6/ip6_fib.c:1253 [inline] fib6_add+0x233e/0x3d20 net/ipv6/ip6_fib.c:1482 __ip6_ins_rt net/ipv6/route.c:1303 [inline] ip6_route_add+0x8a/0x130 net/ipv6/route.c:3765 addrconf_add_mroute net/ipv6/addrconf.c:2525 [inline] addrconf_add_dev+0x415/0x610 net/ipv6/addrconf.c:2543 addrconf_dev_config+0x231/0x5a0 net/ipv6/addrconf.c:3423 addrconf_notify+0x8c5/0xe90 net/ipv6/addrconf.c:3669 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 __dev_notify_flags+0x304/0x610 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+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page mm/page_alloc.c:3391 [inline] free_the_page+0x9e/0x370 mm/page_alloc.c:5407 __free_pages+0x67/0xc0 mm/page_alloc.c:5418 free_pages+0x7c/0x90 mm/page_alloc.c:5429 _pgd_free arch/x86/mm/pgtable.c:420 [inline] pgd_free+0x17d/0x190 arch/x86/mm/pgtable.c:476 mm_free_pgd kernel/fork.c:675 [inline] __mmdrop+0xb0/0x490 kernel/fork.c:726 mmdrop include/linux/sched/mm.h:49 [inline] finish_task_switch+0x1e6/0x5a0 kernel/sched/core.c:3903 context_switch kernel/sched/core.c:4049 [inline] __schedule+0xbee/0x1330 kernel/sched/core.c:4804 preempt_schedule_irq+0xc7/0x140 kernel/sched/core.c:5065 irqentry_exit_cond_resched kernel/entry/common.c:365 [inline] irqentry_exit+0x4f/0x60 kernel/entry/common.c:395 sysvec_reschedule_ipi+0x83/0x160 arch/x86/kernel/smp.c:225 asm_sysvec_reschedule_ipi+0x12/0x20 arch/x86/include/asm/idtentry.h:640 Memory state around the buggy address: ffff88810d4cb800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff88810d4cb880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88810d4cb900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810d4cb980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc ffff88810d4cba00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== EXT4-fs error (device loop0): ext4_find_dest_de:2077: inode #12: block 7: comm syz-executor372: bad entry in directory: directory entry overrun - offset=0, inode=1793120026, rec_len=34652, size=56 fake=0