==================================================================
BUG: KASAN: slab-out-of-bounds in smc_fback_error_report+0x96/0xa0 net/smc/af_smc.c:670
Read of size 8 at addr ffff888022f27168 by task syz-executor.1/25984
CPU: 0 PID: 25984 Comm: syz-executor.1 Not tainted 5.17.0-rc7-syzkaller-00227-g68453767131a #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
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/0x303 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:670
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:lock_release+0x3f1/0x720 kernel/locking/lockdep.c:5647
Code: 7e 83 f8 01 0f 85 8d 01 00 00 9c 58 f6 c4 02 0f 85 78 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c5 48 c7 45 00 00 00 00 00 c7 45 08 00 00 00 00 48 8b 84 24
RSP: 0018:ffffc90005fefad8 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: ac7a78b937b4913d RCX: ffffc90005fefb28
RDX: 1ffff11003381982 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 1ffff92000bfdf5d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000002 R14: ffff888019c0cc18 R15: ffff888019c0c1c0
rcu_lock_release include/linux/rcupdate.h:273 [inline]
rcu_read_unlock include/linux/rcupdate.h:727 [inline]
inet_twsk_purge+0x503/0x7d0 net/ipv4/inet_timewait_sock.c:299
ops_exit_list+0x125/0x170 net/core/net_namespace.c:173
setup_net+0x77e/0xbb0 net/core/net_namespace.c:353
copy_net_ns+0x318/0x760 net/core/net_namespace.c:474
create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:226
ksys_unshare+0x445/0x920 kernel/fork.c:3058
__do_sys_unshare kernel/fork.c:3129 [inline]
__se_sys_unshare kernel/fork.c:3127 [inline]
__x64_sys_unshare+0x2d/0x40 kernel/fork.c:3127
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:0x7f944eaf6049
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f944d44a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007f944ec09030 RCX: 00007f944eaf6049
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000062000200
RBP: 00007f944eb5008d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd4af321df R14: 00007f944d44a300 R15: 0000000000022000
Allocated by task 25590:
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_kmalloc mm/kasan/common.c:515 [inline]
____kasan_kmalloc mm/kasan/common.c:474 [inline]
__kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:524
kasan_kmalloc include/linux/kasan.h:270 [inline]
__do_kmalloc mm/slab.c:3694 [inline]
__kmalloc_track_caller+0x206/0x4d0 mm/slab.c:3709
kmemdup+0x23/0x50 mm/util.c:128
kmemdup include/linux/fortify-string.h:304 [inline]
__addrconf_sysctl_register+0x9d/0x3d0 net/ipv6/addrconf.c:7032
addrconf_sysctl_register net/ipv6/addrconf.c:7097 [inline]
addrconf_sysctl_register+0x139/0x1d0 net/ipv6/addrconf.c:7086
ipv6_add_dev net/ipv6/addrconf.c:455 [inline]
ipv6_add_dev+0x994/0x11a0 net/ipv6/addrconf.c:375
addrconf_notify+0x60e/0x1ba0 net/ipv6/addrconf.c:3523
notifier_call_chain+0xb5/0x200 kernel/notifier.c:84
call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919
call_netdevice_notifiers_extack net/core/dev.c:1931 [inline]
call_netdevice_notifiers net/core/dev.c:1945 [inline]
register_netdevice+0x10df/0x1580 net/core/dev.c:9698
veth_newlink+0x59c/0xa90 drivers/net/veth.c:1725
__rtnl_newlink+0x107c/0x1760 net/core/rtnetlink.c:3483
rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3531
rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5596
netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x539/0x7e0 net/netlink/af_netlink.c:1343
netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1919
sock_sendmsg_nosec net/socket.c:705 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:725
____sys_sendmsg+0x6e8/0x810 net/socket.c:2413
___sys_sendmsg+0xf3/0x170 net/socket.c:2467
__sys_sendmsg+0xe5/0x1b0 net/socket.c:2496
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
The buggy address belongs to the object at ffff888022f26000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 360 bytes to the right of
4096-byte region [ffff888022f26000, ffff888022f27000)
The buggy address belongs to the page:
page:ffffea00008bc980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22f26
head:ffffea00008bc980 order:1 compound_mapcount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea000086d008 ffffea0000917708 ffff888010c40900
raw: 0000000000000000 ffff888022f26000 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 25590, ts 655662801469, free_ts 655566820742
prep_new_page mm/page_alloc.c:2434 [inline]
get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4165
__alloc_pages_slowpath.constprop.0+0x2eb/0x20d0 mm/page_alloc.c:4934
__alloc_pages+0x412/0x500 mm/page_alloc.c:5402
__alloc_pages_node include/linux/gfp.h:572 [inline]
kmem_getpages mm/slab.c:1378 [inline]
cache_grow_begin+0x75/0x390 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:3308 [inline]
__do_kmalloc mm/slab.c:3692 [inline]
__kmalloc_track_caller+0x3b0/0x4d0 mm/slab.c:3709
kmemdup+0x23/0x50 mm/util.c:128
kmemdup include/linux/fortify-string.h:304 [inline]
__addrconf_sysctl_register+0x9d/0x3d0 net/ipv6/addrconf.c:7032
addrconf_sysctl_register net/ipv6/addrconf.c:7097 [inline]
addrconf_sysctl_register+0x139/0x1d0 net/ipv6/addrconf.c:7086
ipv6_add_dev net/ipv6/addrconf.c:455 [inline]
ipv6_add_dev+0x994/0x11a0 net/ipv6/addrconf.c:375
addrconf_notify+0x60e/0x1ba0 net/ipv6/addrconf.c:3523
notifier_call_chain+0xb5/0x200 kernel/notifier.c:84
call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919
call_netdevice_notifiers_extack net/core/dev.c:1931 [inline]
call_netdevice_notifiers net/core/dev.c:1945 [inline]
register_netdevice+0x10df/0x1580 net/core/dev.c:9698
veth_newlink+0x59c/0xa90 drivers/net/veth.c:1725
__rtnl_newlink+0x107c/0x1760 net/core/rtnetlink.c:3483
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
slab_destroy mm/slab.c:1630 [inline]
slabs_destroy+0x89/0xc0 mm/slab.c:1650
cache_flusharray mm/slab.c:3410 [inline]
___cache_free+0x303/0x600 mm/slab.c:3472
qlink_free mm/kasan/quarantine.c:157 [inline]
qlist_free_all+0x50/0x1a0 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:260 [inline]
slab_post_alloc_hook mm/slab.h:732 [inline]
slab_alloc mm/slab.c:3315 [inline]
kmem_cache_alloc+0x265/0x560 mm/slab.c:3499
kmem_cache_zalloc include/linux/slab.h:704 [inline]
alloc_buffer_head+0x20/0x140 fs/buffer.c:3310
jbd2_journal_write_metadata_buffer+0xcc/0xba0 fs/jbd2/journal.c:364
jbd2_journal_commit_transaction+0x16ce/0x6a80 fs/jbd2/commit.c:696
kjournald2+0x1d0/0x930 fs/jbd2/journal.c:213
kthread+0x2e9/0x3a0 kernel/kthread.c:377
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888022f27000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888022f27080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888022f27100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888022f27180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888022f27200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 7e 83 jle 0xffffff85
2: f8 clc
3: 01 0f add %ecx,(%rdi)
5: 85 8d 01 00 00 9c test %ecx,-0x63ffffff(%rbp)
b: 58 pop %rax
c: f6 c4 02 test $0x2,%ah
f: 0f 85 78 01 00 00 jne 0x18d
15: 48 f7 04 24 00 02 00 testq $0x200,(%rsp)
1c: 00
1d: 74 01 je 0x20
1f: fb sti
20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
27: fc ff df
* 2a: 48 01 c5 add %rax,%rbp <-- trapping instruction
2d: 48 c7 45 00 00 00 00 movq $0x0,0x0(%rbp)
34: 00
35: c7 45 08 00 00 00 00 movl $0x0,0x8(%rbp)
3c: 48 rex.W
3d: 8b .byte 0x8b
3e: 84 .byte 0x84
3f: 24 .byte 0x24