EXT4-fs (loop4): mounting ext2 file system using the ext4 subsystem ================================================================== BUG: KASAN: use-after-free in ip_check_mc_rcu+0x4db/0x540 net/ipv4/igmp.c:2697 Read of size 8 at addr ffff88809b830b00 by task syz-executor.0/27178 CPU: 0 PID: 27178 Comm: syz-executor.0 Not tainted 4.14.221-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 EXT4-fs (loop4): corrupt root inode, run e2fsck Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 ip_check_mc_rcu+0x4db/0x540 net/ipv4/igmp.c:2697 __mkroute_output net/ipv4/route.c:2234 [inline] ip_route_output_key_hash_rcu+0x1f25/0x29f0 net/ipv4/route.c:2516 ip_route_output_key_hash+0x195/0x2a0 net/ipv4/route.c:2344 EXT4-fs (loop4): mount failed __ip_route_output_key include/net/route.h:126 [inline] ip_route_output_flow+0x23/0x130 net/ipv4/route.c:2601 udp_sendmsg+0x13b5/0x1c80 net/ipv4/udp.c:1025 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x326/0x800 net/socket.c:2062 __sys_sendmmsg+0x129/0x330 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2178 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x465ef9 RSP: 002b:00007f847533b188 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9 RDX: 000000000800001d RSI: 0000000020007fc0 RDI: 0000000000000003 RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffca8fe3b8f R14: 00007f847533b300 R15: 0000000000022000 Allocated by task 27178: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] ip_mc_add1_src net/ipv4/igmp.c:1960 [inline] ip_mc_add_src+0x8d5/0xbd0 net/ipv4/igmp.c:2084 ip_mc_source+0x8bf/0xe20 net/ipv4/igmp.c:2390 do_ip_setsockopt.constprop.0+0x2fd/0x2900 net/ipv4/ip_sockglue.c:995 ip_setsockopt+0x36/0xb0 net/ipv4/ip_sockglue.c:1248 tcp_setsockopt+0x7b/0xc0 net/ipv4/tcp.c:2828 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 27176: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 ip_sf_list_clear_all net/ipv4/igmp.c:199 [inline] ip_mc_clear_src+0x131/0x1d0 net/ipv4/igmp.c:2137 ip_mc_dec_group+0x30b/0x3c0 net/ipv4/igmp.c:1669 ip_mc_drop_socket+0x13b/0x220 net/ipv4/igmp.c:2661 inet_release+0x47/0x1b0 net/ipv4/af_inet.c:411 __sock_release+0xcd/0x2b0 net/socket.c:602 sock_close+0x15/0x20 net/socket.c:1139 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff88809b830b00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff88809b830b00, ffff88809b830b40) The buggy address belongs to the page: page:ffffea00026e0c00 count:1 mapcount:0 mapping:ffff88809b830000 index:0xffff88809b830c00 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff88809b830000 ffff88809b830c00 000000010000001e raw: ffffea000260e9a0 ffffea000296bba0 ffff88813fe80340 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b830a00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88809b830a80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88809b830b00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88809b830b80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88809b830c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================