==================================================================
BUG: KASAN: use-after-free in smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:664
Read of size 8 at addr ffff888050ff8528 by task syz-executor.5/3622
CPU: 0 PID: 3622 Comm: syz-executor.5 Not tainted 5.17.0-rc3-syzkaller-00157-g6605cc67ca18 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_address_description.constprop.0.cold+0x8d/0x336 mm/kasan/report.c:255
__kasan_report mm/kasan/report.c:442 [inline]
kasan_report.cold+0x83/0xdf mm/kasan/report.c:459
smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:664
sk_error_report+0x35/0x310 net/core/sock.c:340
tcp_write_err net/ipv4/tcp_timer.c:71 [inline]
tcp_write_timeout net/ipv4/tcp_timer.c:276 [inline]
tcp_retransmit_timer+0x20c2/0x3320 net/ipv4/tcp_timer.c:512
tcp_write_timer_handler+0x5e6/0xbc0 net/ipv4/tcp_timer.c:622
tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:642
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x67c/0xa30 kernel/time/timer.c:1734
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:trace_lock_acquire include/trace/events/lock.h:13 [inline]
RIP: 0010:lock_acquire+0x43d/0x510 kernel/locking/lockdep.c:5610
Code: f7 fe ff 5e 5f 65 ff 0d 51 11 a5 7e 0f 85 63 fc ff ff e8 d5 e6 a2 ff e9 59 fc ff ff 65 ff 05 3a 11 a5 7e 48 8b 05 93 1f 22 0c ce e3 05 00 85 c0 74 17 65 ff 0d 23 11 a5 7e 0f 85 78 fc ff ff
RSP: 0018:ffffc9000286fb68 EFLAGS: 00000283
RAX: 0000000000000000 RBX: 1ffff9200050df6f RCX: ffffffff815d5b08
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8d93c9d0
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8d93c9d7
R10: fffffbfff1b2793a R11: 000000000000003f R12: 0000000000000002
R13: 0000000000000000 R14: ffffffff8bb83c20 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:268 [inline]
rcu_read_lock include/linux/rcupdate.h:694 [inline]
percpu_ref_get_many include/linux/percpu-refcount.h:202 [inline]
percpu_ref_get include/linux/percpu-refcount.h:222 [inline]
obj_cgroup_get include/linux/memcontrol.h:779 [inline]
memcg_slab_post_alloc_hook+0x155/0x450 mm/slab.h:523
slab_post_alloc_hook mm/slab.h:739 [inline]
slab_alloc_node mm/slub.c:3230 [inline]
slab_alloc mm/slub.c:3238 [inline]
kmem_cache_alloc+0x15c/0x3a0 mm/slub.c:3243
kmem_cache_zalloc include/linux/slab.h:705 [inline]
__alloc_file+0x21/0x280 fs/file_table.c:134
alloc_empty_file+0x6d/0x170 fs/file_table.c:183
alloc_file+0x59/0x590 fs/file_table.c:225
alloc_file_pseudo+0x165/0x250 fs/file_table.c:265
sock_alloc_file+0x4f/0x190 net/socket.c:463
sock_map_fd net/socket.c:487 [inline]
__sys_socket+0x13d/0x200 net/socket.c:1565
__do_sys_socket net/socket.c:1570 [inline]
__se_sys_socket net/socket.c:1568 [inline]
__x64_sys_socket+0x6f/0xb0 net/socket.c:1568
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7ff01f3bc6d7
Code: f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 29 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffea4adf198 EFLAGS: 00000206 ORIG_RAX: 0000000000000029
RAX: ffffffffffffffda RBX: 00007ffea4adf900 RCX: 00007ff01f3bc6d7
RDX: 0000000000000006 RSI: 0000000000000001 RDI: 0000000000000002
RBP: 0000000000000003 R08: 0000000000000000 R09: 00007ffea4adf710
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000032
R13: 000000000010dd9a R14: 0000000000000003 R15: 00007ffea4adf940
Allocated by task 16650:
kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:436 [inline]
__kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469
kasan_slab_alloc include/linux/kasan.h:260 [inline]
slab_post_alloc_hook mm/slab.h:732 [inline]
slab_alloc_node mm/slub.c:3230 [inline]
slab_alloc mm/slub.c:3238 [inline]
kmem_cache_alloc+0x202/0x3a0 mm/slub.c:3243
sk_prot_alloc+0x5f/0x290 net/core/sock.c:1917
sk_alloc+0x32/0xa80 net/core/sock.c:1976
inet_create net/ipv4/af_inet.c:319 [inline]
inet_create+0x395/0xea0 net/ipv4/af_inet.c:245
__sock_create+0x353/0x790 net/socket.c:1468
sock_create net/socket.c:1519 [inline]
__sys_socket+0xef/0x200 net/socket.c:1561
__do_sys_socket net/socket.c:1570 [inline]
__se_sys_socket net/socket.c:1568 [inline]
__x64_sys_socket+0x6f/0xb0 net/socket.c:1568
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
Last potentially related work creation:
kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
__kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3026 [inline]
call_rcu+0xb1/0x740 kernel/rcu/tree.c:3106
sk_destruct+0x102/0x180 net/core/sock.c:2061
__sk_free+0xef/0x3d0 net/core/sock.c:2074
sock_wfree+0x129/0x240 net/core/sock.c:2304
skb_release_head_state+0x9f/0x2a0 net/core/skbuff.c:729
skb_release_all net/core/skbuff.c:740 [inline]
__kfree_skb net/core/skbuff.c:756 [inline]
kfree_skb_reason net/core/skbuff.c:776 [inline]
kfree_skb_reason+0xff/0x400 net/core/skbuff.c:770
neigh_invalidate+0x20d/0x560 net/core/neighbour.c:1024
neigh_timer_handler+0xd47/0x10e0 net/core/neighbour.c:1111
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x67c/0xa30 kernel/time/timer.c:1734
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
The buggy address belongs to the object at ffff888050ff8000
which belongs to the cache UDP-Lite of size 1728
The buggy address is located 1320 bytes inside of
1728-byte region [ffff888050ff8000, ffff888050ff86c0)
The buggy address belongs to the page:
page:ffffea000143fe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888050ffc880 pfn:0x50ff8
head:ffffea000143fe00 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff88804ea5c801
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea000179bc00 dead000000000002 ffff888015deedc0
raw: ffff888050ffc880 0000000080110000 00000001ffffffff ffff88804ea5c801
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 11630, ts 1004764550954, free_ts 1004310785557
prep_new_page mm/page_alloc.c:2434 [inline]
get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4165
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389
alloc_pages+0x1aa/0x310 mm/mempolicy.c:2271
alloc_slab_page mm/slub.c:1799 [inline]
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x28a/0x3b0 mm/slub.c:2004
___slab_alloc+0x87c/0xe90 mm/slub.c:3018
__slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105
slab_alloc_node mm/slub.c:3196 [inline]
slab_alloc mm/slub.c:3238 [inline]
kmem_cache_alloc+0x35c/0x3a0 mm/slub.c:3243
sk_prot_alloc+0x5f/0x290 net/core/sock.c:1917
sk_alloc+0x32/0xa80 net/core/sock.c:1976
inet_create net/ipv4/af_inet.c:319 [inline]
inet_create+0x395/0xea0 net/ipv4/af_inet.c:245
__sock_create+0x353/0x790 net/socket.c:1468
sock_create net/socket.c:1519 [inline]
__sys_socket+0xef/0x200 net/socket.c:1561
__do_sys_socket net/socket.c:1570 [inline]
__se_sys_socket net/socket.c:1568 [inline]
__x64_sys_socket+0x6f/0xb0 net/socket.c:1568
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1352 [inline]
free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1404
free_unref_page_prepare mm/page_alloc.c:3325 [inline]
free_unref_page+0x19/0x690 mm/page_alloc.c:3404
__unfreeze_partials+0x320/0x340 mm/slub.c:2536
qlink_free mm/kasan/quarantine.c:157 [inline]
qlist_free_all+0x6d/0x160 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:446
kasan_slab_alloc include/linux/kasan.h:260 [inline]
slab_post_alloc_hook mm/slab.h:732 [inline]
slab_alloc_node mm/slub.c:3230 [inline]
slab_alloc mm/slub.c:3238 [inline]
kmem_cache_alloc+0x202/0x3a0 mm/slub.c:3243
kmem_cache_zalloc include/linux/slab.h:705 [inline]
taskstats_tgid_alloc kernel/taskstats.c:561 [inline]
taskstats_exit+0x5c6/0xb40 kernel/taskstats.c:600
do_exit+0x8b1/0x2a30 kernel/exit.c:791
do_group_exit+0xd2/0x2f0 kernel/exit.c:935
get_signal+0x4b0/0x28c0 kernel/signal.c:2862
arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207
__syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x44/0xae
Memory state around the buggy address:
ffff888050ff8400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888050ff8480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888050ff8500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888050ff8580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888050ff8600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: f7 fe idiv %esi
2: ff 5e 5f lcall *0x5f(%rsi)
5: 65 ff 0d 51 11 a5 7e decl %gs:0x7ea51151(%rip) # 0x7ea5115d
c: 0f 85 63 fc ff ff jne 0xfffffc75
12: e8 d5 e6 a2 ff callq 0xffa2e6ec
17: e9 59 fc ff ff jmpq 0xfffffc75
1c: 65 ff 05 3a 11 a5 7e incl %gs:0x7ea5113a(%rip) # 0x7ea5115d
23: 48 8b 05 93 1f 22 0c mov 0xc221f93(%rip),%rax # 0xc221fbd
* 2a: e8 ce e3 05 00 callq 0x5e3fd <-- trapping instruction
2f: 85 c0 test %eax,%eax
31: 74 17 je 0x4a
33: 65 ff 0d 23 11 a5 7e decl %gs:0x7ea51123(%rip) # 0x7ea5115d
3a: 0f 85 78 fc ff ff jne 0xfffffcb8