TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ================================================================== BUG: KASAN: use-after-free in tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 Read of size 8 at addr ffff8880b47b6550 by task syz-executor.4/12389 CPU: 0 PID: 12389 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 tasklet_action_common.constprop.0+0x29e/0x360 kernel/softirq.c:515 __do_softirq+0x265/0x980 kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1092 do_softirq.part.0+0x160/0x1c0 kernel/softirq.c:336 do_softirq kernel/softirq.c:328 [inline] __local_bh_enable_ip+0x20e/0x270 kernel/softirq.c:189 spin_unlock_bh include/linux/spinlock.h:374 [inline] write_sequnlock_bh include/linux/seqlock.h:474 [inline] tcp_fastopen_cache_set+0x3a2/0x700 net/ipv4/tcp_metrics.c:598 tcp_rcv_fastopen_synack net/ipv4/tcp_input.c:5760 [inline] tcp_rcv_synsent_state_process net/ipv4/tcp_input.c:5905 [inline] tcp_rcv_state_process+0x2613/0x4c50 net/ipv4/tcp_input.c:6069 tcp_v6_do_rcv+0x47c/0x1370 net/ipv6/tcp_ipv6.c:1373 sk_backlog_rcv include/net/sock.h:952 [inline] __release_sock+0x134/0x3a0 net/core/sock.c:2362 release_sock+0x54/0x1b0 net/core/sock.c:2901 inet_wait_for_connect net/ipv4/af_inet.c:588 [inline] __inet_stream_connect+0x562/0xe00 net/ipv4/af_inet.c:680 tcp_sendmsg_fastopen net/ipv4/tcp.c:1187 [inline] tcp_sendmsg_locked+0x2267/0x2f60 net/ipv4/tcp.c:1234 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1462 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 __sys_sendto+0x21a/0x320 net/socket.c:1899 __do_sys_sendto net/socket.c:1911 [inline] __se_sys_sendto net/socket.c:1907 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1907 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f99a44720f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f99a29c3168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f99a4592050 RCX: 00007f99a44720f9 RDX: ffffffffffffff28 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007f99a44cdae9 R08: 0000000020000140 R09: 000000000000001c R10: 0000000020000004 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffea81b89ff R14: 00007f99a29c3300 R15: 0000000000022000 Allocated by task 12359: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] bcm_tx_setup net/can/bcm.c:947 [inline] bcm_sendmsg+0x25d7/0x4150 net/can/bcm.c:1386 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 12340: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 bcm_release+0x260/0x950 net/can/bcm.c:1561 __sock_release+0xcd/0x2a0 net/socket.c:599 sock_close+0x15/0x20 net/socket.c:1214 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880b47b6480 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 208 bytes inside of 1024-byte region [ffff8880b47b6480, ffff8880b47b6880) The buggy address belongs to the page: page:ffffea0002d1ed80 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0xffff8880b47b7b00 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002cfc108 ffffea0002cfef08 ffff88813bff0ac0 raw: ffff8880b47b7b00 ffff8880b47b6000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b47b6400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880b47b6480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880b47b6500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b47b6580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b47b6600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================