==================================================================
BUG: KASAN: use-after-free in smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:782
Read of size 8 at addr ffff88807d49f768 by task kworker/0:6/3667
CPU: 0 PID: 3667 Comm: kworker/0:6 Not tainted 5.18.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: rcu_gp process_srcu
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+0xeb/0x467 mm/kasan/report.c:313
print_report mm/kasan/report.c:429 [inline]
kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491
smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:782
sk_error_report+0x35/0x310 net/core/sock.c:340
tcp_write_err net/ipv4/tcp_timer.c:71 [inline]
tcp_probe_timer net/ipv4/tcp_timer.c:395 [inline]
tcp_write_timer_handler+0x437/0xbc0 net/ipv4/tcp_timer.c:626
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+0x679/0xa80 kernel/time/timer.c:1737
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1750
__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:645
RIP: 0010:delay_tsc+0x2e/0xb0 arch/x86/lib/delay.c:79
Code: fd bf 01 00 00 00 41 54 55 53 e8 3d 14 3b fd e8 f8 31 4a 05 41 89 c4 0f 01 f9 66 90 48 c1 e2 20 48 09 c2 48 89 d5 eb 16 f3 90 01 00 00 00 e8 18 14 3b fd e8 d3 31 4a 05 44 39 e0 75 36 0f 01
RSP: 0018:ffffc900038bfba0 EFLAGS: 00000286
RAX: 0000000080000000 RBX: 00000127485613ca RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000001 RDI: 0000000000000001
RBP: 000001274855edea R08: 0000000000000008 R09: ffffc900038bfb77
R10: ffffffff8410f1a4 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000002af9 R14: fffffbfff20bf46a R15: 0000000000000001
try_check_zero+0x222/0x420 kernel/rcu/srcutree.c:702
srcu_advance_state kernel/rcu/srcutree.c:1227 [inline]
process_srcu+0x2f2/0xe90 kernel/rcu/srcutree.c:1325
process_one_work+0x996/0x1610 kernel/workqueue.c:2289
worker_thread+0x665/0x1080 kernel/workqueue.c:2436
kthread+0x2e9/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
The buggy address belongs to the physical page:
page:ffffea0001f527c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d49f
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 ffffffff00000101 0000000000000000
raw: 0000000000000000 ffff88807d49f000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 25809, tgid 25809 (syz-executor.5), ts 528343534760, free_ts 529047646438
prep_new_page mm/page_alloc.c:2441 [inline]
get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4182
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408
__alloc_pages_node include/linux/gfp.h:587 [inline]
kmem_getpages mm/slab.c:1378 [inline]
cache_grow_begin+0x75/0x350 mm/slab.c:2584
cache_alloc_refill+0x27f/0x380 mm/slab.c:2957
____cache_alloc mm/slab.c:3040 [inline]
____cache_alloc mm/slab.c:3023 [inline]
__do_cache_alloc mm/slab.c:3267 [inline]
slab_alloc mm/slab.c:3309 [inline]
__kmem_cache_alloc_lru mm/slab.c:3493 [inline]
kmem_cache_alloc+0x450/0x560 mm/slab.c:3513
getname_flags.part.0+0x50/0x4f0 fs/namei.c:138
getname_flags+0x9a/0xe0 include/linux/audit.h:323
getname fs/namei.c:217 [inline]
__do_sys_symlinkat fs/namei.c:4343 [inline]
__se_sys_symlinkat fs/namei.c:4340 [inline]
__x64_sys_symlinkat+0x77/0xc0 fs/namei.c:4340
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:1356 [inline]
free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406
free_unref_page_prepare mm/page_alloc.c:3328 [inline]
free_unref_page+0x19/0x6a0 mm/page_alloc.c:3423
slab_destroy mm/slab.c:1630 [inline]
slabs_destroy+0x89/0xc0 mm/slab.c:1650
cache_flusharray mm/slab.c:3411 [inline]
___cache_free+0x34e/0x670 mm/slab.c:3474
qlink_free mm/kasan/quarantine.c:157 [inline]
qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:446
kasan_slab_alloc include/linux/kasan.h:224 [inline]
slab_post_alloc_hook mm/slab.h:749 [inline]
slab_alloc mm/slab.c:3316 [inline]
kmem_cache_alloc_trace+0x258/0x4a0 mm/slab.c:3581
kmalloc include/linux/slab.h:581 [inline]
kzalloc include/linux/slab.h:714 [inline]
kobject_uevent_env+0x235/0x1660 lib/kobject_uevent.c:524
__loop_clr_fd+0x6f2/0xe20 drivers/block/loop.c:1150
loop_clr_fd drivers/block/loop.c:1230 [inline]
lo_ioctl+0x398/0x17b0 drivers/block/loop.c:1556
blkdev_ioctl+0x36e/0x800 block/ioctl.c:588
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
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
Memory state around the buggy address:
ffff88807d49f600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807d49f680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88807d49f700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88807d49f780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807d49f800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: fd std
1: bf 01 00 00 00 mov $0x1,%edi
6: 41 54 push %r12
8: 55 push %rbp
9: 53 push %rbx
a: e8 3d 14 3b fd callq 0xfd3b144c
f: e8 f8 31 4a 05 callq 0x54a320c
14: 41 89 c4 mov %eax,%r12d
17: 0f 01 f9 rdtscp
1a: 66 90 xchg %ax,%ax
1c: 48 c1 e2 20 shl $0x20,%rdx
20: 48 09 c2 or %rax,%rdx
23: 48 89 d5 mov %rdx,%rbp
26: eb 16 jmp 0x3e
28: f3 90 pause
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 18 14 3b fd callq 0xfd3b144c
34: e8 d3 31 4a 05 callq 0x54a320c
39: 44 39 e0 cmp %r12d,%eax
3c: 75 36 jne 0x74
3e: 0f .byte 0xf
3f: 01 .byte 0x1