CPU: 0 PID: 7388 Comm: syz-executor3 Not tainted 4.13.0-rc4-syzkaller #0 dccp_parse_options: DCCP(ffff8801d9786bc0): Option 32 (len=7) error=9 ================================================================== BUG: KASAN: use-after-free in ccid2_hc_tx_packet_recv+0x2920/0x2991 net/dccp/ccids/ccid2.c:584 Read of size 1 at addr ffff8801c1662642 by task syz-executor4/7384 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x145/0x1e7 lib/dump_stack.c:52 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xc/0x19 lib/fault-inject.c:147 should_failslab+0xba/0xf0 mm/failslab.c:31 slab_pre_alloc_hook mm/slab.h:418 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc_trace+0x2c1/0x770 mm/slab.c:3625 kmalloc include/linux/slab.h:493 [inline] dccp_feat_entry_new+0x1a4/0x4f0 net/dccp/feat.c:467 dccp_feat_push_confirm+0x26/0x280 net/dccp/feat.c:515 dccp_feat_handle_nn_established net/dccp/feat.c:1339 [inline] dccp_feat_parse_options+0x1079/0x1c80 net/dccp/feat.c:1424 dccp_parse_options+0x857/0x1050 net/dccp/options.c:128 dccp_rcv_established+0x23/0x70 net/dccp/input.c:374 dccp_v4_do_rcv+0xfa/0x160 net/dccp/ipv4.c:650 sk_backlog_rcv include/net/sock.h:911 [inline] __release_sock+0x10b/0x330 net/core/sock.c:2269 release_sock+0x9a/0x270 net/core/sock.c:2784 dccp_sendmsg+0x590/0xd10 net/dccp/proto.c:798 inet_sendmsg+0x148/0x5a0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:643 ___sys_sendmsg+0x2b9/0x9d0 net/socket.c:2049 __sys_sendmmsg+0x1b6/0x5c0 net/socket.c:2139 SYSC_sendmmsg net/socket.c:2170 [inline] SyS_sendmmsg+0xd/0x20 net/socket.c:2165 entry_SYSCALL_64_fastpath+0x23/0xc2 RIP: 0033:0x455b59 RSP: 002b:00007fca557ccc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007fca557cd6d4 RCX: 0000000000455b59 RDX: 04000000000001e6 RSI: 0000000020000c00 RDI: 0000000000000005 RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004ba6fd R13: 00007fca557ccbb8 R14: 00000000004ba6fd R15: 0000000000000000 CPU: 1 PID: 7384 Comm: syz-executor4 Not tainted 4.13.0-rc4-syzkaller #0 dccp_parse_options: DCCP(ffff8801c6b96b40): Option 32 (len=7) error=9 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x145/0x1e7 lib/dump_stack.c:52 print_address_description+0x6c/0x20b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x121/0x2da mm/kasan/report.c:409 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 ccid2_hc_tx_packet_recv+0x2920/0x2991 net/dccp/ccids/ccid2.c:584 ccid_hc_tx_packet_recv net/dccp/ccid.h:192 [inline] dccp_deliver_input_to_ccids+0x19f/0x210 net/dccp/input.c:186 dccp_rcv_established+0x49/0x70 net/dccp/input.c:378 dccp_v4_do_rcv+0xfa/0x160 net/dccp/ipv4.c:650 sk_backlog_rcv include/net/sock.h:911 [inline] __release_sock+0x10b/0x330 net/core/sock.c:2269 release_sock+0x9a/0x270 net/core/sock.c:2784 dccp_sendmsg+0x590/0xd10 net/dccp/proto.c:798 inet_sendmsg+0x148/0x5a0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:643 ___sys_sendmsg+0x2b9/0x9d0 net/socket.c:2049 __sys_sendmmsg+0x1b6/0x5c0 net/socket.c:2139 SYSC_sendmmsg net/socket.c:2170 [inline] SyS_sendmmsg+0xd/0x20 net/socket.c:2165 entry_SYSCALL_64_fastpath+0x23/0xc2 RIP: 0033:0x455b59 RSP: 002b:00007f0082bc6c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f0082bc76d4 RCX: 0000000000455b59 RDX: 04000000000001e6 RSI: 0000000020000c00 RDI: 0000000000000005 RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004ba6fd R13: 00007f0082bc6bb8 R14: 00000000004ba6fd R15: 0000000000000000 Allocated by task 7384: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x47/0x70 mm/slab.c:3703 __kmalloc_reserve.isra.39+0x2c/0xb0 net/core/skbuff.c:138 __alloc_skb+0x10c/0x6f0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:975 [inline] dccp_send_ack+0xb3/0x340 net/dccp/output.c:580 ccid2_hc_rx_packet_recv+0xf9/0x170 net/dccp/ccids/ccid2.c:763 ccid_hc_rx_packet_recv net/dccp/ccid.h:185 [inline] dccp_deliver_input_to_ccids+0xc5/0x210 net/dccp/input.c:180 dccp_rcv_established+0x49/0x70 net/dccp/input.c:378 dccp_v4_do_rcv+0xfa/0x160 net/dccp/ipv4.c:650 sk_backlog_rcv include/net/sock.h:911 [inline] __sk_receive_skb+0x2dc/0xd50 net/core/sock.c:521 dccp_v4_rcv+0xddb/0x215d net/dccp/ipv4.c:871 ip_local_deliver_finish+0x28a/0xa60 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:248 [inline] ip_local_deliver+0x1ac/0x650 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:477 [inline] ip_rcv_finish+0x896/0x20d0 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:248 [inline] ip_rcv+0xd4c/0x19d6 net/ipv4/ip_input.c:488 __netif_receive_skb_core+0x2094/0x35b0 net/core/dev.c:4418 __netif_receive_skb+0x1f/0x1a0 net/core/dev.c:4456 process_backlog+0x1fd/0x710 net/core/dev.c:5131 napi_poll net/core/dev.c:5528 [inline] net_rx_action+0x6d9/0x1770 net/core/dev.c:5594 __do_softirq+0x2f8/0xb0d kernel/softirq.c:284 Freed by task 7384: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kfree+0xd6/0x250 mm/slab.c:3820 skb_free_head+0x74/0x90 net/core/skbuff.c:554 skb_release_data+0x548/0x830 net/core/skbuff.c:574 skb_release_all+0x3d/0x50 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb+0x13b/0x430 net/core/skbuff.c:663 dccp_v4_do_rcv+0x111/0x160 net/dccp/ipv4.c:685 sk_backlog_rcv include/net/sock.h:911 [inline] __release_sock+0x10b/0x330 net/core/sock.c:2269 release_sock+0x9a/0x270 net/core/sock.c:2784 dccp_sendmsg+0x590/0xd10 net/dccp/proto.c:798 inet_sendmsg+0x148/0x5a0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:643 ___sys_sendmsg+0x2b9/0x9d0 net/socket.c:2049 __sys_sendmmsg+0x1b6/0x5c0 net/socket.c:2139 SYSC_sendmmsg net/socket.c:2170 [inline] SyS_sendmmsg+0xd/0x20 net/socket.c:2165 entry_SYSCALL_64_fastpath+0x23/0xc2 The buggy address belongs to the object at ffff8801c16621c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1154 bytes inside of 2048-byte region [ffff8801c16621c0, ffff8801c16629c0) The buggy address belongs to the page: page:ffffea0007059880 count:1 mapcount:0 mapping:ffff8801c16621c0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801c16621c0 0000000000000000 0000000100000003 raw: ffffea000707a820 ffffea000706d0a0 ffff8801da800c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c1662500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c1662580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c1662600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c1662680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c1662700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================