alloc_pages_current+0x193/0x2a0 mm/mempolicy.c:2197 ================================================================== alloc_pages include/linux/gfp.h:532 [inline] pte_alloc_one+0x16/0x190 arch/x86/mm/pgtable.c:35 BUG: KASAN: use-after-free in tls_fill_prepend include/net/tls.h:379 [inline] BUG: KASAN: use-after-free in tls_push_record+0x104c/0x1370 net/tls/tls_sw.c:220 do_fault_around mm/memory.c:3769 [inline] do_read_fault mm/memory.c:3810 [inline] do_fault mm/memory.c:3944 [inline] handle_pte_fault mm/memory.c:4175 [inline] __handle_mm_fault+0x31e7/0x41c0 mm/memory.c:4299 Write of size 1 at addr ffff888042750000 by task syz-executor.5/15064 handle_mm_fault+0x436/0xb10 mm/memory.c:4336 __do_page_fault+0x68e/0xd60 arch/x86/mm/fault.c:1412 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1205 RIP: 0010:__get_user_4+0x21/0x30 arch/x86/lib/getuser.S:78 Code: 50 ff 31 c0 0f 01 ca c3 90 48 83 c0 03 72 55 65 48 8b 14 25 c0 df 01 00 48 3b 82 98 14 00 00 73 43 48 19 d2 48 21 d0 0f 01 cb <8b> 50 fd 31 c0 0f 01 ca c3 66 0f 1f 44 00 00 48 83 c0 07 72 25 65 RSP: 0018:ffff888046d1f928 EFLAGS: 00050202 RAX: 0000000020000283 RBX: 00000000ffffff3c RCX: ffffc9000c26b000 RDX: ffffffffffffffff RSI: ffffffff86d542d3 RDI: 0000000000000286 RBP: 0000000000000004 R08: ffffffff8cd33fd0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880579e9180 R13: 1ffff11008da3f2a R14: 0000000000000004 R15: 0000000000000000 do_ip_getsockopt+0x1fc/0x17a0 net/ipv4/ip_sockglue.c:1321 ip_getsockopt+0x87/0x1c0 net/ipv4/ip_sockglue.c:1559 udp_getsockopt+0x5d/0x90 net/ipv4/udp.c:2632 ipv6_getsockopt+0x204/0x260 net/ipv6/ipv6_sockglue.c:1374 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:3629 __sys_getsockopt+0x135/0x210 net/socket.c:2050 __do_sys_getsockopt net/socket.c:2061 [inline] __se_sys_getsockopt net/socket.c:2058 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2058 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7ff482445ae9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff47f9bb188 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007ff482558f60 RCX: 00007ff482445ae9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007ff47f9bb1d0 R08: 0000000020000280 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff3936de2f R14: 00007ff47f9bb300 R15: 0000000000022000 CPU: 1 PID: 15064 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 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+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_store1_noabort+0x88/0x90 mm/kasan/report.c:435 tls_fill_prepend include/net/tls.h:379 [inline] tls_push_record+0x104c/0x1370 net/tls/tls_sw.c:220 tls_handle_open_record net/tls/tls_main.c:156 [inline] tls_sk_proto_close+0x8cf/0xc20 net/tls/tls_main.c:271 inet_release+0xd7/0x1e0 net/ipv4/af_inet.c:427 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:472 __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 get_signal+0x1b64/0x1f70 kernel/signal.c:2400 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 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 RIP: 0033:0x7f2853225ae9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f285079b188 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: 0000000000004000 RBX: 00007f2853338f60 RCX: 00007f2853225ae9 RDX: 00000000e0ffffff RSI: 00000000200005c0 RDI: 0000000000000003 RBP: 00007f285079b1d0 R08: 0000000000000000 R09: fffffffffffffd9e R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe117761ef R14: 00007f285079b300 R15: 0000000000022000 Allocated by task 4690: kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 getname_flags+0xce/0x590 fs/namei.c:140 do_sys_open+0x26c/0x520 fs/open.c:1079 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4690: __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 putname+0xe1/0x120 fs/namei.c:261 do_sys_open+0x2ba/0x520 fs/open.c:1094 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888042750780 which belongs to the cache names_cache of size 4096 The buggy address is located 1920 bytes to the left of 4096-byte region [ffff888042750780, ffff888042751780) The buggy address belongs to the page: page:ffffea000109d400 count:1 mapcount:0 mapping:ffff88823b843380 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea000278e788 ffffea000109d488 ffff88823b843380 raw: 0000000000000000 ffff888042750780 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804274ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804274ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888042750000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888042750080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888042750100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 ---------------- Code disassembly (best guess): 0: 50 push %rax 1: ff 31 pushq (%rcx) 3: c0 0f 01 rorb $0x1,(%rdi) 6: ca c3 90 lret $0x90c3 9: 48 83 c0 03 add $0x3,%rax d: 72 55 jb 0x64 f: 65 48 8b 14 25 c0 df mov %gs:0x1dfc0,%rdx 16: 01 00 18: 48 3b 82 98 14 00 00 cmp 0x1498(%rdx),%rax 1f: 73 43 jae 0x64 21: 48 19 d2 sbb %rdx,%rdx 24: 48 21 d0 and %rdx,%rax 27: 0f 01 cb stac * 2a: 8b 50 fd mov -0x3(%rax),%edx <-- trapping instruction 2d: 31 c0 xor %eax,%eax 2f: 0f 01 ca clac 32: c3 retq 33: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 39: 48 83 c0 07 add $0x7,%rax 3d: 72 25 jb 0x64 3f: 65 gs