==================================================================
BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:378 [inline]
BUG: KASAN: use-after-free in tcp_write_timer_handler+0x7e2/0x920 net/ipv4/tcp_timer.c:624
Read of size 1 at addr ffff88807be13fc5 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_address_description+0x74/0x340 mm/kasan/report.c:284
print_report+0x107/0x220 mm/kasan/report.c:395
kasan_report+0x139/0x170 mm/kasan/report.c:495
tcp_probe_timer net/ipv4/tcp_timer.c:378 [inline]
tcp_write_timer_handler+0x7e2/0x920 net/ipv4/tcp_timer.c:624
tcp_write_timer+0x176/0x280 net/ipv4/tcp_timer.c:637
call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers+0x76a/0x980 kernel/time/timer.c:1790
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803
__do_softirq+0x277/0x75b kernel/softirq.c:571
__irq_exit_rcu+0xec/0x170 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1107
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:22 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline]
RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:113 [inline]
RIP: 0010:acpi_idle_do_entry drivers/acpi/processor_idle.c:572 [inline]
RIP: 0010:acpi_idle_enter+0x43d/0x800 drivers/acpi/processor_idle.c:709
Code: ff e8 c7 ec 38 f7 48 83 e3 08 44 8b 7c 24 04 0f 85 00 01 00 00 e8 b3 ab 3f f7 66 90 e8 ec e7 38 f7 0f 00 2d f5 0f c5 00 fb f4 <4c> 89 e3 48 c1 eb 03 42 80 3c 2b 00 74 08 4c 89 e7 e8 5d bd 8d f7
RSP: 0018:ffffffff8ca07b80 EFLAGS: 000002d3
RAX: ffffffff8a50be24 RBX: 0000000000000000 RCX: ffffffff8cabb7c0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8a50be1d
RBP: ffffffff8ca07c30 R08: ffffffff8a50be09 R09: fffffbfff19576f9
R10: fffffbfff19576f9 R11: 1ffffffff19576f8 R12: ffffffff8ca07bc0
R13: dffffc0000000000 R14: ffff888140a1b000 R15: 0000000000000001
cpuidle_enter_state+0x50b/0xf50 drivers/cpuidle/cpuidle.c:239
cpuidle_enter+0x59/0x90 drivers/cpuidle/cpuidle.c:356
call_cpuidle kernel/sched/idle.c:155 [inline]
cpuidle_idle_call kernel/sched/idle.c:236 [inline]
do_idle+0x3da/0x680 kernel/sched/idle.c:303
cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:400
rest_init+0x24f/0x270 init/main.c:729
arch_call_rest_init+0xa/0xa init/main.c:890
start_kernel+0x4b6/0x565 init/main.c:1145
secondary_startup_64_no_verify+0xcf/0xdb
Allocated by task 3638:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:325
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slab.h:737 [inline]
slab_alloc_node mm/slub.c:3398 [inline]
slab_alloc mm/slub.c:3406 [inline]
__kmem_cache_alloc_lru mm/slub.c:3413 [inline]
kmem_cache_alloc+0x1cc/0x300 mm/slub.c:3422
kmem_cache_zalloc include/linux/slab.h:702 [inline]
net_alloc net/core/net_namespace.c:410 [inline]
copy_net_ns+0x13c/0x5b0 net/core/net_namespace.c:465
create_new_namespaces+0x4db/0x8e0 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x11e/0x180 kernel/nsproxy.c:226
ksys_unshare+0x57f/0xb30 kernel/fork.c:3188
__do_sys_unshare kernel/fork.c:3259 [inline]
__se_sys_unshare kernel/fork.c:3257 [inline]
__x64_sys_unshare+0x34/0x40 kernel/fork.c:3257
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Last potentially related work creation:
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:481
insert_work+0x54/0x3e0 kernel/workqueue.c:1358
__queue_work+0xaaa/0xd60 kernel/workqueue.c:1517
call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1514 [inline]
__run_timers+0x7a2/0x980 kernel/time/timer.c:1790
__do_softirq+0x277/0x75b kernel/softirq.c:571
Second to last potentially related work creation:
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:481
insert_work+0x54/0x3e0 kernel/workqueue.c:1358
__queue_work+0xaaa/0xd60 kernel/workqueue.c:1517
call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1514 [inline]
__run_timers+0x7a2/0x980 kernel/time/timer.c:1790
__do_softirq+0x277/0x75b kernel/softirq.c:571
The buggy address belongs to the object at ffff88807be13880
which belongs to the cache net_namespace of size 6976
The buggy address is located 1861 bytes inside of
6976-byte region [ffff88807be13880, ffff88807be153c0)
The buggy address belongs to the physical page:
page:ffffea0001ef8400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807be154c0 pfn:0x7be10
head:ffffea0001ef8400 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001e5c800 dead000000000002 ffff8880121d5640
raw: ffff88807be154c0 0000000080040000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3639, tgid 3639 (syz-executor.1), ts 181509965076, free_ts 181509189945
prep_new_page mm/page_alloc.c:2538 [inline]
get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4287
__alloc_pages+0x259/0x560 mm/page_alloc.c:5554
alloc_slab_page+0x70/0xf0 mm/slub.c:1794
allocate_slab+0x5e/0x4b0 mm/slub.c:1939
new_slab mm/slub.c:1992 [inline]
___slab_alloc+0x7f4/0xeb0 mm/slub.c:3180
__slab_alloc mm/slub.c:3279 [inline]
slab_alloc_node mm/slub.c:3364 [inline]
slab_alloc mm/slub.c:3406 [inline]
__kmem_cache_alloc_lru mm/slub.c:3413 [inline]
kmem_cache_alloc+0x24c/0x300 mm/slub.c:3422
kmem_cache_zalloc include/linux/slab.h:702 [inline]
net_alloc net/core/net_namespace.c:410 [inline]
copy_net_ns+0x13c/0x5b0 net/core/net_namespace.c:465
create_new_namespaces+0x4db/0x8e0 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x11e/0x180 kernel/nsproxy.c:226
ksys_unshare+0x57f/0xb30 kernel/fork.c:3188
__do_sys_unshare kernel/fork.c:3259 [inline]
__se_sys_unshare kernel/fork.c:3257 [inline]
__x64_sys_unshare+0x34/0x40 kernel/fork.c:3257
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1458 [inline]
free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1508
free_unref_page_prepare mm/page_alloc.c:3386 [inline]
free_unref_page+0x7d/0x630 mm/page_alloc.c:3482
free_large_kmalloc+0x10b/0x1a0 mm/slab_common.c:932
skb_free_head net/core/skbuff.c:760 [inline]
skb_release_data+0x536/0x6d0 net/core/skbuff.c:789
skb_release_all net/core/skbuff.c:854 [inline]
__kfree_skb+0x56/0x1d0 net/core/skbuff.c:868
netlink_recvmsg+0x5c1/0x10f0 net/netlink/af_netlink.c:1998
____sys_recvmsg+0x285/0x530
___sys_recvmsg net/socket.c:2743 [inline]
__sys_recvmsg+0x294/0x390 net/socket.c:2773
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Memory state around the buggy address:
ffff88807be13e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807be13f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807be13f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807be14000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807be14080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: e8 c7 ec 38 f7 callq 0xf738eccc
5: 48 83 e3 08 and $0x8,%rbx
9: 44 8b 7c 24 04 mov 0x4(%rsp),%r15d
e: 0f 85 00 01 00 00 jne 0x114
14: e8 b3 ab 3f f7 callq 0xf73fabcc
19: 66 90 xchg %ax,%ax
1b: e8 ec e7 38 f7 callq 0xf738e80c
20: 0f 00 2d f5 0f c5 00 verw 0xc50ff5(%rip) # 0xc5101c
27: fb sti
28: f4 hlt
* 29: 4c 89 e3 mov %r12,%rbx <-- trapping instruction
2c: 48 c1 eb 03 shr $0x3,%rbx
30: 42 80 3c 2b 00 cmpb $0x0,(%rbx,%r13,1)
35: 74 08 je 0x3f
37: 4c 89 e7 mov %r12,%rdi
3a: e8 5d bd 8d f7 callq 0xf78dbd9c