nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead. ================================================================== BUG: KASAN: slab-out-of-bounds in get_tpkt_data.isra.0+0x8c8/0x980 net/netfilter/nf_conntrack_h323_main.c:218 Write of size 2 at addr ffff8801d8f4b062 by task syz-executor.5/5654 CPU: 0 PID: 5654 Comm: syz-executor.5 Not tainted 4.4.174+ #4 0000000000000000 821261b4d3d7fc1b ffff8801db606e68 ffffffff81aad1a1 0000000000000001 ffffea000763d2c0 ffff8801d8f4b062 0000000000000002 0000000000000001 ffff8801db606ea0 ffffffff81490120 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_address_description+0x6f/0x21b mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report mm/kasan/report.c:408 [inline] [] kasan_report.cold+0x8c/0x2be mm/kasan/report.c:393 [] __asan_report_store2_noabort+0x17/0x20 mm/kasan/report.c:432 [] get_tpkt_data.isra.0+0x8c8/0x980 net/netfilter/nf_conntrack_h323_main.c:218 [] q931_help+0x1aa/0x1020 net/netfilter/nf_conntrack_h323_main.c:1177 [] ipv6_helper+0x303/0x440 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c:131 [] nf_iterate+0x186/0x220 net/netfilter/core.c:274 [] nf_hook_slow+0x1b6/0x340 net/netfilter/core.c:306 [] nf_hook_thresh include/linux/netfilter.h:187 [inline] [] NF_HOOK_COND include/linux/netfilter.h:239 [inline] [] ip6_output+0x284/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_xmit+0xc76/0x1a60 net/ipv6/ip6_output.c:240 binder: 5672:5674 unknown command 1088774917 binder: 5672:5674 ioctl c0306201 20012000 returned -22 binder: 5672:5674 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 5672:5674 unknown command 37644 binder: 5672:5674 ioctl c0306201 2000dfd0 returned -22 [] tcp_v6_send_response.constprop.0+0xa0a/0x11f0 net/ipv6/tcp_ipv6.c:834 [] tcp_v6_send_reset+0x25c/0x470 net/ipv6/tcp_ipv6.c:904 [] tcp_v6_rcv+0xdb2/0x30b0 net/ipv6/tcp_ipv6.c:1502 [] ip6_input_finish+0x57d/0x14f0 net/ipv6/ip6_input.c:248 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_input+0xf8/0x1f0 net/ipv6/ip6_input.c:280 [] dst_input include/net/dst.h:504 [inline] [] ip6_rcv_finish+0x14d/0x670 net/ipv6/ip6_input.c:62 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ipv6_rcv+0xfc1/0x1a20 net/ipv6/ip6_input.c:186 [] __netif_receive_skb_core+0x1300/0x2950 net/core/dev.c:4041 [] __netif_receive_skb+0x58/0x1c0 net/core/dev.c:4076 [] process_backlog+0x200/0x630 net/core/dev.c:4673 [] napi_poll net/core/dev.c:4911 [inline] [] net_rx_action+0x367/0xd30 net/core/dev.c:4976 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:956 [] do_softirq.part.0+0x54/0x60 kernel/softirq.c:317 [] do_softirq kernel/softirq.c:309 [inline] [] __local_bh_enable_ip+0xcc/0xe0 kernel/softirq.c:170 [] local_bh_enable include/linux/bottom_half.h:31 [inline] [] rcu_read_unlock_bh include/linux/rcupdate.h:957 [inline] [] ip6_finish_output2+0xa0f/0x1dc0 net/ipv6/ip6_output.c:114 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_xmit+0xc76/0x1a60 net/ipv6/ip6_output.c:240 [] inet6_csk_xmit+0x24c/0x4b0 net/ipv6/inet6_connection_sock.c:176 [] __tcp_transmit_skb+0x1904/0x2cf0 net/ipv4/tcp_output.c:1034 [] tcp_transmit_skb net/ipv4/tcp_output.c:1047 [inline] [] tcp_send_syn_data net/ipv4/tcp_output.c:3259 [inline] [] tcp_connect+0x1bd3/0x31b0 net/ipv4/tcp_output.c:3294 [] tcp_v6_connect+0x1391/0x1b30 net/ipv6/tcp_ipv6.c:294 [] __inet_stream_connect+0x2cf/0xc70 net/ipv4/af_inet.c:615 [] tcp_sendmsg_fastopen net/ipv4/tcp.c:1092 [inline] [] tcp_sendmsg+0x19ed/0x2ab0 net/ipv4/tcp.c:1112 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] SYSC_sendto net/socket.c:1678 [inline] [] SyS_sendto+0x201/0x340 net/socket.c:1646 [] entry_SYSCALL_64_fastpath+0x1e/0x9a Allocated by task 5654: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc.part.0+0x62/0xf0 mm/kasan/kasan.c:616 [] kasan_kmalloc+0xb7/0xd0 mm/kasan/kasan.c:601 [] kasan_krealloc+0x60/0x80 mm/kasan/kasan.c:654 [] __do_krealloc mm/slab_common.c:1196 [inline] [] __krealloc+0x8f/0xc0 mm/slab_common.c:1222 [] __nf_ct_ext_add_length+0x221/0xb50 net/netfilter/nf_conntrack_extend.c:104 [] nf_ct_helper_ext_add net/netfilter/nf_conntrack_helper.c:176 [inline] [] __nf_ct_try_assign_helper+0x32a/0x890 net/netfilter/nf_conntrack_helper.c:230 [] init_conntrack net/netfilter/nf_conntrack_core.c:1006 [inline] [] resolve_normal_ct net/netfilter/nf_conntrack_core.c:1056 [inline] [] nf_conntrack_in+0x160e/0x1c20 net/netfilter/nf_conntrack_core.c:1145 [] ipv6_conntrack_local+0x94/0xf0 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c:184 [] nf_iterate+0x186/0x220 net/netfilter/core.c:274 [] nf_hook_slow+0x1b6/0x340 net/netfilter/core.c:306 [] nf_hook_thresh include/linux/netfilter.h:187 [inline] [] NF_HOOK_THRESH include/linux/netfilter.h:224 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_xmit+0xf18/0x1a60 net/ipv6/ip6_output.c:240 [] inet6_csk_xmit+0x24c/0x4b0 net/ipv6/inet6_connection_sock.c:176 [] __tcp_transmit_skb+0x1904/0x2cf0 net/ipv4/tcp_output.c:1034 [] tcp_transmit_skb net/ipv4/tcp_output.c:1047 [inline] [] tcp_send_syn_data net/ipv4/tcp_output.c:3259 [inline] [] tcp_connect+0x1bd3/0x31b0 net/ipv4/tcp_output.c:3294 [] tcp_v6_connect+0x1391/0x1b30 net/ipv6/tcp_ipv6.c:294 [] __inet_stream_connect+0x2cf/0xc70 net/ipv4/af_inet.c:615 [] tcp_sendmsg_fastopen net/ipv4/tcp.c:1092 [inline] [] tcp_sendmsg+0x19ed/0x2ab0 net/ipv4/tcp.c:1112 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] SYSC_sendto net/socket.c:1678 [inline] [] SyS_sendto+0x201/0x340 net/socket.c:1646 [] entry_SYSCALL_64_fastpath+0x1e/0x9a Freed by task 2136: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kfree+0xf4/0x310 mm/slub.c:3749 [] simple_xattrs_free include/linux/xattr.h:89 [inline] [] shmem_evict_inode+0xf8/0x4e0 mm/shmem.c:625 [] evict+0x2e0/0x630 fs/inode.c:542 [] iput_final fs/inode.c:1477 [inline] [] iput fs/inode.c:1504 [inline] [] iput+0x38f/0x990 fs/inode.c:1489 [] do_unlinkat+0x395/0x610 fs/namei.c:3982 [] SYSC_unlink fs/namei.c:4023 [inline] [] SyS_unlink+0x1b/0x20 fs/namei.c:4021 [] entry_SYSCALL_64_fastpath+0x1e/0x9a The buggy address belongs to the object at ffff8801d8f4b000 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 2 bytes to the right of 96-byte region [ffff8801d8f4b000, ffff8801d8f4b060) The buggy address belongs to the page: