TCP: request_sock_subflow_v4: Possible SYN flooding on port [::]:20002. Sending cookies.
==================================================================
BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30 kernel/locking/lockdep.c:5835
Read of size 8 at addr ffff88802e967a58 by task kworker/0:6/5277
CPU: 0 UID: 0 PID: 5277 Comm: kworker/0:6 Not tainted 6.11.0-rc1-next-20240729-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Workqueue: events mptcp_worker
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
lock_release+0x151/0xa30 kernel/locking/lockdep.c:5835
__timer_delete_sync+0x157/0x310 kernel/time/timer.c:1648
del_timer_sync include/linux/timer.h:185 [inline]
sk_stop_timer_sync+0x1c/0x90 net/core/sock.c:3454
mptcp_pm_del_add_timer+0x18d/0x250 net/mptcp/pm_netlink.c:334
mptcp_incoming_options+0x158a/0x2570 net/mptcp/options.c:1165
tcp_data_queue+0xf5/0x76c0 net/ipv4/tcp_input.c:5201
tcp_rcv_established+0xfba/0x2020 net/ipv4/tcp_input.c:6225
tcp_v4_do_rcv+0x96d/0xc70 net/ipv4/tcp_ipv4.c:1909
tcp_v4_rcv+0x2dc0/0x37f0 net/ipv4/tcp_ipv4.c:2344
ip_protocol_deliver_rcu+0x22e/0x440 net/ipv4/ip_input.c:205
ip_local_deliver_finish+0x341/0x5f0 net/ipv4/ip_input.c:233
NF_HOOK+0x3a4/0x450 include/linux/netfilter.h:314
NF_HOOK+0x3a4/0x450 include/linux/netfilter.h:314
__netif_receive_skb_one_core net/core/dev.c:5660 [inline]
__netif_receive_skb+0x2bf/0x650 net/core/dev.c:5774
process_backlog+0x662/0x15b0 net/core/dev.c:6107
__napi_poll+0xcb/0x490 net/core/dev.c:6771
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6962
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
do_softirq+0x11b/0x1e0 kernel/softirq.c:455
__local_bh_enable_ip+0x1bb/0x200 kernel/softirq.c:382
mptcp_pm_send_ack net/mptcp/pm_netlink.c:486 [inline]
mptcp_pm_nl_addr_send_ack+0x1af/0x270 net/mptcp/pm_netlink.c:735
mptcp_pm_nl_work+0x1188/0x1780 net/mptcp/pm_netlink.c:872
mptcp_worker+0x133/0x11f0 net/mptcp/protocol.c:2748
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Allocated by task 6746:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387
kasan_kmalloc include/linux/kasan.h:211 [inline]
__kmalloc_cache_noprof+0x19c/0x2c0 mm/slub.c:4189
kmalloc_noprof include/linux/slab.h:681 [inline]
mptcp_pm_alloc_anno_list+0x12c/0x340 net/mptcp/pm_netlink.c:359
mptcp_pm_create_subflow_or_signal_addr+0x17b5/0x2020 net/mptcp/pm_netlink.c:572
mptcp_nl_add_subflow_or_signal_addr net/mptcp/pm_netlink.c:1279 [inline]
mptcp_pm_nl_add_addr_doit+0xd94/0x13f0 net/mptcp/pm_netlink.c:1351
genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2597
___sys_sendmsg net/socket.c:2651 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6746:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579
poison_slab_object+0xe0/0x150 mm/kasan/common.c:240
__kasan_slab_free+0x37/0x60 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2252 [inline]
slab_free mm/slub.c:4473 [inline]
kfree+0x149/0x360 mm/slub.c:4594
remove_anno_list_by_saddr+0x156/0x190 net/mptcp/pm_netlink.c:1385
mptcp_pm_remove_addrs_and_subflows net/mptcp/pm_netlink.c:1563 [inline]
mptcp_nl_remove_addrs_list net/mptcp/pm_netlink.c:1591 [inline]
mptcp_pm_nl_flush_addrs_doit+0x5e0/0xc20 net/mptcp/pm_netlink.c:1632
genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2597
___sys_sendmsg net/socket.c:2651 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88802e967a00
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 88 bytes inside of
freed 192-byte region [ffff88802e967a00, ffff88802e967ac0)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2e967
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 00fff00000000000 ffff8880158413c0 ffffea0000b8df40 dead000000000004
raw: 0000000000000000 0000000080100010 00000001fdffffff 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5227, tgid 5227 (syz-executor), ts 69262251188, free_ts 69256236646
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493
prep_new_page mm/page_alloc.c:1501 [inline]
get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x5f/0x120 mm/slub.c:2321
allocate_slab+0x5a/0x2f0 mm/slub.c:2484
new_slab mm/slub.c:2537 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723
__slab_alloc+0x58/0xa0 mm/slub.c:3813
__slab_alloc_node mm/slub.c:3866 [inline]
slab_alloc_node mm/slub.c:4025 [inline]
__kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4184
kmalloc_noprof include/linux/slab.h:681 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:642 [inline]
netdevice_event+0x37d/0x950 drivers/infiniband/core/roce_gid_mgmt.c:801
notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93
call_netdevice_notifiers_extack net/core/dev.c:2032 [inline]
call_netdevice_notifiers net/core/dev.c:2046 [inline]
dev_set_mac_address+0x3d9/0x510 net/core/dev.c:9100
dev_set_mac_address_user+0x31/0x50 net/core/dev.c:9114
do_setlink+0x8b6/0x41f0 net/core/rtnetlink.c:2942
__rtnl_newlink net/core/rtnetlink.c:3783 [inline]
rtnl_newlink+0x17a9/0x2070 net/core/rtnetlink.c:3830
rtnetlink_rcv_msg+0x744/0xd00 net/core/rtnetlink.c:6734
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
page last free pid 5304 tgid 5304 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1094 [inline]
free_unref_page+0xd22/0xea0 mm/page_alloc.c:2612
tlb_batch_list_free mm/mmu_gather.c:159 [inline]
tlb_finish_mmu+0x11f/0x200 mm/mmu_gather.c:468
exit_mmap+0x44f/0xc80 mm/mmap.c:3425
__mmput+0x115/0x390 kernel/fork.c:1347
exit_mm+0x220/0x310 kernel/exit.c:571
do_exit+0x9b2/0x27f0 kernel/exit.c:869
do_group_exit+0x207/0x2c0 kernel/exit.c:1031
__do_sys_exit_group kernel/exit.c:1042 [inline]
__se_sys_exit_group kernel/exit.c:1040 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040
x64_sys_call+0x26c3/0x26d0 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88802e967900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802e967980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff88802e967a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802e967a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff88802e967b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================