EXT4-fs (loop1): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. ================================================================== BUG: KASAN: slab-use-after-free in ext4_dirent_get_data_len fs/ext4/ext4.h:4156 [inline] BUG: KASAN: slab-use-after-free in ext4_dir_entry_len fs/ext4/ext4.h:4189 [inline] BUG: KASAN: slab-use-after-free in ext4_inlinedir_to_tree+0x864/0x1030 fs/ext4/inline.c:1339 Read of size 1 at addr ffff888108ff7c19 by task syz.1.18/5891 CPU: 0 UID: 0 PID: 5891 Comm: syz.1.18 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 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_dirent_get_data_len fs/ext4/ext4.h:4156 [inline] ext4_dir_entry_len fs/ext4/ext4.h:4189 [inline] ext4_inlinedir_to_tree+0x864/0x1030 fs/ext4/inline.c:1339 ext4_htree_fill_tree+0x4b9/0x2140 fs/ext4/namei.c:1206 ext4_dx_readdir fs/ext4/dir.c:600 [inline] ext4_readdir+0x2e2a/0x3720 fs/ext4/dir.c:146 iterate_dir+0x2e2/0x4d0 fs/readdir.c:110 ovl_dir_read+0x141/0x4a0 fs/overlayfs/readdir.c:388 ovl_check_d_type_supported+0xc5/0x150 fs/overlayfs/readdir.c:1167 ovl_make_workdir fs/overlayfs/super.c:695 [inline] ovl_get_workdir fs/overlayfs/super.c:836 [inline] ovl_fill_super_creds fs/overlayfs/super.c:1449 [inline] ovl_fill_super+0x3a43/0x5d40 fs/overlayfs/super.c:1560 vfs_get_super fs/super.c:1267 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1286 vfs_get_tree+0x92/0x2a0 fs/super.c:1694 fc_mount fs/namespace.c:1198 [inline] do_new_mount_fc fs/namespace.c:3765 [inline] do_new_mount+0x319/0xdc0 fs/namespace.c:3841 do_mount fs/namespace.c:4174 [inline] __do_sys_mount fs/namespace.c:4390 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4367 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f09e159ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f09e24a9028 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f09e1815fa0 RCX: 00007f09e159ce59 RDX: 0000200000000000 RSI: 0000200000000100 RDI: 0000000000000000 RBP: 00007f09e1632e6f R08: 00002000000000c0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f09e1816038 R14: 00007f09e1815fa0 R15: 00007fff17222ac8 Allocated by task 5642: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5362 [inline] __kmalloc_node_track_caller_noprof+0x4c3/0x730 mm/slub.c:5497 kmemdup_noprof+0x2b/0x70 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:715 [inline] xfrm6_net_sysctl_init net/ipv6/xfrm6_policy.c:206 [inline] xfrm6_net_init+0x86/0x180 net/ipv6/xfrm6_policy.c:261 ops_init+0x35d/0x5d0 net/core/net_namespace.c:137 setup_net+0x118/0x350 net/core/net_namespace.c:446 copy_net_ns+0x4f9/0x720 net/core/net_namespace.c:579 create_new_namespaces+0x3f0/0x6b0 kernel/nsproxy.c:132 unshare_nsproxy_namespaces+0x149/0x190 kernel/nsproxy.c:234 ksys_unshare+0x57d/0xa00 kernel/fork.c:3267 __do_sys_unshare kernel/fork.c:3341 [inline] __se_sys_unshare kernel/fork.c:3339 [inline] __x64_sys_unshare+0x38/0x50 kernel/fork.c:3339 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 12: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2705 [inline] slab_free mm/slub.c:6405 [inline] kfree+0x1c5/0x640 mm/slub.c:6720 xfrm6_net_sysctl_exit net/ipv6/xfrm6_policy.c:238 [inline] xfrm6_net_exit+0x79/0xa0 net/ipv6/xfrm6_policy.c:270 ops_exit_list net/core/net_namespace.c:199 [inline] ops_undo_list+0x43d/0x8d0 net/core/net_namespace.c:252 cleanup_net+0x572/0x810 net/core/net_namespace.c:702 process_one_work kernel/workqueue.c:3322 [inline] process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486 kthread+0x388/0x470 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 The buggy address belongs to the object at ffff888108ff7c00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 25 bytes inside of freed 64-byte region [ffff888108ff7c00, ffff888108ff7c40) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x108ff7 flags: 0x17ff00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 017ff00000000000 ffff8881000418c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800200020 00000000f5000000 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 14581267674, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3294 [inline] allocate_slab+0x79/0x5e0 mm/slub.c:3408 new_slab mm/slub.c:3454 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7338 refill_sheaf mm/slub.c:2832 [inline] __pcs_replace_empty_main+0x2bf/0x6b0 mm/slub.c:4703 alloc_from_pcs mm/slub.c:4801 [inline] slab_alloc_node mm/slub.c:4933 [inline] __do_kmalloc_node mm/slub.c:5361 [inline] __kmalloc_noprof+0x485/0x720 mm/slub.c:5387 _kmalloc_noprof include/linux/slab.h:973 [inline] _kzalloc_noprof include/linux/slab.h:1290 [inline] kobject_get_path+0xc5/0x2f0 lib/kobject.c:161 kobject_uevent_env+0x29e/0x9e0 lib/kobject_uevent.c:548 device_add+0x544/0xb80 drivers/base/core.c:3738 device_create_groups_vargs drivers/base/core.c:4454 [inline] device_create+0x269/0x300 drivers/base/core.c:4493 mon_bin_add+0xb6/0x130 drivers/usb/mon/mon_bin.c:1371 mon_bus_init+0x162/0x2a0 drivers/usb/mon/mon_main.c:291 mon_bus_add drivers/usb/mon/mon_main.c:188 [inline] mon_notify+0x10c/0x3f0 drivers/usb/mon/mon_main.c:219 notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 page_owner free stack trace missing Memory state around the buggy address: ffff888108ff7b00: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ffff888108ff7b80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888108ff7c00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888108ff7c80: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff888108ff7d00: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ==================================================================