================================================================== BUG: KASAN: use-after-free in ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1544 Read of size 1 at addr ffff888112fc4900 by task syz-executor327/305 CPU: 0 PID: 305 Comm: syz-executor327 Not tainted 5.15.167-syzkaller-android13-5.15.167_r00 #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/0x1c0 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1544 ext4_find_inline_entry+0x4b6/0x5e0 fs/ext4/inline.c:1718 __ext4_find_entry+0x2b0/0x1af0 fs/ext4/namei.c:1617 ext4_find_entry+0x24f/0x3a0 fs/ext4/namei.c:1751 ext4_rmdir+0x1b8/0xa80 fs/ext4/namei.c:3207 vfs_rmdir+0x324/0x470 fs/namei.c:4149 incfs_kill_sb+0x113/0x230 fs/incfs/vfs.c:1989 deactivate_locked_super+0xad/0x110 fs/super.c:335 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1143 __cleanup_mnt+0x19/0x20 fs/namespace.c:1150 task_work_run+0x129/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xc48/0x2ca0 kernel/exit.c:880 do_group_exit+0x141/0x310 kernel/exit.c:1002 __do_sys_exit_group kernel/exit.c:1013 [inline] __se_sys_exit_group kernel/exit.c:1011 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1011 x64_sys_call+0x610/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f248eb75119 Code: Unable to access opcode bytes at RIP 0x7f248eb750ef. RSP: 002b:00007ffcaa2589f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f248eb75119 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001 RBP: 00007f248ebf5390 R08: ffffffffffffffb8 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000246 R12: 00007f248ebf5390 R13: 0000000000000000 R14: 00007f248ebf81c0 R15: 00007f248eb42150 Allocated by task 292: 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:433 [inline] __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3248 [inline] kmem_cache_alloc+0xf5/0x200 mm/slub.c:3253 kmem_cache_alloc_node include/linux/slab.h:474 [inline] __alloc_skb+0xbe/0x550 net/core/skbuff.c:416 alloc_skb include/linux/skbuff.h:1183 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1202 [inline] netlink_sendmsg+0x797/0xd20 net/netlink/af_netlink.c:1899 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2431 ___sys_sendmsg+0x252/0x2e0 net/socket.c:2485 __sys_sendmsg net/socket.c:2514 [inline] __do_sys_sendmsg net/socket.c:2523 [inline] __se_sys_sendmsg+0x19a/0x260 net/socket.c:2521 __x64_sys_sendmsg+0x7b/0x90 net/socket.c:2521 x64_sys_call+0x16a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 292: 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+0x126/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xbd/0x190 mm/slub.c:1749 slab_free mm/slub.c:3519 [inline] kmem_cache_free+0x116/0x2e0 mm/slub.c:3535 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:758 [inline] consume_skb+0xb4/0x250 net/core/skbuff.c:930 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x8e7/0xac0 net/netlink/af_netlink.c:1356 netlink_sendmsg+0xa0a/0xd20 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2431 ___sys_sendmsg+0x252/0x2e0 net/socket.c:2485 __sys_sendmsg net/socket.c:2514 [inline] __do_sys_sendmsg net/socket.c:2523 [inline] __se_sys_sendmsg+0x19a/0x260 net/socket.c:2521 __x64_sys_sendmsg+0x7b/0x90 net/socket.c:2521 x64_sys_call+0x16a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888112fc48c0 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 64 bytes inside of 248-byte region [ffff888112fc48c0, ffff888112fc49b8) The buggy address belongs to the page: page:ffffea00044bf100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112fc4 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 ffffea00044bf080 0000000a0000000a ffff8881081b2d80 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 113, ts 4963334717, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5779 allocate_slab mm/slub.c:1932 [inline] new_slab+0x9a/0x4e0 mm/slub.c:1995 ___slab_alloc+0x39e/0x830 mm/slub.c:3028 __slab_alloc+0x4a/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3248 [inline] kmem_cache_alloc+0x134/0x200 mm/slub.c:3253 skb_clone+0x1d1/0x360 net/core/skbuff.c:1547 do_one_broadcast net/netlink/af_netlink.c:1463 [inline] netlink_broadcast_filtered+0x692/0x1220 net/netlink/af_netlink.c:1538 netlink_broadcast+0x3a/0x50 net/netlink/af_netlink.c:1562 uevent_net_broadcast_untagged lib/kobject_uevent.c:331 [inline] kobject_uevent_net_broadcast+0x3a1/0x590 lib/kobject_uevent.c:409 kobject_uevent_env+0x525/0x700 lib/kobject_uevent.c:608 kobject_synth_uevent+0x4eb/0xae0 lib/kobject_uevent.c:208 uevent_store+0x25/0x60 drivers/base/core.c:2441 dev_attr_store+0x5c/0x80 drivers/base/core.c:2137 page_owner free stack trace missing Memory state around the buggy address: ffff888112fc4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff888112fc4880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff888112fc4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888112fc4980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc ffff888112fc4a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== syz-executor327 (305) used greatest stack depth: 19584 bytes left