loop0: lost filesystem error report for type 5 error -117 EXT4-fs (loop0): 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:4183 [inline] BUG: KASAN: slab-use-after-free in ext4_inlinedir_to_tree+0x8f0/0x10a0 fs/ext4/inline.c:1335 Read of size 1 at addr ffff888111d0149d by task syz.0.19/5801 CPU: 1 UID: 0 PID: 5801 Comm: syz.0.19 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:4183 [inline] ext4_inlinedir_to_tree+0x8f0/0x10a0 fs/ext4/inline.c:1335 ext4_htree_fill_tree+0x4c9/0x2480 fs/ext4/namei.c:1195 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 __do_sys_getdents fs/readdir.c:319 [inline] __se_sys_getdents+0xf1/0x270 fs/readdir.c:304 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:0x7f6e8459ce59 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:00007ffef0bce788 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f6e84815fa0 RCX: 00007f6e8459ce59 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f6e84632e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f6e84815fac R14: 00007f6e84815fa0 R15: 00007f6e84815fa0 Allocated by task 5738: 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] __kmalloc_cache_noprof+0x318/0x660 mm/slub.c:5451 _kmalloc_noprof include/linux/slab.h:969 [inline] __kthread_create_on_node+0x115/0x3d0 kernel/kthread.c:483 kthread_create_on_node+0xeb/0x140 kernel/kthread.c:559 napi_kthread_create net/core/dev.c:1656 [inline] netif_napi_add_weight_locked+0x699/0x940 net/core/dev.c:7594 netif_napi_add_weight include/linux/netdevice.h:2870 [inline] netif_napi_add include/linux/netdevice.h:2887 [inline] wg_peer_create+0x52d/0x860 drivers/net/wireguard/peer.c:57 set_peer drivers/net/wireguard/netlink.c:392 [inline] wg_set_device_doit+0xf3a/0x2120 drivers/net/wireguard/netlink.c:569 genl_family_rcv_msg_doit+0x233/0x340 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x614/0x7a0 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7bb/0x940 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:775 __sock_sendmsg net/socket.c:790 [inline] __sys_sendto+0x408/0x5a0 net/socket.c:2252 __do_sys_sendto net/socket.c:2259 [inline] __se_sys_sendto net/socket.c:2255 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2255 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 5738: 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:2700 [inline] slab_free mm/slub.c:6310 [inline] kfree+0x1c5/0x640 mm/slub.c:6625 __kthread_create_on_node+0x2fe/0x3d0 kernel/kthread.c:523 kthread_create_on_node+0xeb/0x140 kernel/kthread.c:559 napi_kthread_create net/core/dev.c:1656 [inline] netif_napi_add_weight_locked+0x699/0x940 net/core/dev.c:7594 netif_napi_add_weight include/linux/netdevice.h:2870 [inline] netif_napi_add include/linux/netdevice.h:2887 [inline] wg_peer_create+0x52d/0x860 drivers/net/wireguard/peer.c:57 set_peer drivers/net/wireguard/netlink.c:392 [inline] wg_set_device_doit+0xf3a/0x2120 drivers/net/wireguard/netlink.c:569 genl_family_rcv_msg_doit+0x233/0x340 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x614/0x7a0 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7bb/0x940 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:775 __sock_sendmsg net/socket.c:790 [inline] __sys_sendto+0x408/0x5a0 net/socket.c:2252 __do_sys_sendto net/socket.c:2259 [inline] __se_sys_sendto net/socket.c:2255 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2255 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 The buggy address belongs to the object at ffff888111d01480 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 29 bytes inside of freed 64-byte region [ffff888111d01480, ffff888111d014c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111d01 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 1113, tgid 1113 (kworker/u9:4), ts 18841797934, free_ts 18841792693 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x22d/0x280 mm/page_alloc.c:1853 prep_new_page mm/page_alloc.c:1861 [inline] get_page_from_freelist+0x24ae/0x2530 mm/page_alloc.c:3941 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5221 alloc_slab_page mm/slub.c:3289 [inline] allocate_slab+0x74/0x5d0 mm/slub.c:3404 new_slab mm/slub.c:3447 [inline] refill_objects+0x328/0x3c0 mm/slub.c:7241 refill_sheaf mm/slub.c:2827 [inline] __pcs_replace_empty_main+0x2e0/0x6b0 mm/slub.c:4692 alloc_from_pcs mm/slub.c:4790 [inline] slab_alloc_node mm/slub.c:4924 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_node_noprof+0x56a/0x7b0 mm/slub.c:5340 _kmalloc_node_noprof include/linux/slab.h:1174 [inline] __vmalloc_area_node mm/vmalloc.c:3857 [inline] __vmalloc_node_range_noprof+0x5d9/0x1730 mm/vmalloc.c:4064 __vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4124 alloc_thread_stack_node kernel/fork.c:358 [inline] dup_task_struct+0x28e/0x850 kernel/fork.c:928 copy_process+0x81b/0x42e0 kernel/fork.c:2109 kernel_clone+0x2d7/0x940 kernel/fork.c:2745 user_mode_thread+0x110/0x180 kernel/fork.c:2821 call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171 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 page last free pid 1113 tgid 1113 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1397 [inline] __free_frozen_pages+0xc0d/0xd20 mm/page_alloc.c:2938 __kasan_populate_vmalloc_do mm/kasan/shadow.c:393 [inline] __kasan_populate_vmalloc+0x1a8/0x1c0 mm/kasan/shadow.c:424 kasan_populate_vmalloc include/linux/kasan.h:580 [inline] alloc_vmap_area+0xd1a/0x1420 mm/vmalloc.c:2123 __get_vm_area_node+0x1f2/0x300 mm/vmalloc.c:3226 __vmalloc_node_range_noprof+0x358/0x1730 mm/vmalloc.c:4024 __vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4124 alloc_thread_stack_node kernel/fork.c:358 [inline] dup_task_struct+0x28e/0x850 kernel/fork.c:928 copy_process+0x81b/0x42e0 kernel/fork.c:2109 kernel_clone+0x2d7/0x940 kernel/fork.c:2745 user_mode_thread+0x110/0x180 kernel/fork.c:2821 call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171 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 Memory state around the buggy address: ffff888111d01380: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ffff888111d01400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888111d01480: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888111d01500: 00 00 00 00 00 00 02 fc fc fc fc fc fc fc fc fc ffff888111d01580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================