x_tables: ip_tables: socket match: used from hooks FORWARD, but only valid from PREROUTING/INPUT kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 6157 Comm: syz-executor3 Not tainted 4.16.0-rc2+ #235 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:ipt_do_table+0x12ee/0x1950 net/ipv4/netfilter/ip_tables.c:334 RSP: 0018:ffff8801b41eeda0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8801ca850390 RCX: ffffffff84b78e5d RDX: 0000000000000d69 RSI: 0000000000000000 RDI: ffff8801ca85015a RBP: ffff8801b41eefa8 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000003 R12: 0000000000000000 R13: dffffc0000000000 R14: ffff8801ca850100 R15: ffff8801b41eef20 FS: 00007f3f0c151700(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000930025 CR3: 00000001b2a42003 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: iptable_filter_hook+0x65/0x80 net/ipv4/netfilter/iptable_filter.c:41 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline] nf_hook_slow+0xba/0x1a0 net/netfilter/core.c:483 nf_hook include/linux/netfilter.h:243 [inline] __ip_local_out+0x4c1/0xa30 net/ipv4/ip_output.c:113 ip_local_out+0x2d/0x160 net/ipv4/ip_output.c:122 ip_queue_xmit+0x8c0/0x18e0 net/ipv4/ip_output.c:504 tcp_transmit_skb+0x1b12/0x38b0 net/ipv4/tcp_output.c:1176 tcp_connect+0x2d1e/0x40f0 net/ipv4/tcp_output.c:3525 tcp_v4_connect+0x15ef/0x1e70 net/ipv4/tcp_ipv4.c:257 __inet_stream_connect+0x2d4/0xf00 net/ipv4/af_inet.c:620 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:684 SYSC_connect+0x213/0x4a0 net/socket.c:1640 SyS_connect+0x24/0x30 net/socket.c:1621 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453da9 RSP: 002b:00007f3f0c150c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f3f0c1516d4 RCX: 0000000000453da9 RDX: 0000000000000010 RSI: 00000000200dcff0 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000059 R14: 00000000006f08f8 R15: 0000000000000000 Code: 46 52 02 75 41 e8 73 7d b9 fc 8b 85 80 fe ff ff 8d 70 01 89 b5 00 ff ff ff 48 8b b5 88 fe ff ff 4c 8d 24 c6 4c 89 e0 48 c1 e8 03 <42> 80 3c 28 00 0f 85 e8 01 00 00 8b 85 00 ff ff ff 4d 89 34 24 RIP: ipt_do_table+0x12ee/0x1950 net/ipv4/netfilter/ip_tables.c:334 RSP: ffff8801b41eeda0 ---[ end trace 31da5be740846593 ]---