EXT4-fs (loop0): Ignoring removed orlov option EXT4-fs (loop0): mounted filesystem without journal. Opts: noblock_validity,bsddf,sysvgroups,norecovery,debug_want_extra_isize=0x0000000000000080,orlov,nogrpid,noauto_da_alloc,acl,,errors=continue ================================================================== BUG: KASAN: use-after-free in ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1515 Read of size 1 at addr ffff88811976e900 by task syz.0.25/536 CPU: 0 PID: 536 Comm: syz.0.25 Not tainted 5.10.222-syzkaller-1003210-gfd58936f3c1f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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:1515 ext4_find_inline_entry+0x4b6/0x5e0 fs/ext4/inline.c:1700 __ext4_find_entry+0x2b0/0x1990 fs/ext4/namei.c:1588 ext4_lookup_entry fs/ext4/namei.c:1743 [inline] ext4_lookup+0x3c6/0xaa0 fs/ext4/namei.c:1811 __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:0x7ff565786f19 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:00007ff565210048 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 RAX: ffffffffffffffda RBX: 00007ff565916f60 RCX: 00007ff565786f19 RDX: 0000000000000701 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007ff5657f5e68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007ff565916f60 R15: 00007ffd5f1e3858 Allocated by task 236: 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 skb_clone+0x1de/0x370 net/core/skbuff.c:1467 dev_queue_xmit_nit+0x25f/0xa20 net/core/dev.c:2350 xmit_one net/core/dev.c:3602 [inline] dev_hard_start_xmit+0x149/0x620 net/core/dev.c:3623 sch_direct_xmit+0x292/0x9b0 net/sched/sch_generic.c:336 qdisc_restart net/sched/sch_generic.c:401 [inline] __qdisc_run+0xa85/0x1df0 net/sched/sch_generic.c:409 qdisc_run+0x121/0x330 include/net/pkt_sched.h:127 __dev_xmit_skb net/core/dev.c:3799 [inline] __dev_queue_xmit+0xcf0/0x28e0 net/core/dev.c:4155 dev_queue_xmit+0x17/0x20 net/core/dev.c:4223 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb1d/0xfc0 net/ipv4/ip_output.c:237 __ip_finish_output+0x409/0x740 ip_finish_output+0x34/0x1e0 net/ipv4/ip_output.c:325 NF_HOOK_COND include/linux/netfilter.h:288 [inline] ip_output+0x1d6/0x420 net/ipv4/ip_output.c:439 dst_output include/net/dst.h:437 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x10ca/0x1bd0 net/ipv4/ip_output.c:540 ip_queue_xmit+0x4c/0x70 net/ipv4/ip_output.c:554 __tcp_transmit_skb+0x1ddd/0x3850 net/ipv4/tcp_output.c:1401 tcp_transmit_skb net/ipv4/tcp_output.c:1419 [inline] tcp_write_xmit+0x1563/0x5e10 net/ipv4/tcp_output.c:2701 __tcp_push_pending_frames+0x98/0x2f0 net/ipv4/tcp_output.c:2882 tcp_push+0x476/0x620 net/ipv4/tcp.c:741 tcp_sendmsg_locked+0x3092/0x3ae0 net/ipv4/tcp.c:1422 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1452 inet_sendmsg+0xa1/0xc0 net/ipv4/af_inet.c:830 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] sock_write_iter+0x39b/0x530 net/socket.c:1018 call_write_iter include/linux/fs.h:2021 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xb4c/0xe70 fs/read_write.c:605 ksys_write+0x199/0x2c0 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 236: 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 packet_rcv+0x160/0x11f0 net/packet/af_packet.c:2193 dev_queue_xmit_nit+0x993/0xa20 net/core/dev.c:2382 xmit_one net/core/dev.c:3602 [inline] dev_hard_start_xmit+0x149/0x620 net/core/dev.c:3623 sch_direct_xmit+0x292/0x9b0 net/sched/sch_generic.c:336 qdisc_restart net/sched/sch_generic.c:401 [inline] __qdisc_run+0xa85/0x1df0 net/sched/sch_generic.c:409 qdisc_run+0x121/0x330 include/net/pkt_sched.h:127 __dev_xmit_skb net/core/dev.c:3799 [inline] __dev_queue_xmit+0xcf0/0x28e0 net/core/dev.c:4155 dev_queue_xmit+0x17/0x20 net/core/dev.c:4223 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb1d/0xfc0 net/ipv4/ip_output.c:237 __ip_finish_output+0x409/0x740 ip_finish_output+0x34/0x1e0 net/ipv4/ip_output.c:325 NF_HOOK_COND include/linux/netfilter.h:288 [inline] ip_output+0x1d6/0x420 net/ipv4/ip_output.c:439 dst_output include/net/dst.h:437 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x10ca/0x1bd0 net/ipv4/ip_output.c:540 ip_queue_xmit+0x4c/0x70 net/ipv4/ip_output.c:554 __tcp_transmit_skb+0x1ddd/0x3850 net/ipv4/tcp_output.c:1401 tcp_transmit_skb net/ipv4/tcp_output.c:1419 [inline] tcp_write_xmit+0x1563/0x5e10 net/ipv4/tcp_output.c:2701 __tcp_push_pending_frames+0x98/0x2f0 net/ipv4/tcp_output.c:2882 tcp_push+0x476/0x620 net/ipv4/tcp.c:741 tcp_sendmsg_locked+0x3092/0x3ae0 net/ipv4/tcp.c:1422 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1452 inet_sendmsg+0xa1/0xc0 net/ipv4/af_inet.c:830 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] sock_write_iter+0x39b/0x530 net/socket.c:1018 call_write_iter include/linux/fs.h:2021 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xb4c/0xe70 fs/read_write.c:605 ksys_write+0x199/0x2c0 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88811976e8c0 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 64 bytes inside of 248-byte region [ffff88811976e8c0, ffff88811976e9b8) The buggy address belongs to the page: page:ffffea000465db80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11976e flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888107d9cc00 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 236, ts 16059808422, free_ts 16043828021 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 skb_clone+0x1de/0x370 net/core/skbuff.c:1467 dev_queue_xmit_nit+0x25f/0xa20 net/core/dev.c:2350 xmit_one net/core/dev.c:3602 [inline] dev_hard_start_xmit+0x149/0x620 net/core/dev.c:3623 sch_direct_xmit+0x292/0x9b0 net/sched/sch_generic.c:336 qdisc_restart net/sched/sch_generic.c:401 [inline] __qdisc_run+0xa85/0x1df0 net/sched/sch_generic.c:409 qdisc_run+0x121/0x330 include/net/pkt_sched.h:127 __dev_xmit_skb net/core/dev.c:3799 [inline] __dev_queue_xmit+0xcf0/0x28e0 net/core/dev.c:4155 dev_queue_xmit+0x17/0x20 net/core/dev.c:4223 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb1d/0xfc0 net/ipv4/ip_output.c:237 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+0x7e/0x1c0 mm/page_alloc.c:3391 __put_single_page mm/swap.c:104 [inline] __put_page+0xb1/0xe0 mm/swap.c:135 put_page include/linux/mm.h:1257 [inline] anon_pipe_buf_release+0x17c/0x210 fs/pipe.c:137 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_read+0x5a6/0x1040 fs/pipe.c:323 call_read_iter include/linux/fs.h:2015 [inline] new_sync_read fs/read_write.c:415 [inline] vfs_read+0x990/0xba0 fs/read_write.c:496 ksys_read+0x199/0x2c0 fs/read_write.c:634 __do_sys_read fs/read_write.c:644 [inline] __se_sys_read fs/read_write.c:642 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:642 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88811976e800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff88811976e880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88811976e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811976e980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc ffff88811976ea00: 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:2076: inode #12: block 7: comm syz.0.25: bad entry in directory: directory entry overrun - offset=0, inode=1793120026, rec_len=34652, size=56 fake=0