==================================================================
BUG: KASAN: use-after-free in smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:782
Read of size 8 at addr ffff88805055f5e8 by task kworker/u4:18/27916
CPU: 1 PID: 27916 Comm: kworker/u4:18 Not tainted 5.18.0-rc4-syzkaller-00050-g46cf2c613f4b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet
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:lock_release+0xc/0x720 kernel/locking/lockdep.c:5649
Code: e9 55 fe ff ff 48 c7 c7 08 5a b8 8d e8 9d 8f 66 00 e9 6d fd ff ff 0f 1f 84 00 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 41 57 <41> 56 41 55 41 54 49 89 fc 55 53 48 81 ec 90 00 00 00 48 8d 6c 24
RSP: 0018:ffffc9000329fb80 EFLAGS: 00000293
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff888072ab6000 RSI: ffffffff88ff7054 RDI: ffffffff8bd7f5e0
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff88ff704c R11: 0000000000000000 R12: ffff888073bd00a4
R13: dffffc0000000000 R14: ffff888016084d00 R15: 0000000000000319
rcu_lock_release include/linux/rcupdate.h:273 [inline]
rcu_read_unlock include/linux/rcupdate.h:727 [inline]
batadv_iv_ogm_slide_own_bcast_window net/batman-adv/bat_iv_ogm.c:772 [inline]
batadv_iv_ogm_schedule_buff+0x776/0x1430 net/batman-adv/bat_iv_ogm.c:826
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:869 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:862 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x740/0x910 net/batman-adv/bat_iv_ogm.c:1713
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:ffffea00014157c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5055f
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 ffffffff00000101 0000000000000000
raw: 0000000000000000 ffff88805055f000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x3c20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE), pid 8568, tgid 8566 (syz-executor.2), ts 1981272156390, free_ts 1979060052833
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]
slab_alloc_node mm/slab.c:3241 [inline]
kmem_cache_alloc_node_trace+0x518/0x5b0 mm/slab.c:3625
__do_kmalloc_node mm/slab.c:3647 [inline]
__kmalloc_node_track_caller+0x38/0x60 mm/slab.c:3662
kmalloc_reserve net/core/skbuff.c:354 [inline]
__alloc_skb+0xde/0x340 net/core/skbuff.c:426
alloc_skb include/linux/skbuff.h:1300 [inline]
__ip6_append_data.isra.0+0x2e3c/0x3df0 net/ipv6/ip6_output.c:1639
ip6_append_data+0x1e7/0x550 net/ipv6/ip6_output.c:1808
rawv6_sendmsg+0x14ff/0x3ab0 net/ipv6/raw.c:949
inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:819
sock_sendmsg_nosec net/socket.c:705 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:725
sock_no_sendpage+0xf6/0x140 net/core/sock.c:3106
kernel_sendpage.part.0+0x1ff/0x7b0 net/socket.c:3492
kernel_sendpage+0x82/0xd0 net/socket.c:3489
kcm_write_msgs+0x34c/0x1990 net/kcm/kcmsock.c:646
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_node mm/slab.c:3253 [inline]
kmem_cache_alloc_node+0x2ea/0x590 mm/slab.c:3607
__alloc_skb+0x215/0x340 net/core/skbuff.c:414
alloc_skb include/linux/skbuff.h:1300 [inline]
alloc_skb_with_frags+0x93/0x730 net/core/skbuff.c:5995
sock_alloc_send_pskb+0x793/0x920 net/core/sock.c:2600
__ip_append_data+0x1666/0x3590 net/ipv4/ip_output.c:1102
ip_make_skb+0x226/0x2a0 net/ipv4/ip_output.c:1637
udp_sendmsg+0x1b70/0x2730 net/ipv4/udp.c:1249
inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:819
sock_sendmsg_nosec net/socket.c:705 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:725
Memory state around the buggy address:
ffff88805055f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805055f500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805055f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88805055f600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805055f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: e9 55 fe ff ff jmpq 0xfffffe5a
5: 48 c7 c7 08 5a b8 8d mov $0xffffffff8db85a08,%rdi
c: e8 9d 8f 66 00 callq 0x668fae
11: e9 6d fd ff ff jmpq 0xfffffd83
16: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
1d: 00
1e: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
25: fc ff df
28: 41 57 push %r15
* 2a: 41 56 push %r14 <-- trapping instruction
2c: 41 55 push %r13
2e: 41 54 push %r12
30: 49 89 fc mov %rdi,%r12
33: 55 push %rbp
34: 53 push %rbx
35: 48 81 ec 90 00 00 00 sub $0x90,%rsp
3c: 48 rex.W
3d: 8d .byte 0x8d
3e: 6c insb (%dx),%es:(%rdi)
3f: 24 .byte 0x24