================================================================== BUG: KASAN: use-after-free in tls_fill_prepend include/net/tls.h:339 [inline] BUG: KASAN: use-after-free in tls_push_record+0x1023/0x13e0 net/tls/tls_sw.c:240 Write of size 1 at addr ffff8801735dd000 by task syz-executor4/18318 CPU: 1 PID: 18318 Comm: syz-executor4 Not tainted 4.17.0-rc6+ #75 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+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_store1_noabort+0x17/0x20 mm/kasan/report.c:435 tls_fill_prepend include/net/tls.h:339 [inline] tls_push_record+0x1023/0x13e0 net/tls/tls_sw.c:240 tls_sw_sendmsg+0x9de/0x12b0 net/tls/tls_sw.c:484 inet_sendmsg+0x19f/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007f72e0289c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f72e028a6d4 RCX: 0000000000455a09 RDX: 00000000fffffdef RSI: 00000000200005c0 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020000000 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 00000000000005d8 R14: 00000000006fdce0 R15: 0000000000000000 The buggy address belongs to the page: page:ffffea0005cd7740 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x2fffc0000000000() raw: 02fffc0000000000 0000000000000000 0000000000000000 00000000ffffffff raw: ffffea00046b4e20 ffff8801dae2fe58 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801735dcf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801735dcf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8801735dd000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8801735dd080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801735dd100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================