EXT4-fs warning (device sda1): ext4_block_to_path:105: block 1220899671 > max in inode 15770 ================================================================== BUG: KASAN: use-after-free in nf_hook_slow+0x197/0x1a0 net/netfilter/core.c:466 Read of size 2 at addr ffff888096787a80 by task syz-executor.1/9483 CPU: 1 PID: 9483 Comm: syz-executor.1 Not tainted 4.14.221-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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_load2_noabort+0x68/0x70 mm/kasan/report.c:428 nf_hook_slow+0x197/0x1a0 net/netfilter/core.c:466 nf_hook include/linux/netfilter.h:205 [inline] NF_HOOK include/linux/netfilter.h:248 [inline] mld_sendpack+0x884/0xea0 net/ipv6/mcast.c:1660 mld_send_cr net/ipv6/mcast.c:1956 [inline] mld_ifc_timer_expire+0x57c/0xcd0 net/ipv6/mcast.c:2455 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:rcu_read_unlock_special+0x452/0xdd0 kernel/rcu/tree_plugin.h:542 RSP: 0018:ffff88805d06f748 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: 1ffffffff11e1251 RBX: ffff888096e20180 RCX: 1ffff11012dc414f RDX: dffffc0000000000 RSI: ffff888096e20a80 RDI: 0000000000000286 RBP: ffff888096e20504 R08: ffff8880ba42ac30 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000286 R13: ffff888096e20506 R14: ffff888096e20505 R15: 0000000000000000 __rcu_read_unlock+0x158/0x160 kernel/rcu/update.c:260 rcu_read_unlock include/linux/rcupdate.h:684 [inline] sigio_perm fs/fcntl.c:714 [inline] send_sigurg_to_task fs/fcntl.c:802 [inline] send_sigurg+0x22d/0x4f0 fs/fcntl.c:830 sk_send_sigurg+0x7e/0x260 net/core/sock.c:2687 tcp_check_urg.isra.0+0x150/0x5b0 net/ipv4/tcp_input.c:5213 tcp_urg net/ipv4/tcp_input.c:5254 [inline] tcp_rcv_established+0xcc5/0x1810 net/ipv4/tcp_input.c:5578 tcp_v4_do_rcv+0x541/0x7d0 net/ipv4/tcp_ipv4.c:1476 sk_backlog_rcv include/net/sock.h:921 [inline] __release_sock+0x12a/0x350 net/core/sock.c:2269 release_sock+0x54/0x1b0 net/core/sock.c:2805 sk_stream_wait_memory+0x492/0xd20 net/core/stream.c:145 tcp_sendmsg_locked+0x1179/0x2ef0 net/ipv4/tcp.c:1416 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 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 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x465ef9 RSP: 002b:00007f714e2fb188 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9 RDX: ffffffffffffff58 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 00000000004bcd1c R08: 0000000020000100 R09: 0000000000000010 R10: 0000000020008005 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffdbc56456f R14: 00007f714e2fb300 R15: 0000000000022000 Allocated by task 7999: 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 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x46/0xd0 mm/util.c:397 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] allocate_hook_entries_size net/netfilter/core.c:82 [inline] nf_hook_entries_grow net/netfilter/core.c:125 [inline] nf_register_net_hook+0x25d/0xa40 net/netfilter/core.c:277 nf_register_net_hooks+0x47/0xa0 net/netfilter/core.c:382 ip6t_register_table+0x1d3/0x280 net/ipv6/netfilter/ip6_tables.c:1799 ip6table_mangle_table_init net/ipv6/netfilter/ip6table_mangle.c:101 [inline] ip6table_mangle_table_init+0x82/0xc0 net/ipv6/netfilter/ip6table_mangle.c:90 xt_find_table_lock+0x247/0x3d0 net/netfilter/x_tables.c:1110 get_info+0xf5/0x530 net/ipv6/netfilter/ip6_tables.c:983 do_ip6t_get_ctl+0x125/0x7d0 net/ipv6/netfilter/ip6_tables.c:1709 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x62/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x146/0x1e0 net/ipv6/ipv6_sockglue.c:1376 tcp_getsockopt+0x7b/0xc0 net/ipv4/tcp.c:3257 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x102/0x1c0 net/socket.c:1878 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 7999: 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 kvfree+0x45/0x50 mm/util.c:416 nf_register_net_hook+0x6c2/0xa40 net/netfilter/core.c:296 nf_register_net_hooks+0x47/0xa0 net/netfilter/core.c:382 ip6t_register_table+0x1d3/0x280 net/ipv6/netfilter/ip6_tables.c:1799 ip6table_raw_table_init net/ipv6/netfilter/ip6table_raw.c:44 [inline] ip6table_raw_table_init+0x82/0xc0 net/ipv6/netfilter/ip6table_raw.c:33 xt_find_table_lock+0x247/0x3d0 net/netfilter/x_tables.c:1110 get_info+0xf5/0x530 net/ipv6/netfilter/ip6_tables.c:983 do_ip6t_get_ctl+0x125/0x7d0 net/ipv6/netfilter/ip6_tables.c:1709 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x62/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x146/0x1e0 net/ipv6/ipv6_sockglue.c:1376 tcp_getsockopt+0x7b/0xc0 net/ipv4/tcp.c:3257 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x102/0x1c0 net/socket.c:1878 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff888096787a80 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of 128-byte region [ffff888096787a80, ffff888096787b00) The buggy address belongs to the page: page:ffffea000259e1c0 count:1 mapcount:0 mapping:ffff888096787000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff888096787000 0000000000000000 0000000100000015 raw: ffffea000255f2e0 ffff88813fe81548 ffff88813fe80640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096787980: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888096787a00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff888096787a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888096787b00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888096787b80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ==================================================================