TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 ================================================================== CPU: 0 PID: 1548 Comm: syz-executor.5 Not tainted 4.19.67 #41 BUG: KASAN: use-after-free in tls_write_space+0x2b2/0x310 net/tls/tls_main.c:220 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Read of size 1 at addr ffff88808aaa3120 by task syz-executor.4/1535 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0x1b lib/fault-inject.c:149 __should_failslab+0x121/0x190 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1557 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x2e2/0x750 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] aead_request_alloc include/crypto/aead.h:425 [inline] tls_push_record+0x107/0x13a0 net/tls/tls_sw.c:209 tls_sw_sendmsg+0xb22/0x1220 net/tls/tls_sw.c:426 inet_sendmsg+0x141/0x5d0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:632 __sys_sendto+0x262/0x380 net/socket.c:1787 __do_sys_sendto net/socket.c:1799 [inline] __se_sys_sendto net/socket.c:1795 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1795 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459829 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f37499e7c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f37499e7c90 RCX: 0000000000459829 RDX: ffffffffffffffc1 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: fffffffffffffe5b R10: 0000000000000040 R11: 0000000000000246 R12: 00007f37499e86d4 R13: 00000000004c77e7 R14: 00000000004dd068 R15: 0000000000000005 CPU: 1 PID: 1535 Comm: syz-executor.4 Not tainted 4.19.67 #41 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:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 tls_write_space+0x2b2/0x310 net/tls/tls_main.c:220 tcp_new_space net/ipv4/tcp_input.c:5155 [inline] tcp_check_space+0x430/0x720 net/ipv4/tcp_input.c:5166 tcp_data_snd_check net/ipv4/tcp_input.c:5176 [inline] tcp_rcv_established+0x9e9/0x1f10 net/ipv4/tcp_input.c:5667 tcp_v6_do_rcv+0x4b0/0x13c0 net/ipv6/tcp_ipv6.c:1326 sk_backlog_rcv include/net/sock.h:941 [inline] __release_sock+0x129/0x390 net/core/sock.c:2334 release_sock+0x59/0x1c0 net/core/sock.c:2850 tls_sk_proto_close+0x691/0xa20 net/tls/tls_main.c:309 inet_release+0xff/0x1e0 net/ipv4/af_inet.c:428 inet6_release+0x53/0x80 net/ipv6/af_inet6.c:472 __sock_release+0xce/0x2a0 net/socket.c:579 sock_close+0x1b/0x30 net/socket.c:1140 __fput+0x2dd/0x8b0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x273/0x2c0 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+0x53d/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x413511 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 1b 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffd8ef4e590 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000413511 RDX: 0000001b32220000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000001 R08: 000000009b39fb02 R09: 000000009b39fb06 R10: 00007ffd8ef4e670 R11: 0000000000000293 R12: 000000000075c9a0 R13: 000000000075c9a0 R14: 0000000000760880 R15: ffffffffffffffff Allocated by task 1537: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kmem_cache_alloc_trace+0x152/0x760 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] create_ctx+0x46/0x1f0 net/tls/tls_main.c:550 tls_init+0x158/0x7a0 net/tls/tls_main.c:683 tcp_set_ulp+0x216/0x5f0 net/ipv4/tcp_ulp.c:155 do_tcp_setsockopt.isra.0+0x321/0x2390 net/ipv4/tcp.c:2754 tcp_setsockopt+0xbe/0xe0 net/ipv4/tcp.c:3068 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3041 __sys_setsockopt+0x17a/0x280 net/socket.c:1901 __do_sys_setsockopt net/socket.c:1912 [inline] __se_sys_setsockopt net/socket.c:1909 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1909 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1535: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 tls_ctx_free.part.0+0x32/0x40 net/tls/tls_main.c:251 tls_ctx_free net/tls/tls_main.c:246 [inline] tls_sk_proto_close+0x684/0xa20 net/tls/tls_main.c:304 inet_release+0xff/0x1e0 net/ipv4/af_inet.c:428 inet6_release+0x53/0x80 net/ipv6/af_inet6.c:472 __sock_release+0xce/0x2a0 net/socket.c:579 sock_close+0x1b/0x30 net/socket.c:1140 __fput+0x2dd/0x8b0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x273/0x2c0 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+0x53d/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808aaa3040 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 224 bytes inside of 512-byte region [ffff88808aaa3040, ffff88808aaa3240) The buggy address belongs to the page: page:ffffea00022aa8c0 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffffea0001fa1048 ffffea00027f5488 ffff88812c3f0940 raw: 0000000000000000 ffff88808aaa3040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808aaa3000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88808aaa3080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808aaa3100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808aaa3180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808aaa3200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters.