protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 ================================================================== BUG: KASAN: use-after-free in ccid_hc_tx_delete+0xde/0x100 net/dccp/ccid.c:188 Read of size 8 at addr ffff8880971bd640 by task syz-executor.1/7760 CPU: 0 PID: 7760 Comm: syz-executor.1 Not tainted 5.0.0+ #23 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 ccid_hc_tx_delete+0xde/0x100 net/dccp/ccid.c:188 dccp_sk_destruct+0x3f/0x90 net/dccp/proto.c:181 __sk_destruct+0x55/0x6d0 net/core/sock.c:1699 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2475 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2788 [inline] rcu_core+0x928/0x1390 kernel/rcu/tree.c:2769 __do_softirq+0x266/0x95a kernel/softirq.c:293 invoke_softirq kernel/softirq.c:374 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:414 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 RIP: 0010:update_stack_state+0x5f/0x5f0 arch/x86/kernel/unwind_frame.c:210 Code: 34 58 88 48 c7 85 78 ff ff ff b3 8a b5 41 48 c7 45 88 e0 a1 30 81 48 89 b5 68 ff ff ff c7 01 f1 f1 f1 f1 c7 41 04 00 f3 f3 f3 <48> 89 f9 65 48 8b 1c 25 28 00 00 00 48 89 5d d0 31 db 48 c1 e9 03 RSP: 0018:ffff8880984cf388 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: ffff8880984cf538 RCX: ffffed1013099e79 RDX: 1ffff11013099f1b RSI: ffff8880984cf958 RDI: ffff8880984cf538 RBP: ffff8880984cf450 R08: 0000000000000001 R09: ffff8880984cf590 R10: ffff8880984cf560 R11: ffff8880984cf570 R12: 1ffff11013099e91 R13: ffff8880984cf538 R14: 1ffff11013099e79 R15: ffff8880984cf958 unwind_next_frame.part.0+0x1a9/0xa20 arch/x86/kernel/unwind_frame.c:333 unwind_next_frame+0x3b/0x50 arch/x86/kernel/unwind_frame.c:287 __save_stack_trace+0x83/0x100 arch/x86/kernel/stacktrace.c:44 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:511 __do_kmalloc mm/slab.c:3726 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3735 kmalloc include/linux/slab.h:550 [inline] kzalloc include/linux/slab.h:740 [inline] xt_jumpstack_alloc net/netfilter/x_tables.c:1308 [inline] xt_replace_table+0x530/0x830 net/netfilter/x_tables.c:1367 __do_replace+0x1da/0x930 net/ipv6/netfilter/ip6_tables.c:1087 compat_do_replace.isra.0+0x253/0x3a0 net/ipv6/netfilter/ip6_tables.c:1535 compat_do_ip6t_set_ctl+0x122/0x160 net/ipv6/netfilter/ip6_tables.c:1560 compat_nf_sockopt net/netfilter/nf_sockopt.c:144 [inline] compat_nf_setsockopt+0x9b/0x140 net/netfilter/nf_sockopt.c:156 compat_ipv6_setsockopt net/ipv6/ipv6_sockglue.c:982 [inline] compat_ipv6_setsockopt+0x19b/0x210 net/ipv6/ipv6_sockglue.c:958 inet_csk_compat_setsockopt+0x99/0x120 net/ipv4/inet_connection_sock.c:1054 compat_tcp_setsockopt+0x4d/0x80 net/ipv4/tcp.c:3128 compat_sock_common_setsockopt+0xb4/0x150 net/core/sock.c:3131 __compat_sys_setsockopt+0x181/0x380 net/compat.c:382 __do_compat_sys_socketcall net/compat.c:842 [inline] __se_compat_sys_socketcall net/compat.c:774 [inline] __ia32_compat_sys_socketcall+0x5b5/0x720 net/compat.c:774 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fbf869 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:000000000845f5f0 EFLAGS: 00000206 ORIG_RAX: 0000000000000066 RAX: ffffffffffffffda RBX: 000000000000000e RCX: 000000000845f60c RDX: 000000000845f81c RSI: 000000000845f664 RDI: 000000000845fd7c RBP: 0000000008125bc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8120: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505 slab_post_alloc_hook mm/slab.h:436 [inline] slab_alloc mm/slab.c:3392 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3554 ccid_new+0x256/0x3f0 net/dccp/ccid.c:151 dccp_hdlr_ccid+0x27/0x150 net/dccp/feat.c:44 __dccp_feat_activate+0x17a/0x270 net/dccp/feat.c:344 dccp_feat_activate_values+0x33a/0x766 net/dccp/feat.c:1538 dccp_rcv_request_sent_state_process net/dccp/input.c:472 [inline] dccp_rcv_state_process+0x116f/0x1935 net/dccp/input.c:680 dccp_v6_do_rcv+0x269/0xbf0 net/dccp/ipv6.c:641 sk_backlog_rcv include/net/sock.h:937 [inline] __release_sock+0x12e/0x3a0 net/core/sock.c:2413 release_sock+0x59/0x1c0 net/core/sock.c:2929 inet_wait_for_connect net/ipv4/af_inet.c:588 [inline] __inet_stream_connect+0x59f/0xea0 net/ipv4/af_inet.c:680 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:719 __sys_connect+0x266/0x330 net/socket.c:1685 __do_sys_connect net/socket.c:1696 [inline] __se_sys_connect net/socket.c:1693 [inline] __ia32_sys_connect+0x72/0xb0 net/socket.c:1693 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 8129: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3764 ccid_hc_tx_delete+0xc1/0x100 net/dccp/ccid.c:190 dccp_hdlr_ccid+0x7d/0x150 net/dccp/feat.c:53 __dccp_feat_activate+0x17a/0x270 net/dccp/feat.c:344 dccp_feat_activate_values+0x33a/0x766 net/dccp/feat.c:1538 dccp_create_openreq_child+0x40c/0x570 net/dccp/minisocks.c:127 dccp_v6_request_recv_sock+0x214/0x1da0 net/dccp/ipv6.c:469 dccp_check_req+0x35c/0x6f0 net/dccp/minisocks.c:196 dccp_v6_rcv+0x6d7/0x191e net/dccp/ipv6.c:747 ip6_protocol_deliver_rcu+0x303/0x16c0 net/ipv6/ip6_input.c:394 ip6_input_finish+0x84/0x170 net/ipv6/ip6_input.c:434 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip6_input+0xe4/0x3f0 net/ipv6/ip6_input.c:443 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x1e7/0x320 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 process_backlog+0x206/0x750 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x4fa/0x1070 net/core/dev.c:6412 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff8880971bd640 which belongs to the cache ccid2_hc_tx_sock of size 1240 The buggy address is located 0 bytes inside of 1240-byte region [ffff8880971bd640, ffff8880971bdb18) The buggy address belongs to the page: page:ffffea00025c6f00 count:1 mapcount:0 mapping:ffff8882165ab000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffff88809ac10448 ffff88809ac10448 ffff8882165ab000 raw: 0000000000000000 ffff8880971bc040 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880971bd500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880971bd580: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880971bd600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880971bd680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880971bd700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================