================================================================== BUG: KASAN: use-after-free in tls_get_ctx include/net/tls.h:395 [inline] BUG: KASAN: use-after-free in tls_sw_has_ctx_rx include/net/tls.h:427 [inline] BUG: KASAN: use-after-free in ____sk_skb_adjust_room net/core/filter.c:3684 [inline] BUG: KASAN: use-after-free in sk_skb_adjust_room+0x34e/0x610 net/core/filter.c:3661 Read of size 8 at addr ffff88812c18b248 by task syz.2.3225/11137 CPU: 1 PID: 11137 Comm: syz.2.3225 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x71/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351 tls_get_ctx include/net/tls.h:395 [inline] tls_sw_has_ctx_rx include/net/tls.h:427 [inline] ____sk_skb_adjust_room net/core/filter.c:3684 [inline] sk_skb_adjust_room+0x34e/0x610 net/core/filter.c:3661 bpf_prog_e15ab8bd9cea3c06+0x19/0x20 bpf_dispatcher_nop_func include/linux/bpf.h:987 [inline] __bpf_prog_run include/linux/filter.h:607 [inline] bpf_prog_run include/linux/filter.h:614 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:631 [inline] sk_psock_verdict_recv+0x1c8/0x7b0 net/core/skmsg.c:1250 unix_stream_read_skb+0x13d/0x300 net/unix/af_unix.c:2776 sk_psock_verdict_data_ready+0xaf/0x1d0 net/core/skmsg.c:1268 unix_stream_sendmsg+0x631/0xa80 net/unix/af_unix.c:2260 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] __sys_sendto+0x4ac/0x660 net/socket.c:2143 __do_sys_sendto net/socket.c:2155 [inline] __se_sys_sendto net/socket.c:2151 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2151 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f305879fb19 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3059720028 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f3058a25fa0 RCX: 00007f305879fb19 RDX: 0000000000000004 RSI: 0000200000000540 RDI: 0000000000000005 RBP: 00007f3058837b70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3058a26038 R14: 00007f3058a25fa0 R15: 00007ffd6e03da08 Allocated by task 9880: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x72/0x80 mm/kasan/common.c:334 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768 slab_alloc_node mm/slub.c:3382 [inline] slab_alloc mm/slub.c:3392 [inline] __kmem_cache_alloc_lru mm/slub.c:3399 [inline] kmem_cache_alloc+0x166/0x320 mm/slub.c:3408 sk_prot_alloc+0x5f/0x320 net/core/sock.c:2053 sk_alloc+0x3b/0x460 net/core/sock.c:2119 unix_create1+0xb8/0x710 net/unix/af_unix.c:-1 unix_create+0x149/0x200 net/unix/af_unix.c:1019 __sock_create+0x39e/0x7c0 net/socket.c:1540 sock_create net/socket.c:1596 [inline] __sys_socketpair+0x1a1/0x5b0 net/socket.c:1723 __do_sys_socketpair net/socket.c:1776 [inline] __se_sys_socketpair net/socket.c:1773 [inline] __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1773 x64_sys_call+0x6e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:54 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88812c18b200 which belongs to the cache UNIX-STREAM of size 1152 The buggy address is located 72 bytes inside of 1152-byte region [ffff88812c18b200, ffff88812c18b680) The buggy address belongs to the physical page: page:ffffea0004b06200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88812c18a300 pfn:0x12c188 head:ffffea0004b06200 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 dead000000000122 ffff888108878180 raw: ffff88812c18a300 00000000800c0009 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 9880, tgid 9875 (syz.2.2762), ts 437092648077, free_ts 420234801565 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673 prep_new_page+0x1c/0x110 mm/page_alloc.c:2680 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1967 [inline] new_slab+0x98/0x3e0 mm/slub.c:2020 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177 __slab_alloc+0x5e/0xa0 mm/slub.c:3263 slab_alloc_node mm/slub.c:3348 [inline] slab_alloc mm/slub.c:3392 [inline] __kmem_cache_alloc_lru mm/slub.c:3399 [inline] kmem_cache_alloc+0x1a8/0x320 mm/slub.c:3408 sk_prot_alloc+0x5f/0x320 net/core/sock.c:2053 sk_alloc+0x3b/0x460 net/core/sock.c:2119 unix_create1+0xb8/0x710 net/unix/af_unix.c:-1 unix_create+0x149/0x200 net/unix/af_unix.c:1019 __sock_create+0x39e/0x7c0 net/socket.c:1540 sock_create net/socket.c:1596 [inline] __sys_socketpair+0x218/0x5b0 net/socket.c:1727 __do_sys_socketpair net/socket.c:1776 [inline] __se_sys_socketpair net/socket.c:1773 [inline] __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1773 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1581 [inline] free_pcp_prepare mm/page_alloc.c:1655 [inline] free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622 free_unref_page_list+0x117/0x8d0 mm/page_alloc.c:3773 release_pages+0xc7e/0xce0 mm/swap.c:1053 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:316 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu mm/mmu_gather.c:261 [inline] tlb_finish_mmu+0x1b2/0x380 mm/mmu_gather.c:361 exit_mmap+0x41d/0xc10 mm/mmap.c:3384 __mmput+0x92/0x340 kernel/fork.c:1321 mmput+0x4b/0x150 kernel/fork.c:1345 exec_mmap+0x3de/0x460 fs/exec.c:1045 begin_new_exec+0x1150/0x1cb0 fs/exec.c:1317 load_elf_binary+0x9e7/0x2820 fs/binfmt_elf.c:1028 search_binary_handler fs/exec.c:1768 [inline] exec_binprm fs/exec.c:1809 [inline] bprm_execve+0x782/0x1390 fs/exec.c:1878 do_execveat_common+0x8e3/0xaa0 fs/exec.c:1983 do_execve fs/exec.c:2057 [inline] __do_sys_execve fs/exec.c:2133 [inline] __se_sys_execve fs/exec.c:2128 [inline] __x64_sys_execve+0x92/0xb0 fs/exec.c:2128 x64_sys_call+0x98/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:60 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 Memory state around the buggy address: ffff88812c18b100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812c18b180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88812c18b200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88812c18b280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88812c18b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================