FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 ================================================================== BUG: KASAN: use-after-free in tls_write_space+0x238/0x2d0 net/tls/tls_main.c:222 CPU: 1 PID: 12763 Comm: syz-executor.5 Not tainted 4.14.232-syzkaller #0 Read of size 1 at addr ffff8880a95b3270 by task syz-executor.3/12758 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x149 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2898 [inline] prepare_alloc_pages mm/page_alloc.c:4131 [inline] __alloc_pages_nodemask+0x22c/0x2720 mm/page_alloc.c:4179 alloc_pages_current+0x155/0x260 mm/mempolicy.c:2113 alloc_pages include/linux/gfp.h:520 [inline] skb_page_frag_refill+0x1bf/0x490 net/core/sock.c:2206 sk_page_frag_refill+0x4a/0x1b0 net/core/sock.c:2226 alloc_sg+0x13e/0x730 net/tls/tls_sw.c:120 alloc_encrypted_sg net/tls/tls_sw.c:170 [inline] tls_sw_sendmsg+0x49a/0xfd0 net/tls/tls_sw.c:437 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 smc_sendmsg+0x14a/0x1d0 net/smc/af_smc.c:1065 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x4665f9 RSP: 002b:00007febb04db188 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9 RDX: 0000000000007fe2 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007febb04db1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff1c95b0cf R14: 00007febb04db300 R15: 0000000000022000 CPU: 0 PID: 12758 Comm: syz-executor.3 Not tainted 4.14.232-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427 tls_write_space+0x238/0x2d0 net/tls/tls_main.c:222 tcp_new_space net/ipv4/tcp_input.c:5114 [inline] tcp_check_space+0x395/0x640 net/ipv4/tcp_input.c:5125 tcp_data_snd_check net/ipv4/tcp_input.c:5135 [inline] tcp_rcv_established+0x727/0x1810 net/ipv4/tcp_input.c:5583 tcp_v4_do_rcv+0x541/0x7d0 net/ipv4/tcp_ipv4.c:1476 sk_backlog_rcv include/net/sock.h:921 [inline] __release_sock+0x12a/0x350 net/core/sock.c:2269 release_sock+0x54/0x1b0 net/core/sock.c:2805 tls_sk_proto_close+0x575/0x8b0 net/tls/tls_main.c:294 inet_release+0xdf/0x1b0 net/ipv4/af_inet.c:425 __sock_release net/socket.c:602 [inline] sock_release+0x87/0x1e0 net/socket.c:623 smc_release+0x1e4/0x5d0 net/smc/af_smc.c:141 __sock_release+0xcd/0x2b0 net/socket.c:602 sock_close+0x15/0x20 net/socket.c:1139 __fput+0x25f/0x7a0 fs/file_table.c:210 CUSE: unknown device info "" task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x41940b CUSE: unknown device info "* 2ՖI?" RSP: 002b:00007ffe13510d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 000000000041940b RDX: 0000000000000000 RSI: 0000000009e2b8a2 RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b30b23618 R10: 0000000000000000 R11: 0000000000000293 R12: 000000000056c9e0 R13: 000000000056c9e0 R14: 000000000056bf60 R15: 00000000000cedf3 Allocated by task 12759: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] tls_init+0xb1/0x4e0 net/tls/tls_main.c:518 tcp_set_ulp+0x18f/0x4c0 net/ipv4/tcp_ulp.c:127 do_tcp_setsockopt.constprop.0+0x1f6/0x1c10 net/ipv4/tcp.c:2547 tcp_setsockopt net/ipv4/tcp.c:2830 [inline] tcp_setsockopt+0xa7/0xc0 net/ipv4/tcp.c:2822 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 12758: CUSE: unknown device info "&*e/4nhIJ[5M9{/d-skj/XPQ(ڡmtCohp)"_t}#(92|6\Qհe5]2Dni!8v[D`zkHu,g5_x!b 2$AOa׌z" save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 tls_ctx_free net/tls/tls_main.c:252 [inline] tls_ctx_free net/tls/tls_main.c:246 [inline] tls_sk_proto_close+0x568/0x8b0 net/tls/tls_main.c:290 inet_release+0xdf/0x1b0 net/ipv4/af_inet.c:425 __sock_release net/socket.c:602 [inline] sock_release+0x87/0x1e0 net/socket.c:623 smc_release+0x1e4/0x5d0 net/smc/af_smc.c:141 CUSE: unknown device info "V" __sock_release+0xcd/0x2b0 net/socket.c:602 CUSE: DEVNAME unspecified sock_close+0x15/0x20 net/socket.c:1139 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880a95b3200 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 112 bytes inside of 192-byte region [ffff8880a95b3200, ffff8880a95b32c0) The buggy address belongs to the page: page:ffffea0002a56cc0 count:1 mapcount:0 mapping:ffff8880a95b3000 index:0xffff8880a95b3100 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a95b3000 ffff8880a95b3100 000000010000000d raw: ffffea0002a301e0 ffffea0002a78ea0 ffff88813fe80040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a95b3100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a95b3180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880a95b3200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a95b3280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a95b3300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================